Created
November 21, 2024 14:11
-
-
Save blackrez/8b5ff94e081fe68c7811deb8c9e44079 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| sources: | |
| generate_syslog: | |
| type: "demo_logs" | |
| format: "syslog" | |
| count: 100 | |
| transforms: | |
| remap_syslog: | |
| inputs: | |
| - "generate_syslog" | |
| type: "remap" | |
| source: | | |
| structured = parse_syslog!(.message) | |
| . = merge(., structured) | |
| .doc = . | |
| .doc_as_upsert = true | |
| .msgid = sha1("foo") | |
| sinks: | |
| emit_syslog: | |
| inputs: | |
| - "remap_syslog" | |
| type: "console" | |
| encoding: | |
| codec: "json" | |
| sink_elastic: | |
| type: "elasticsearch" | |
| mode: bulk | |
| inputs: | |
| - "remap_syslog" | |
| endpoint: http://localhost:9200/ | |
| bulk: | |
| action : update | |
| encoding: | |
| only_fields: | |
| - "doc" | |
| - "doc_as_upsert" | |
| id_key: | |
| msgid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment