Skip to content

Instantly share code, notes, and snippets.

@pa-jberanek
Created April 5, 2018 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pa-jberanek/c49e6ea20f4b99bdda52d89808affc73 to your computer and use it in GitHub Desktop.
Save pa-jberanek/c49e6ea20f4b99bdda52d89808affc73 to your computer and use it in GitHub Desktop.
{
"filebeat-6.2.3-system-syslog-pipeline": {
"description": "Pipeline for parsing Syslog messages.",
"processors": [
{
"grok": {
"ignore_missing": true,
"field": "message",
"patterns": [
"""%{SYSLOGTIMESTAMP:system.syslog.timestamp} %{SYSLOGHOST:system.syslog.hostname} %{DATA:system.syslog.program}(?:\[%{POSINT:system.syslog.pid}\])?: %{GREEDYMULTILINE:system.syslog.message}""",
"%{SYSLOGTIMESTAMP:system.syslog.timestamp} %{GREEDYMULTILINE:system.syslog.message}"
],
"pattern_definitions": {
"GREEDYMULTILINE": "(.|\n)*"
}
}
},
{
"remove": {
"field": "message"
}
},
{
"date": {
"field": "system.syslog.timestamp",
"target_field": "@timestamp",
"formats": [
"MMM d HH:mm:ss",
"MMM dd HH:mm:ss"
],
"ignore_failure": true
}
}
],
"on_failure": [
{
"set": {
"field": "error.message",
"value": "{{ _ingest.on_failure_message }}"
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment