Skip to content

Instantly share code, notes, and snippets.

@darkshade9
Last active November 7, 2019 12:10
Show Gist options
  • Save darkshade9/bc5266f8fea80de62c79680f52f62480 to your computer and use it in GitHub Desktop.
Save darkshade9/bc5266f8fea80de62c79680f52f62480 to your computer and use it in GitHub Desktop.
neo4j query log grok
if [type] == "neo4j_logs" {
if [source] == "/var/log/neo4j/query.log" {
grok {
match => ["message", "%{TIMESTAMP_ISO8601:datetime} %{WORD:severity} +%{NUMBER:ms} ms: %{NOTSPACE:session-type} %{WORD:protocol} %{WORD:remoteUser} %{NOTSPACE:driver}/(\[)?%{DATA:driver-version}(\])? client/%{IP:clientip}:%{NUMBER:clientport} server/%{IP:serverip}:%{NUMBER:serverport}> %{WORD:remoteUser} - %{GREEDYDATA:query} - (%{GREEDYDATA:parameters})? - {}"]
match => ["message", "%{TIMESTAMP_ISO8601:datetime} %{WORD:severity} +%{NUMBER:ms} ms: %{NOTSPACE:session-type} %{WORD:protocol} %{IP:clientip} %{GREEDYDATA:endpoint} %{WORD:remoteUser} - %{GREEDYDATA:query} - (%{GREEDYDATA:parameters})? - {}"]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment