23ac2aa985
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
29 lines
1.0 KiB
Plaintext
29 lines
1.0 KiB
Plaintext
filter {
|
|
if "neutron" in [tags] {
|
|
if [module] == "neutron.wsgi" {
|
|
if "accepted" not in [logmessage] {
|
|
mutate {
|
|
gsub => ['logmessage',"\"",""]
|
|
}
|
|
grok {
|
|
match => { "logmessage" => "\[(%{NOTSPACE:requestid} %{NOTSPACE:user_id} %{NOTSPACE:tenant} \- \- \-|\-)\] %{NOTSPACE:requesterip} \- \- \[%{NOTSPACE:req_date} %{NOTSPACE:req_time}\] %{NOTSPACE:verb} %{NOTSPACE:url_path} %{NOTSPACE:http_ver} %{NUMBER:response} %{NUMBER:bytes:int} %{BASE10NUM:httptime:float}" }
|
|
add_tag => ["apimetrics"]
|
|
}
|
|
}
|
|
} else if "neutron-ha-tool" in [source] {
|
|
mutate {
|
|
add_tag => ["neutron-ha-tool"]
|
|
remove_tag => ["_grokparsefailure"]
|
|
}
|
|
}
|
|
if "starting" in [message] and "_grokparsefailure" in [tags] {
|
|
grok {
|
|
match => { "logmessage" => "\[(%{NOTSPACE:requestid}|\-)\](%{SPACE}\(%{NUMBER:pid}\)) %{GREEDYDATA:servicemessage}" }
|
|
}
|
|
mutate {
|
|
remove_tag => ["_grokparsefailure"]
|
|
}
|
|
}
|
|
}
|
|
}
|