
This adds the ability to include logstash log parsing filters for various openstack and service logs. These filters are disabled by default and can be enabled by toggling the deploy_logstash_filters variable. Change-Id: I5c46f78f232d3fb604283ae623cd3975a8346c7c
26 lines
649 B
Plaintext
26 lines
649 B
Plaintext
filter {
|
|
if "logstash" in [tags] {
|
|
grok {
|
|
match => {
|
|
"message" => "\{\:timestamp=>\"%{TIMESTAMP_ISO8601:timestamp}\", \:message=>\"%{DATA:logmessage}\"(;|)(, \:address=>\"%{URIHOST:address}\", \:exception=>#<%{DATA:exception}>, \:backtrace=>\[%{DATA:backtrace}\]|)(, \:level=>:%{LOGLEVEL:loglevel}|)\}"
|
|
}
|
|
}
|
|
|
|
mutate {
|
|
add_field => { "module" => "logstash" }
|
|
uppercase => [ "loglevel" ]
|
|
}
|
|
|
|
if [loglevel] == "WARN" {
|
|
mutate {
|
|
replace => { "loglevel" => "WARNING" }
|
|
}
|
|
} else if ![loglevel] {
|
|
mutate {
|
|
add_field => { "loglevel" => "ERROR" }
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|