Skip to content

Instantly share code, notes, and snippets.

@javereec
Forked from hofrob/filter
Last active August 29, 2015 14:22
Show Gist options
  • Save javereec/6cbd6b7bed81e86d6ae8 to your computer and use it in GitHub Desktop.
Save javereec/6cbd6b7bed81e86d6ae8 to your computer and use it in GitHub Desktop.
filter {
if [type] == "odoo" {
grok {
match => { "message" => "%{ODOOLOG}" }
}
date {
match => [ "timestamp", "yyyy-MM-dd HH:mm:ss,SSS" ]
}
}
}
input {
file {
type => "odoo"
path => "/path/to/server.log"
codec => multiline {
pattern => "^%{TIMESTAMP_ISO8601} "
negate => true
what => previous
}
}
}
WERKZEUGREQUESTTIMESTAMP %{MONTHDAY}/%{MONTH}/%{YEAR} %{TIME}
WERKZEUGREQUEST %{IPORHOST:client} %{USER:ident} %{USER:auth} \[%{WERKZEUGREQUESTTIMESTAMP:request_timestamp}\] "%{WORD:request_type} %{URIPATHPARAM:request} HTTP/%{NUMBER:httpversion}" %{NUMBER:response} -
ODOOMISC %{GREEDYDATA}
ODOOLOG %{TIMESTAMP_ISO8601:timestamp} %{POSINT:pid} %{LOGLEVEL:level} (?:%{USERNAME:user}|\?) %{PROG:module}: (?:%{WERKZEUGREQUEST}|%{ODOOMISC:misc})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment