Skip to content

Commit

Permalink
Added logstash configs
Browse files Browse the repository at this point in the history
  • Loading branch information
justmeandopensource committed Nov 13, 2018
1 parent 478d7ce commit e188c33
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
8 changes: 8 additions & 0 deletions logstash/01-logstash-input.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
input {
beats {
port => 5044
ssl => true
ssl_certificate => "/etc/pki/tls/certs/logstash.crt"
ssl_key => "/etc/pki/tls/private/logstash.key"
}
}
16 changes: 16 additions & 0 deletions logstash/02-logstash-syslog-filter.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
filter {
if [type] == "syslog" {
grok {
match => {
"message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}"
}
add_field => [ "received_at", "%{@timestamp}" ]
add_field => [ "received_from", "%{host}" ]
}
syslog_pri { }
date {
match => [ "syslog_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
}
}
}

5 changes: 5 additions & 0 deletions logstash/03-logstash-output.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
output {
elasticsearch {
hosts => "localhost:9200"
}
}

0 comments on commit e188c33

Please sign in to comment.