-
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.
This adds standard linux syslog parsing when the timestamp has either a high precision timestamp or a timezone offset included in the timestamp string.
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"syslog_offset" : { | ||
"title" : "Syslog", | ||
"description" : "The system logger format with an offset included", | ||
"url" : "http://en.wikipedia.org/wiki/Syslog", | ||
"regex" : { | ||
"std" : { | ||
"pattern" : "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?)[\\+\\-]\\d{2}:\\d{2}\\s+(?:(?<log_hostname>[a-zA-Z0-9:][^ ]+[a-zA-Z0-9]))?(?:(?: (?<log_procname>(?:[^\\[:]+|[^:]+))(?:\\[(?<log_pid>\\d+)])?:(?<body>(?:.|\\n)*))$|:?(?:(?: ---)? last message repeated \\d+ times?(?: ---)?))" | ||
} | ||
}, | ||
"level-field" : "body", | ||
"level" : { | ||
"error" : "(?:failed|failure|error)", | ||
"warning" : "(?:warn|not responding|init: cannot execute)" | ||
}, | ||
"value" : { | ||
"log_hostname" : { | ||
"kind" : "string", | ||
"collate" : "ipaddress", | ||
"identifier" : true | ||
}, | ||
"log_procname" : { | ||
"kind" : "string", | ||
"identifier" : true | ||
}, | ||
"log_pid" : { | ||
"kind" : "string", | ||
"identifier" : true, | ||
"action-list" : ["dump_pid"] | ||
} | ||
}, | ||
"action" : { | ||
"dump_pid" : { | ||
"label" : "Show Process Info", | ||
"capture-output" : true, | ||
"cmd" : ["dump-pid.sh"] | ||
} | ||
}, | ||
"sample" : [ | ||
{ | ||
"line" : "2015-09-29T12:30:01-05:00 FS03 CROND[28530]: (root) CMD (/usr/lib64/sa/sa1 1 1)" | ||
} | ||
] | ||
} | ||
} |