Last active
August 29, 2015 14:19
-
-
Save dvas0004/f4f597bebf8c79af6fe3 to your computer and use it in GitHub Desktop.
sample logstash configuration file
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 { | |
tcp { | |
port => 5140 | |
type => "windows-events" | |
codec => json { | |
charset => "CP1252" | |
} | |
} | |
tcp { | |
port => 5141 | |
type => "ossec-events" | |
codec => json { | |
charset => "CP1252" | |
} | |
} | |
syslog { | |
type => "syslog" | |
} | |
} | |
filter { | |
mutate { | |
add_field => { "Sender_IP" => "%{host}" } | |
} | |
if [type] == "windows-events" { | |
if [Message] =~ "My first log .*"{ | |
grok { | |
match => [ "Message", 'My first log %{GREEDYDATA:custom_message}' ] | |
add_tag => ["grokked"] | |
} | |
} | |
date { | |
match => ["[EventTime]", "YYYY-MM-dd HH:mm:ss"] | |
} | |
} | |
if [type] == "ossec-events" { | |
grok { | |
add_tag => ["AlienVault"] | |
} | |
} | |
} | |
output { | |
stdout { } | |
elasticsearch { | |
host => "localhost" | |
template => "/callHome/logstash-1.4.2/lib/logstash/outputs/elasticsearch/elasticsearch-template.json" | |
template_overwrite => true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment