Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input {
- # relp {
- # type => "relp"
- # port => 2514
- # }
- syslog {
- type => "syslog"
- port => 514
- }
- }
- # From http://cookbook.logstash.net/recipes/syslog-pri/
- filter {
- grok {
- type => "syslog"
- pattern => [ "<%{POSINT:syslog_pri}>%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{PROG:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" ]
- add_field => [ "received_at", "%{@timestamp}" ]
- add_field => [ "received_from", "%{@source_host}" ]
- }
- syslog_pri {
- type => "syslog"
- }
- date {
- type => "syslog"
- syslog_timestamp => [ "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
- }
- mutate {
- type => "syslog"
- exclude_tags => "_grokparsefailure"
- replace => [ "@source_host", "%{syslog_hostname}" ]
- replace => [ "@message", "%{syslog_message}" ]
- }
- mutate {
- type => "syslog"
- remove => [ "syslog_hostname", "syslog_message", "syslog_timestamp" ]
- }
- }
- output {
- #stdout { debug => true debug_format => "json" }
- elasticsearch {
- embedded => true
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement