-
-
Save bbybblank/19ccbfdbf7d56fd747c1 to your computer and use it in GitHub Desktop.
Grok Sophos UTM 9.x Pattern (for logstash) (Simple)
This file contains hidden or 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 { | |
| tcp { | |
| port => 5140 | |
| } | |
| udp { | |
| port => 5140 | |
| } | |
| } | |
| filter { | |
| grok { | |
| match => { "message" => "<%{POSINT:syslog_pri}>%{DATA:syslog_timestamp} %{SYSLOGHOST:syslog_host} %{DATA:syslog_program}\[%{NUMBER:syslog_pid}\]\: %{GREEDYDATA:syslog_message}" } | |
| } | |
| date { | |
| match => [ "syslog_timestamp", "yyyy:MM:dd-HH:mm:ss" ] | |
| } | |
| kv { | |
| source => "syslog_message" | |
| } | |
| mutate { | |
| replace => [ "type", "%{syslog_program}" ] | |
| remove_field => [ "syslog_message", "syslog_timestamp" ] | |
| } | |
| if [type] == "httpproxy" { | |
| grok { match => { "url" => "(?<protocol>https?)://%{IPORHOST:url_domain}/" } } | |
| } | |
| } # end of filter | |
| output { | |
| elasticsearch { | |
| hosts => ["localhost:9200"] | |
| index => "utm-%{+YYYY.MM.dd}" | |
| } | |
| # stdout { codec => rubydebug } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment