Netflow is an industry standard network protocol for monitoring traffic. LogicMonitor supports Netflow versions 5, 7 and 9, as well as sFlow version 1 and 3 (version 2 is not supported) and JFlow. Netflow, as the industry standard, will be used throughout this document to reference all supported network traffic monitoring protocols.
Hardware that supports Netflow collects IP traffic statistics on enabled interfaces, and exports those statistics as Netflow records to a collector, which analyzes and displays IP traffic statistics for the device. LogicMonitor functions as a Netflow collector, receiving and analyzing exported flows from network devices. Displayed IP traffic statistics include top flows to/from the device, top endpoints, top applications, and bandwidth data, displayed per interface or per device. Specifically, the following data is required and retained:
This data is retained according to the following schedule:
- Raw data is retained for up to five minutes.
- Subsequently, the top 1000 contributors from the total received are retained for each 5 minute increment.
- Every 30 minutes, the top 1000 flows are retained for 24 hours.
- After 24 hours, the top 1,000 flows from the entire 24 hour period are retained for a max period of 400 calendar days.
Netflow data is displayed in a "Traffic" tab for Netflow enabled devices. Available information includes a Throughput widget that displays inbound and output traffic and widget that displays the top 1000 ports (in table or pie chart format):
While the LogicMonitor configuration is very straightforward, the device configuration can be more complex. The following information will guide you through the process:
Configuration Best Practices
Before turning on Netflow monitoring, there are a few best practices we recommend:
- Netflow records are exported using UDP. Because UDP delivery is not guaranteed, you should place the Collector as close as possible to the Netflow Device in your network, to minimize flow disruption due to network congestion or complexity.
- Netflow offers is a detailed, real-time view of network traffic, therefore it is crucial to synchronize clocks between Devices and the Collector. NTP is the best way to accomplish this. If your device and collectors are in different time zones, consider using UTC or standardizing on a single timezone.
- The Netflow collector device must not have any other application (ie, another Netflow Analyzer) which may be listening on the specified Netflow port. This will cause contention for the export data and may prevent traffic data from being represented in LogicMonitor.
Enabling Netflow in LogicMonitor
Logicmonitor's Netflow configuration is straightforward - you just need to enable Netflow for each device you want to turn on Netflow monitoring for. Locate the device you want to enable Netflow for and select the Manage button. From the manage screen, check Enable Netflow and select a Collector that has Netflow enabled (all Collectors have Netflow enabled by default). The Netflow Collector can be different than the collector used to gather other metrics from this device.
Note that the UDP port on the device that is sending the flow data must match the UDP port specified in the Collector's configuration file - by default port 2055 will be specified for netflow. If you wish to use a non-default UDP port for Netflow data collection, or a non-default directory for the storage of Netflow data, you will need to edit the Collector's configuration file. To do this, navigate to Settings | Collectors and identify the specific Collector you wish to use for Netflow. Click the Manage gear icon and then select Collector Configuration from the Support dropdown:
Check the option to "Override agent.conf"- this will enable you to make changes to the Collector's configuration. Then find the '#netflow settings' section and change the netflow.ports value to reflect the desired UDP port, and the netflow.datadir value to reflect the desired directory. Note that netflow.enable must equal true for Netflow to work - the default value is true, so you shouldn't need to set this value. When you have finished editing the agent.conf file, click Submit at the bottom of the dialog window. The Collector will automatically restart and load the new configuration.
Note: You can add "netflow.ignoreTimestampValidate=true" to the #netflow settings section of the Collector Config file if you'd like to configure your collector to ignore netflow device time information. At this time, the only known devices that necessitate this configuration are Sonicwalls.
Once LogicMonitor configuration is complete, Netflow must be enabled on your device. The configuration varies depending on the device, vendor, network topology, and Netflow version you want to use. In fact there are more combinations and options than can possibly be covered in this document, and you may need to review manufacturer guidelines for your specific setup. Basic requirements are listed below, as well as sample Netflow Version 5 and Version 9 configurations.
The basic requirements are as follows:
- Netflow must be enabled per interface on a device.
- A Netflow version number should be specified.
- A source interface on the device must be specified.
- The UDP port configured on the device must match the port specified in the Collector's agent.conf file.
- The clock on the device must be synchronized with the clock on the Collector.
- The IP address of the target Collector must be specified.
- For Netflow Version 9, additional template configuration options must be set.
- For sFlow, packet data must be provided in the enterprise=0 and format=1 packet configuration as described in RFC2233.
NOTE: sFlow requires a different port access than Netflow. sFlow will use Port 6343.
When you add Netflow-enabled devices to a group, the group level node will display a Traffic tab, as well. This will display the aggregate of Netflow data from each device assigned to that group.
In some instances, Netflow data is most useful as an aggregate. For instance, consider each of your office locations. Each office location may contain a few routers and switches. The individual traffic for each of those devices is likely not nearly as important as the overall traffic flow for the office. Grouping the traffic of each device into a single aggregate flow will provide insight into the latter. This feature is currently limited to 10 Netflow capable devices in a group. If there are more than 10, then the 10 with lowest device IDs are used. Device IDs show on the 'Info' tab and are system assigned properties based on chronological order when they were added. It's recommended to put less than 10 Netflow devices in this group.
The group level Traffic tab will display the following information:
- Throughput for all netflow-enabled devices in the group
- Top Talkers
- Top Flows
- Network Group Devices
If you have enabled Netflow on either the group or device level, you will be able to view QoS in its own dedicated table or pie chart (see below) within the Traffic tab on your device dashboards. The table will display the raw values of sent/received packets for each DSCP type. Selecting the "switch" icon will display the overall usage of each DSCP type as a percentage in a pie chart.
Verification & Troubleshooting
Once you have configured your network device, and the LogicMonitor Collector and device, you should be able to see exported Netflow data in the device's Traffic tab.
If you're not seeing Netflow data for your device, there are a few common problem areas to check:
- Inconsistent UDP port configuration: Verify that the UDP port specified on the Netflow device matches the UDP port specified on the Collector.
- Blocked/firewalled UDP port: Many UDP ports are automatically blocked by Windows Firewall or Linux iptables. On the Collector, create an exception for the configured UDP port on inbound traffic to allow Netflow data to reach the LogicMonitor application. If there is a firewall or ACL between the Netflow device and the Collector, verify that the traffic for your configured UDP port is allowed.
- Clock synchronization: As previously stated, it is crucial for the clock on the network device to be synchronized with the clock on the Collector. If the device clock is ahead or behind the Collector clock, flows may be discarded. LogicMonitor displays the Collector timestamp for the most recent flow update (LastData ReceiveTime), as well as the device timestamp for the exported flow (Timestamp In Last RawData). If these values are off by more than a minute, clock synchronization is the likely problem. It is highly recommended to use NTP to automatically synchronize the clocks to a standard and consistent time and timezone.
- Netflow Version 9 template configuration: Netflow V9 requires configuration of a template on the device. If you see synchronized timestamps for received data in the Netflow tab, but the tables are not populating, there may be an issue with the template configuration. To isolate this problem, it is recommended to simplify your setup by falling back to Netflow Version 5. Once you have V5 working properly, then add the V9 template configuration.
- Required Fields in Netflow Version 9: LogicMonitor requires that the flow templates used for version 9 Netflow exports include both INPUT_SNMP and OUTPUT_SNMP interfaces (fields 10 and 14.)
- Cisco ASA: Cisco ASA devices only support Netflow V9. Netflow export on the ASA platform is event driven- unlike a Cisco routing platform, the Cisco ASA does not send incremental updates. NSEL records are only sent during flow creation, teardown or ACL deny events. Cisco ASA devices will not populate the ToS bits or the TCP flags.
Netflow setup can also be verified from the collector debug facility. Navigate to Settings | Collectors | Manage for the desired Collector and select 'Run debug command ...' from the Support as shown:
From the debug window, you can then use the !netflow command. For example, the command !netflow func=diagnose 5 EDT is used to verify clock synchronization. Contact LogicMonitor Support for details on troubleshooting from the debug window.
Within the Traffic Tab for Netflow-enabled devices, you can select the "Settings" cog in order to upload a CSV of IP addresses that are mapped to their respective DNS names. These will then be used in all Netflow tables and reports.
The CSV file needs to reflect the format displayed below. The following CSV columns are required:
- start: the starting IP address of the DHCP range.
- end: the ending IP address of the DHCP range.
- dns: the DNS name associated with the IP address
Additionally, you can add a "collector" column which can be used to configure IP-DNS mapping per Collector. This is particularly useful for establishing differentiated mappings per location or customer (if you're a service provider).
Netflow enabled devices will display a Traffic Tab at the device level, from which you can view all relevant Netflow data, including Top Talkers, Top Source Endpoints, Top Destination Endpoints, Top Flows, Top Ports, and a QoS Table.
The Traffic Tab enables you to easily filter network flows based on source and destination IP addresses, direction, protocol, and/or port(s). This is particularly helpful for viewing traffic across specific connections, such as between office locations. For instance, in the above graph, you can see that netflow traffic views have been filtered to display top 10 bidirectional flows between a company's Tokyo office to its headquarters, further restricted between Nodes 10.9.1.1/24 and 52.52.00.00.