Logstash

From UVOO Tech Wiki
Revision as of 01:47, 22 October 2021 by Busk (talk | contribs)
Jump to navigation Jump to search

Install

https://www.elastic.co/guide/en/logstash/current/installing-logstash.html

vim conf.d/logstash.conf

input {
  syslog {
    port => 12345
    codec => cef
    syslog_field => "syslog"
    grok_pattern => "<%{POSINT:priority}>%{SYSLOGTIMESTAMP:timestamp} CUSTOM GROK HERE"
  }
}

output {
    stdout {}
    file {
        path => "/tmp/output.txt"
    }
}

run command

/usr/share/logstash/bin/logstash -f logstash.conf
 logger TEST2 -n 127.0.0.1 --udp --port 12345