Skip to content

Instantly share code, notes, and snippets.

@wellcomer
Created March 18, 2015 07:26
Show Gist options
  • Save wellcomer/5194fa11cb6eb669ce70 to your computer and use it in GitHub Desktop.
Save wellcomer/5194fa11cb6eb669ce70 to your computer and use it in GitHub Desktop.
grok-filters
input {
file {
path => [ "/opt/iBank2/logs/ibank.log" ]
start_position => end
codec => multiline {
pattern => "^\s"
what => "previous"
}
}
}
filter {
grok {
match => { "message" => "%{GREEDYDATA:timestamp} (WARN|ERROR) ?: %{IPV4:client_ip} - %{DATA:client_id}:%{DATA:warn} Клиент: %{GREEDYDATA:client_name}" }
match => { "message" => "%{GREEDYDATA:timestamp} %{DATA:loglevel} : %{IPV4:client_ip} - %{DATA:client_id}:%{DATA:op}\.( %{GREEDYDATA:args}\.)?.*: %{GREEDYDATA:client_name}" }
}
date {
locale => "en"
match => [ "timestamp", "yy-MM-dd HH:mm:ss,SSS" ]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment