-
-
Save dbertha/d7337b7d3bc354d6b5ae94f9404c1e2c to your computer and use it in GitHub Desktop.
Odoo Logstash Filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filter { | |
if [type] == "odoo" { | |
grok { | |
match => { "message" => "%{ODOOLOG}" } | |
} | |
date { | |
match => [ "timestamp", "yyyy-MM-dd HH:mm:ss,SSS" ] | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
file { | |
type => "odoo" | |
path => "/path/to/server.log" | |
codec => multiline { | |
pattern => "^%{TIMESTAMP_ISO8601} " | |
negate => true | |
what => previous | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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