- opFlow Dashboard is Bare (graphs show no data)
- 1. Has the IP address of the opFlow server or virtual machine changed?
- 2. Verify that the flow collection daemon is running
- 3. Verify that opFlow's main daemon is running
- 4. Verify that MongoDB is running
- 5. Check that the data source folder configuration is consistent
- 6. Check your diskspace (mainly opFlow 2)
- 7. Run a purge manually (only opFlow 2)
- 8. Are NetFlow packets arriving at the server?
- Determining where (unexpected/undesirable) flows are coming from
- 10. Ignoring flow sources
opFlow Dashboard is Bare (graphs show no data)
It appears that you are not receiving any flows; have you checked when you restarted opFlow? it can take a few minutes to start receiving and processing net flow records.
Besides that there are a few potential causes for problems to examine.
1. Has the IP address of the opFlow server or virtual machine changed?
If so, change net flow configurations in the network devices to send to new IP address.
2. Verify that the flow collection daemon is running
In opFlow 3 you'll be warned of daemon problems on the main dashboard page, similar to the screenshot below:
(opFlow 2) Verify that "flowd" is running
opFlow 2 uses the tool "flowd" to receive (and temporarily store) flow data:
You should see a few entries besides the grep one, the relevant one here being the two "
To start a missing/dead flowd, simply run
sudo service flowd start.
(opFlow 3) Verify that "nfcapd" is running
In opFlow 3, we've switched to a more modern flow collector, "nfcapd" from the "nfdump" package; opFlow 3 also ships with a more convenient init script for this daemon:
sudo service nfdump status
should report that nfcapd is running with a particular pid; you can verify that by following up with
ps -ef|fgrep nfcapd.
If no nfcapd is alive, run
sudo service nfdump start.
3. Verify that opFlow's main daemon is running
opFlow requires that its
opflowd is running to periodically retrieve and process new flow data from the respective flow collector tool.
sudo service/opflowd status should report a live opFlowd
Start it with the command below
4. Verify that MongoDB is running
Without a working MongoDB opFlow can't operate; in all likelihood you will use a local MongoDB server, on the same machine as opFlow.
In this case,
sudo service mongod status and/or
ps -ef | fgrep mongod should suffice to verify a living mongod server.
(If you are not using the default setup but rather a remote mongod instance, you'll have to use the
mongo shell to verify it's reachable and working.)
Like above, starting a missing
mongod instance is easy:
sudo service mongod start is the command you should use. Please note that mongod may refuse to start for a number of reasons (e.g. misconfiguration, lack of disk space, etc.); if the service start indicates failure you'll have to investigate using the MongoDB logs (which are usually in
5. Check that the data source folder configuration is consistent
opFlowd needs to know where to look for new flow data, and clearly the flow collector tool needs to know where to save data for consumers to find it.
(opFlow 2) flowd directories
Check that all the folders are the same. Run these commands and make sure that everything is pointing to the right spot.
It is especially important that the logfile which flowd uses is picked up by opFlow which is the "flowd_data" configuration and this is combined with "<opflow_dir>" to get the path.
(opFlow 3) nfcapd/nfdump directory
The default configuration for nfcapd uses
/var/lib/nfdump for flow data storage, and opFlowd needs to use the same directory.
6. Check your diskspace (mainly opFlow 2)
Make sure where ever you are putting the flow data and the Mongo DB, you have quite alot of disk space; Flow data is very voluminous.
In opFlow 3, the database collections are normally "capped" in size and do not grow.
7. Run a purge manually (only opFlow 2)
Purge the raw flow binary flow data and the older database data, this assume you want to keep 7 days of flow binary data and it is located in /var/opflow.
8. Are NetFlow packets arriving at the server?
You have verified that flowd/nfcapd and opflowd are running, but still you have no data on your dashboard. There are several things to check:
(opFlow 2) Check the flowd logfile to make sure it is growing
Find the logfile by checking the flowd.conf file (normally in /usr/local/etc/flowd.conf)
In this example the file is growing, so flows are making it into the server, if they are not you will see something like this
In this case the file is not growing and more investigation is necessary.
(opFlow 3) Check that nfcapd is rotating files, that they're not empty
As per 5, nfcapd stores files normally in
/var/lib/nfdump, and rotates them every 120 seconds; opFlowd picks them up and moves them within a few seconds after that.
You should see a very 'fresh' and likely small file called
nfcapd.current.N, and that should be recreated on every rotation cycle - look at the timestamp. If it is not, nfcapd isn't working.
Temporarily you may also see files named
nfcapd.YYYYMMDDHHMM; these are flow data files that are ready for opFlowd, but which have not yet been consumed. When opFlow starts analyzing, it'll move the file into the
inprogress directory, and when it's done all flow files go into the
flows.YYYY-MM-DD directory for archival.
You can also use the
nfdump tool to query flow files in very flexible ways (see the
nfdump manual page for details):
Are netflow packets sent where they are expected?
There is no strict standard for which (UDP) port netflow exporters and collectors should use.
flowd configuration shipped with opFlow 2 used port 12345.
nfdump/nfcapd configuration shipped with opFlow 3 uses the more common/modern port 9995.
Clearly your exporting devices need to be configured to use the appproriate target port.
Checking for packets arriving at the server
Running tcpdump will tell us if packets are making it to the server at all:
If no packets are arriving double check the firewall configuration will allow them through:
If you see no packets arrive using tcpdump and the firewall is not stopping the packets then you will need to verify the configuration of your node that is sending the netflow packets and that they are going to the correct node/port. One way to check the config on a Cisco device is:
If that is not the issue you will need to verify that nothing on your network is filtering the packets and preventing them from arriving at the server.
Determining where (unexpected/undesirable) flows are coming from
To figure out where all the flows / conversations in your DB are coming from you can look at the agents list.
In opFlow 2.5 and below the agents list is only populated from flow data and not from conversations. The information can be found in mongo quite easily:
Using the tcpdump command from 8 can also be handy to see what is arriving, keep in mind that unwanted may be dropped/ignored by modifying flowd.conf.
In opFlow 3 you find all agents supplying flows to your device in the GUI, in the "System" - "Agents" menu. A more precise status can be obtained from the
opflow-cli command-line tool:
In the example above you can see for what interfaces and when agents have supplied data. The cli tool also lets you disable agents or particular agent-input-output combinations.
10. Ignoring flow sources
When configurations are copied from one device to another flow configuration can come with them, this can lead to more flows being sent to opFlow than is expected. The best solution to this problem is to stop the device from sending flows, but this cannot always be done (or done in a timely manner).
(opFlow 2) Filtering sources in flowd
To solve this issue flowd.conf allows setting which devices to accept flows from, or which to ignore.
(opFlow 3) Deactivating agents with opflow-cli.pl
opFlow 3 provides built-in filtering mechanisms (but you might also instruct
nfcapd to ignore certain parties).
To ignore an agent, first retreve a list of known agents, with
opflow-cli.pl act=list-agents; Identify the undesirable source(s), then run
/usr/local/omk/opflow-cli.pl act=update-agent agent=126.96.36.199 in_if=42 out_if=99 admin_status=inactive
with the desired agent ip address and in and out interface indices. If you omit the
out_if arguments, all flow data from this agent is ignored; otherwise only flows that pass the specifed interfaces in the given direction are filtered out. Please note that deactivating an agent does not affect flows that have already been processed; only future inputs are filtered.