Skip to content

Instantly share code, notes, and snippets.

@itayw
Last active February 6, 2018 12:34
Show Gist options
  • Save itayw/5ccac812ca40b2977611075da33ff827 to your computer and use it in GitHub Desktop.
Save itayw/5ccac812ca40b2977611075da33ff827 to your computer and use it in GitHub Desktop.
Echo ingest playground
#!/bin/sh
docker run -it --rm --name playground-ingest -v $(pwd)/sample.conf:/config-dir/logstash.conf registry.echo-security.co/joola/echo-collector:6.0 -f /config-dir/logstash.conf
input {
stdin {
}
}
filter {
grok {
match => { "message" => "%{SYSLOGTIMESTAMP:timestamp} %{SYSLOGHOST:host_name}/%{SYSLOGHOST:host_ip} %{GREEDYDATA:message}" }
overwrite => ["message"]
}
if [host_name] == 'localhost' {
}
else {
kv {
source => "message"
}
}
if [srcip] {
geoip {
source => "srcip"
target => "srcip_geoip"
}
}
if [dstip] {
geoip {
source => "dstip"
target => "dstip_geoip"
}
}
}
output {
stdout {
codec => rubydebug
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment