Last active
August 7, 2024 00:01
-
-
Save neilmcguigan/598465a8673a2030a8784d56a8c0880f to your computer and use it in GitHub Desktop.
grok
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
testing: | |
https://grokdebugger.com/ | |
https://grokconstructor.appspot.com/do/match#result | |
log samples: | |
https://www.ossec.net/docs/log_samples/databases/postgresql.html | |
grok examples: | |
postgres: | |
\[%{PGTIMESTAMP:timestamp}\] %{IP:ip}:%{WORD:db} %{WORD:level}: %{GREEDYDATA:event}: session time: %{TIME:session_time} user=%{USERNAME:username} database=%{WORD:dbcon} host=%{IPORHOST:host} port=%{POSINT:port} | |
php slow log: | |
\[%{GREEDYDATA:timestamp}\] \[pool %{WORD:pool}\] pid %{POSINT:process_id} script_filename = %{UNIXPATH:script_filename} \[%{WORD:request_id}\] %{GREEDYDATA:call} %{UNIXPATH:source_filename}:%{POSINT:line} | |
php-fpm log: | |
\[%{GREEDYDATA:timestamp}\] %{LOGLEVEL:level}: %{GREEDYDATA:message} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment