Hi,
I'm setting up Logstash to receive syslog, but it seems Logstash doesn't receive anything.
I can monitor Logstash in Elasticsearch, and I see I have no received/sent events :
I'm running ELK on Docker.
Here is my Logstash config :
logstash:
image: 684de72d85c6
container_name: elk5_logstash
ports:
- 514:514/udp
- 9600:9600
environment:
- node.name=logstash2
- xpack.monitoring.elasticsearch.url=http://172.25.3.18:9200
- xpack.monitoring.elasticsearch.username=elastic
- xpack.monitoring.elasticsearch.password=changeme
- path.logs=/var/log/logstash
- log.level=debug
volumes:
- logstash-pipeline:/usr/share/logstash/pipeline
- logstash-config:/usr/share/logstash/config
restart: on-failure
volumes:
logstash-config:
external: true
logstash-pipeline:
external: true
Here is Logstash pipeline :
input {
syslog {}
}
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}" ]
}
date {
match => [ "syslog_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
}
}
}
output {
elasticsearch {
hosts => ["172.25.3.18:9200"]
}
}
Am I missing something in my config?
Thanks in advance
Pippo