-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add LogEvents interceptor, update test schemas
- Loading branch information
Showing
19 changed files
with
297 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
.vscode | ||
|
||
.engine/** | ||
.artifacts/** | ||
.tmp/** | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
component { | ||
|
||
function configure(){ | ||
var apiEnabled = controller.getModuleSettings( "logstash", "apiEnabled", true ); | ||
|
||
if( apiEnabled ){ | ||
route( "/api/logs" ) | ||
.withAction( { | ||
"HEAD" : "onInvalidHTTPMethod", | ||
"OPTIONS" : "onInvalidHTTPMethod", | ||
"GET" : "onInvalidHTTPMethod", | ||
"POST" : "create", | ||
"DELETE" : "onInvalidHTTPMethod", | ||
"PUT" : "create", | ||
"PATCH" : "onInvalidHTTPMethod" | ||
} ) | ||
.toHandler( "API" ); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
component { | ||
|
||
property name="appenderService" inject="AppenderService@cbelasticsearch"; | ||
|
||
|
||
function writeToAppender( event, rc, prc, interceptData ){ | ||
if( !interceptData.keyExists( "appender" ) ){ | ||
throw( type="InvalidArgument", message="The 'appender' key is required in the intercept data. Could not continue." ); | ||
} else if( !interceptData.keyExists( "message" ) ){ | ||
throw( type="InvalidArgument", message="The 'message' key is required in the intercept data. Could not continue." ); | ||
} | ||
|
||
param interceptData.extraInfo = {}; | ||
param interceptData.severity = "INFO"; | ||
|
||
appenderService.logToAppender( | ||
interceptData.appender, | ||
interceptData.message, | ||
interceptData.severity, | ||
interceptData.extraInfo | ||
); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,8 @@ | |
}, | ||
"rewrites":{ | ||
"enable":"true" | ||
} | ||
}, | ||
"webroot":"test-harness" | ||
}, | ||
"openBrowser":"false" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.