Closed sarlacpit closed 4 years ago
This looks as if the incoming flows are being decoded incorrectly by the Logstash netflow codec. Due to where it sits in the input, the Netflow codec does not maintain templates per device, rather per flowset ID. This can cause an issue if devices are using the same flowset ID, but are sending a different combination/order of fields.
For example... Device A sends a template for flowset ID 257. The codec processes this and uses it to decode ALL flows with flowset ID 257. Device B is also sending flows with flowset ID 257, however it is sending a different combination of fields. The codec will decode Device B's flows with the template from Device A, and the results will be wrong.
You should be able to determine if you have conflicting flowset templates by doing a PCAP and inspecting it in Wireshark.
The only way to work around this would be to use multiple Logstash instances to eliminate conflicting flowset IDs being sent to the same instance.
Thank you for your reply. I think you are right the templates they are conflicting. I'll set up a separate Logstash instance and see how it looks.
The info is coming through correctly on a separate instance of Logstash. reading between the lines, I am thinking, can I ask logstash to open on another port specifically for this data? I do this already for IPFIX & NetFlow.
You can. Create a second input by simply copy-pasting the current udp input for netflow and changing the port number. Usually the port number is set by an environment variable like this...
port => "${ELASTIFLOW_NETFLOW_IPV4_PORT:2055}"
You will want to just hardcode this in the second input...
port => "9995"
This issue will be addressed once the following PRs are merged and released for the...
Logstash UDP Input: https://github.com/logstash-plugins/logstash-input-udp/pull/46 Logstash Netflow Codec: https://github.com/logstash-plugins/logstash-codec-netflow/pull/187
Unfortunately the Elastic team declined to merge UDP input changes (see... logstash-plugins/logstash-input-udp#46). This leaves no other option than to continue to recommend the workaround of multiple instances of the ElastiFlow pipeline.
Hi,
I am trying to get to the bottom of an issue with our netflow implementation of Elastiflow. Basically, we are seeing a lot of data going too and from 0.0.0.0... An example flow received by Elasticsearch:
The Elastiflow is working otherwise normally. We have port 9995 for Netflow v9 Port 9996 for IPFIX We have approximately 100 Cisco routers sending a standard template - I suspect the problem could be with our Cisco Firepower firewalls.(not sure if these are supported yet). The templates are a default with few options to configure them. I am assuming that these are causing the blanks and massive data reporting.
Example template:
Have you seen similar behavior before? Or do you recommend I send this data to a different port to set up a different index?
Any recommendations gratefully received.
Thanks