Skip to content

Instantly share code, notes, and snippets.

@donaldh
Created November 2, 2016 12:12
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donaldh/89b7304981f96497c94fe4d98bb03d71 to your computer and use it in GitHub Desktop.
Save donaldh/89b7304981f96497c94fe4d98bb03d71 to your computer and use it in GitHub Desktop.
Parsing IOS & XR syslogs
input {
udp {
port => 514
type => "syslog"
}
}
filter {
if [type] == "syslog" {
grok {
match => { "message" => [
# IOS-XR 6.x.x
"<%{INT:priority}>%{NUMBER:seq#}: %{DATA:node}:%{CISCOTIMESTAMP:log_date} : %{DATA:process}\[%{INT:pid}\]: %%{WORD:category}-%{WORD:group}-%{INT:severity}-%{WORD:mnemonic} : %{GREEDYDATA:message}",
# IOS
"<%{INT:priority}>%{NUMBER:seq#}: \*%{CISCOTIMESTAMP:log_date}: %%{WORD:category}-%{INT:severity}-%{WORD:mnemonic}: %{GREEDYDATA:message}" ]
}
overwrite => [ "message" ]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment