No Graph for Source

This support forum board is for support questions relating to Nagios Network Analyzer, our network traffic and bandwidth analysis solution.
ryanb
Posts: 33
Joined: Wed Feb 26, 2014 6:03 pm

No Graph for Source

Post by ryanb »

Hello,

I am not getting graphs for any of my sources, although I am seeing top talkers and I can see that data is coming in by the disk usage. I checked, and there are no bandwidth.rrd files in the location where I am storing my netflow data. I tried deleting and readding the sources, and running initialize_source.py manually, but it still does not work and I get no error to indicate why (I checked the /usr/local/nagiosna/var/backend.log file).

This is where I am storing my netflow data:

Code: Select all

# ls -ld /storage1/nagios/netflow/
drwxrwxr-x. 7 nna users 78 Sep  8 16:59 /storage1/nagios/netflow/

# ls -l /storage1/nagios/netflow/
total 0
drwxr-xr-x. 3 nna users 33 Sep  8 16:58 xxx1
drwxr-xr-x. 3 nna users 33 Sep  8 16:59 xxx2
drwxr-xr-x. 3 nna users 33 Sep  8 16:58 xxx3
drwxr-xr-x. 3 nna users 33 Sep  8 16:48 xxx4
drwxr-xr-x. 3 nna users 33 Sep  8 16:52 xxx5

# ls -l /storage1/nagios/netflow/xxx5
total 16
-rw-r--r--. 1 nna nnacmd    5 Sep  8 16:48 9994.pid
drwxr-xr-x. 2 nna users  8192 Sep  9 09:55 flows
Thanks
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: No Graph for Source

Post by ssax »

Try this:

Code: Select all

find /storage1/nagios/netflow -type d -exec chmod 775 {} \;
See if that works for you, if it doesn't, try running this (all mine are owned by nna.nnacmd)

Code: Select all

chown -R nna.nnacmd /storage1/nagios/netflow
Let us know the results.
ryanb
Posts: 33
Joined: Wed Feb 26, 2014 6:03 pm

Re: No Graph for Source

Post by ryanb »

Hi Ssax,

thanks for your response. I ran those commands to update the group and perms on the directories. I have not seen a bandwidth.rrd file show up, though. I tried running:

Code: Select all

 /usr/local/nagiosna/bin/initialize_source.py --directory /storage1/nagios/netflow/xxx1 --port xxxx
for one of the sources, but still no luck. Should the files appear immediately or will it take some time?

Thanks,
Ryan
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: No Graph for Source

Post by tgriep »

Try restarting cron to see if that fixes it.

Code: Select all

service crond restart
Be sure to check out our Knowledgebase for helpful articles and solutions!
ryanb
Posts: 33
Joined: Wed Feb 26, 2014 6:03 pm

Re: No Graph for Source

Post by ryanb »

no luck :(

Can you tell me the process and effective user ID that should be creating the files, as well as where any errors or other messages are logged? I may be able to figure it out.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: No Graph for Source

Post by tgriep »

In the nfcapd command that captures the flow data, there is a python script called /usr/local/nagiosna/bin/reap_files.py, that script is used to generate the rrd files for the graphs.
That process runs as the user nna so that user of this group nnacmd needs to have permissions to the folders that stores the rrd files.
Can you run the following and post the output here?

Code: Select all

ps aux
Be sure to check out our Knowledgebase for helpful articles and solutions!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: No Graph for Source

Post by ssax »

What user were you running this command as?

Try this and see what you get:

Code: Select all

su - nna
/usr/local/nagiosna/bin/initialize_source.py --directory /storage1/nagios/netflow/xxx1 --port xxxx
The files were created immediately for me:

Code: Select all

[nna@ssc66na ~]$ ll /tmp/xxx2
total 1232
-rw-r--r-- 1 nna users 1255360 Sep 10 09:16 bandwidth.rrd
drwxr-xr-x 2 nna users    4096 Sep 10 09:16 flows
ryanb
Posts: 33
Joined: Wed Feb 26, 2014 6:03 pm

Re: No Graph for Source

Post by ryanb »

I had been running the command as root, but I noticed that the Python script changes users. No luck this time either:

Code: Select all

# su - nna
$ /usr/local/nagiosna/bin/initialize_source.py --directory /storage1/nagios/netflow/xxx1 --port 9994
sudo /sbin/iptables -I INPUT -p udp -j ACCEPT --dport 9994
Saving...
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]
$ ls -l /storage1/nagios/netflow/xxx1
total 44
-rw-r--r--. 1 nna nnacmd     5 Sep  8 16:48 9994.pid
drwxrwxr-x. 2 nna nnacmd 20480 Sep 10 13:30 flows
$ ls -ld /storage1/nagios/netflow/xxx1
drwxrwxr-x. 3 nna nnacmd 33 Sep  8 16:48 /storage1/nagios/netflow/xxx1
ryanb
Posts: 33
Joined: Wed Feb 26, 2014 6:03 pm

Re: No Graph for Source

Post by ryanb »

Is there something specific you would like to see from the results of 'ps aux'?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: No Graph for Source

Post by tgriep »

I want to see how the nfcapd daemon is running on your system, maybe the script isn't running correctly.
Could you run this and post the output?

Code: Select all

ps aux --cols=300 |grep nfcapd
Thanks.
It should look similar to this.

Code: Select all

nna      51386  0.0  0.0   6944   804 ?        S    Aug31   0:02 /usr/local/bin/nfcapd -I 2 -l /usr/local/nagiosna/var/ASA5501/flows -p 9999 -x /usr/local/nagiosna/bin/reap_files.py %d %f %i -P /usr/local/nagiosna/var/ASA5501/9999.pid -D -e -w -z
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked