Skip to content

Instantly share code, notes, and snippets.

View logstashfilter
filter {
if "apache_access_json" in [tags] {
if [useragent] != "-" and [useragent] != "" {
useragent {
add_tag => [ "UA" ]
source => "useragent"
prefix => "UA-"
}
}
View logstashoutput
output {
elasticsearch {
host => "localhost"
protocol => "http"
}
}
View gist:8e1b50dbb85a156ff6d8
input {
lumberjack {
port => 5000
tags => ["apache_access_json"]
codec => "json"
ssl_certificate => "/etc/ssl/logstash.pub"
ssl_key => "/etc/ssl/logstash.key"
}
}