Add Instance ID to logs
This will parse the logs and grab the instance ID out of it. Change-Id: I9ad0c0e8d6101cca1fc3c4a7cb5cabc3504e6e28
This commit is contained in:
parent
aa647953e0
commit
4f03c51118
@ -195,6 +195,14 @@
|
||||
remove_field => [ "logdate" ]
|
||||
}
|
||||
if "nova" in [tags] {
|
||||
# Instance ID from logs (i.e. "[instance: 5ee83c6e-3604-467a-be54-e48429086e3f]")
|
||||
grok {
|
||||
match => {
|
||||
"logmessage" => ["(\[instance\: %{NOTSPACE:instance_id}\] )?%{GREEDYDATA:logmessage}?"]
|
||||
}
|
||||
overwrite => [ "logmessage" ]
|
||||
}
|
||||
|
||||
if [module] == "nova.api.openstack.requestlog" {
|
||||
grok {
|
||||
match => { "logmessage" => "%{IPORHOST:client_ip} \"%{WORD:verb} %{NOTSPACE:request}\" status\: %{NUMBER:response} len\: %{NUMBER:bytes} microversion\: %{NUMBER:microversion} time\: %{NUMBER:duration:float}" }
|
||||
|
Loading…
Reference in New Issue
Block a user