Hello,
I have installed an ELK Stack on a Ubuntu 18.04 LXC/Container.
I am sending Netflow v9 flows from a Cisco ASR9000 node to Logstash (end purpose is to use Elastiflow), and the flows are getting to the server (confirmed via tcpdump), however I am stuck with having Logstash not being able reading the data. My Logstash configuration is as basic as I could make it:
root@lxc-ELKNetflow:/etc/logstash/conf.d# more netflow.conf input { udp { port => 9995 codec => netflow } } output { stdout { codec => rubydebug } file { path => "/tmp/netflow.txt" } } root@lxc-ELKNetflow:/etc/logstash/conf.d#
And I am I am not seeing anything being populated in the /tmp/netflow.txt file or in the syslog log.
-rwxrwxrwx 1 logstash root 0 Aug 16 14:13 netflow.txt
Here is a snippet of logstash-plain.log
[2018-08-16T14:58:31,576][WARN ][logstash.runner ] SIGTERM received. Shutting down.
[2018-08-16T14:58:33,775][INFO ][logstash.pipeline ] Pipeline has terminated {:pipeline_id=>"main", :thread=>"#<Thread:0x3e73a622 run>"}
[2018-08-16T14:58:50,409][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.3.2"}
[2018-08-16T14:58:53,993][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[2018-08-16T14:58:54,110][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0x56fb171d sleep>"}
[2018-08-16T14:58:54,122][INFO ][logstash.inputs.udp ] Starting UDP listener {:address=>"0.0.0.0:9995"}
[2018-08-16T14:58:54,170][INFO ][logstash.inputs.udp ] UDP listener started {:address=>"0.0.0.0:9995", :receive_buffer_bytes=>"106496", :queue_size=>"2000"}
[2018-08-16T14:58:54,180][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>}
[2018-08-16T14:58:54,477][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
root@lxc-ELKNetflow-HOTComm:/var/log/logstash#
As mentioned, flows are reaching the server:
root@lxc-ELKNetflow:/var/log/logstash# tcpdump -ni eth0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
15:13:55.902463 IP 192.168.1.250.11602 > 172.29.74.8.9995: UDP, length 1324
15:13:55.904977 IP 192.168.1.250.11602 > 172.29.74.8.9995: UDP, length 1392
15:13:55.904986 IP 192.168.1.250.11602 > 172.29.74.8.9995: UDP, length 1392
15:13:55.904989 IP 192.168.1.250.11602 > 172.29.74.8.9995: UDP, length 1260
15:13:55.904992 IP 192.168.1.250.11602 > 172.29.74.8.9995: UDP, length 416
15:13:55.904995 IP 192.168.1.250.11602 > 172.29.74.8.9995: UDP, length 416
15:13:55.904997 IP 192.168.1.250.11602 > 172.29.74.8.9995: UDP, length 352
15:13:55.905000 IP 192.168.1.250.11602 > 172.29.74.8.9995: UDP, length 92
^C
8 packets captured
13 packets received by filter
5 packets dropped by kernel
root@lxc-ELKNetflow:/var/log/logstash#