forked from elastic/integrations
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http_endpoint: add program option to the configuration user interface (…
- Loading branch information
Showing
4 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
packages/http_endpoint/_dev/test/system/test-http-cel-config.yml
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,38 @@ | ||
service: test-webhook-http | ||
service_notify_signal: SIGHUP | ||
input: http_endpoint | ||
vars: | ||
data_stream.dataset: http_endpoint.http_endpoint | ||
preserve_original_event: true | ||
listen_address: 0.0.0.0 | ||
url: /json | ||
program: |- | ||
// Make it possible to differentiate a program's execution | ||
// from a non-CEL handler. We don't make most of the mito | ||
// libs available in http_endpoint, so just double up by | ||
// making an array of parts of the message. | ||
// We don't have the containers library, so flatten using | ||
// an index into the array produced by the map; the array | ||
// we actually want is the array in the map body. | ||
obj.map(k, [ | ||
{"message": k}, // event 0 | ||
{"message": obj[k]}, // event 1 | ||
])[0] | ||
# Replace 'json' with '.' when kibana.version is ^8.15.0. | ||
prefix: 'json' | ||
listen_port: 9515 | ||
basic_auth: true | ||
username: abc123 | ||
password: abc123 | ||
enable_request_tracer: true | ||
# Remove processors when kibana.version is ^8.15.0. | ||
processors: | | ||
- rename: | ||
fields: | ||
- from: json.message | ||
to: message | ||
- drop_fields: | ||
fields: | ||
- json | ||
assert: | ||
hit_count: 2 |
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