
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
24 lines
1.1 KiB
Plaintext
24 lines
1.1 KiB
Plaintext
filter {
|
|
if "nova" in [tags] {
|
|
mutate {
|
|
gsub => ['logmessage',"\"",""]
|
|
}
|
|
if [module] == "nova.osapi_compute.wsgi.server" {
|
|
grok {
|
|
match => { "logmessage" => "\[(%{NOTSPACE:requestid} %{NOTSPACE:user_id} %{NOTSPACE:tenant} \- \- \-|\-)\] %{NOTSPACE:requesterip} %{NOTSPACE:verb} %{NOTSPACE:url_path} %{NOTSPACE:http_ver} status\: %{NUMBER:response} len\: %{NUMBER:bytes:int} time\: %{BASE10NUM:httptime:float}" }
|
|
add_tag => ["apimetrics"]
|
|
}
|
|
} else if [module] == "nova.api.ec2" {
|
|
grok {
|
|
match => { "logmessage" => "\[%{GREEDYDATA:requestid}\] %{NUMBER:seconds}s %{NOTSPACE:requesterip} %{NOTSPACE:verb} %{NOTSPACE:url_path} None\:None %{NUMBER:response} %{GREEDYDATA:user_agent}" }
|
|
add_tag => ["apimetrics"]
|
|
}
|
|
} else if [module] == "nova.metadata.wsgi.server" {
|
|
grok {
|
|
match => { "logmessage" => "\[%{GREEDYDATA:requestid}\] %{NOTSPACE:requesterip} %{NOTSPACE:verb} %{NOTSPACE:url_path} %{NOTSPACE:http_ver} status\: %{NUMBER:response} len\: %{NUMBER:bytes} time\: %{NUMBER:seconds}" }
|
|
add_tag => ["apimetrics"]
|
|
}
|
|
}
|
|
}
|
|
}
|