I'd like to forward syslog messages to my ELK stack. So basically am I right to assume logstash is capable of receiving syslog messages and parsing them without sending to a syslog server first?
I forward syslog directly from my Cisco switch, remote log to ELK server ip UDP 5514.
On my ELK server:
udp 0 0 0.0.0.0:5514 0.0.0.0:*
My input file:
input {
udp {
port => 5514
type => "syslog"
my filter file:
filter {
if [type] == "syslog" {
grok {
match => { "message" => "%{SYSLOGLINE}" }
}
date {
match => [ "timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
}
}
}
You already had this block which displays any events to the console (given that you are running Logstash from console) in additional to trying to index to ES, so if you don't see anything from the console, the logs are not arriving at Logstash.
When I run; /usr/share/logstash/bin/logstash --path.settings /etc/logstash --debug
no syslog messages are appearing on the console.. so must be something wrong with input ?
When I run: [root@host-l01 ~]# curl 'localhost:9200/_cat/indices?v'
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
close .watcher-history-7-2018.04.11 01Z34Tk8SoCWrrQj_oFlYA
green open .triggered_watches dm4mpxy_Q4GTwLJPVjQ7ng 1 0 0 0 15.5kb 15.5kb
green open .watches n0HQZ2pKT4GTvfMHrOeo2g 1 0 6 0 32.9kb 32.9kb
green open .monitoring-es-6-2018.04.11 GWH5uCuOQjGjdSkf22ZoUw 1 0 1839 12 1mb 1mb
green open .security-6 ZXbp_DODSouFZamobe3Wdg 1 0 3 0 9.8kb 9.8kb
green open .monitoring-alerts-6 whBL9bysR7au2_1bBSMtPQ 1 0 1 0 6.1kb 6.1kb
it doesn't seem to display an index from logstash or something that is increasing in values.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.