Bandwidth graph Stopped Updating

This support forum board is for support questions relating to Nagios Network Analyzer, our network traffic and bandwidth analysis solution.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia

Bandwidth graph Stopped Updating

Post by Box293 »

From this screenshot the Bandwidth graph has stopped updating:
Selection_101.png
If I tail /usr/local/nagiosna/var/backend.log and stop and start the source I see this:

Code: Select all

Error running initialization.
But it starts OK. I know traffic is being received (watching a tcpdump) and there are the correct firewall rules in place.

RRD file has not been updated for a while:

Code: Select all

ls -al /usr/local/nagiosna/var/pfSense/
total 1264
drwxrwsr-x+ 3 nna nnacmd    4096 Jul  3 06:45 .
drwsrwsr-x+ 3 nna nnacmd    4096 Jun 25 05:14 ..
-rw-r--r--+ 1 nna nnacmd       6 Jul  3 06:45 9912.pid
-rw-rw-r--+ 1 nna nnacmd 1255360 Jun 19 05:40 bandwidth.rrd
drwxrwsr-x+ 2 nna nnacmd   20480 Jul  3 06:45 flows
Flows are being saved (reduced output below):

Code: Select all

ls -al /usr/local/nagiosna/var/pfSense/flows/
-rw-r--r--+ 1 nna nnacmd  39752 Jul  3 16:48 nfcapd.201507031645
-rw-r--r--+ 1 nna nnacmd    276 Jul  2 09:40 nfcapd.current.1389
-rw-r--r--+ 1 nna nnacmd    276 Jul  3 16:48 nfcapd.current.14694
-rw-r--r--+ 1 nna nnacmd    276 Dec 21  2014 nfcapd.current.1663
-rw-r--r--+ 1 nna nnacmd    107 Jul  3 16:48 .nfstat
NA 2R1.0 on CentOS 6.5 x64
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia

Re: Bandwidth graph Stopped Updating

Post by Box293 »

I did some more troubleshooting on this.

First:

Code: Select all

service nagiosna restart
NagiosNA backend stopped.
Traceback (most recent call last):
  File "/usr/local/nagiosna/bin/initialize_source.py", line 16, in <module>
    import rrdtool
ImportError: librrd.so.4: cannot open shared object file: No such file or directory
NagiosNA backend started...
Then:

Code: Select all

rrdtool
RRDtool 1.4.8  Copyright 1997-2013 by Tobias Oetiker <tobi@oetiker.ch>
               Compiled Oct 24 2014 09:26:45

Usage: rrdtool [options] command command_options
Valid commands: create, update, updatev, graph, graphv,  dump, restore,
		last, lastupdate, first, info, fetch, tune,
		resize, xport, flushcached

RRDtool is distributed under the Terms of the GNU General
Public License Version 2. (www.gnu.org/copyleft/gpl.html)

For more information read the RRD manpages

So I looked at the Network Analyzer fullinstall script and it has an rrdtool section:

Code: Select all

rrdtool() {
	tar xf rrdtool-1.4.9.tar.gz
	(
		cd rrdtool-1.4.9
		./configure --prefix=/usr/local --disable-perl
		make
		make install
	)
	rm rrdtool-1.4.9 -rf
}
Clearly I'm not up to date.
I checked the upgrade script and there is no reference to installing / updating rrdtool.

So after updating rrdtool:

Code: Select all

rrdtool
RRDtool 1.4.9  Copyright 1997-2013 by Tobias Oetiker <tobi@oetiker.ch>
               Compiled Nov 11 2015 11:13:45

Usage: rrdtool [options] command command_options
Valid commands: create, update, updatev, graph, graphv,  dump, restore,
		last, lastupdate, first, info, fetch, tune,
		resize, xport, flushcached

RRDtool is distributed under the Terms of the GNU General
Public License Version 2. (www.gnu.org/copyleft/gpl.html)

For more information read the RRD manpages
Same problem:

Code: Select all

service nagiosna restart
NagiosNA backend stopped.
Traceback (most recent call last):
  File "/usr/local/nagiosna/bin/initialize_source.py", line 16, in <module>
    import rrdtool
ImportError: librrd.so.4: cannot open shared object file: No such file or directory
NagiosNA backend started...
Does the file exist?

Code: Select all

find / -name librrd.so.4
/usr/local/lib/librrd.so.4
/tmp/nagiosna/rrdtool-1.4.9/src/.libs/librrd.so.4

ls -la /usr/local/lib/librrd.so.4
lrwxrwxrwx 1 root root 15 Nov 11 11:13 /usr/local/lib/librrd.so.4 -> librrd.so.4.2.2
Then I tried:

Code: Select all

yum install python-rrdtool
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.overthewire.com.au
 * epel: mirror.overthewire.com.au
 * extras: mirror.overthewire.com.au
 * updates: mirror.overthewire.com.au
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package rrdtool-python.x86_64 0:1.3.8-7.el6 will be installed
--> Processing Dependency: rrdtool = 1.3.8-7.el6 for package: rrdtool-python-1.3.8-7.el6.x86_64
--> Processing Dependency: librrd.so.4()(64bit) for package: rrdtool-python-1.3.8-7.el6.x86_64
--> Running transaction check
---> Package rrdtool.x86_64 0:1.3.8-7.el6 will be installed
--> Processing Dependency: dejavu-sans-mono-fonts for package: rrdtool-1.3.8-7.el6.x86_64
--> Processing Dependency: dejavu-lgc-sans-mono-fonts for package: rrdtool-1.3.8-7.el6.x86_64
--> Running transaction check
---> Package dejavu-lgc-sans-mono-fonts.noarch 0:2.30-2.el6 will be installed
---> Package dejavu-sans-mono-fonts.noarch 0:2.30-2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================
 Package                                       Arch                      Version                           Repository               Size
=========================================================================================================================================
Installing:
 rrdtool-python                                x86_64                    1.3.8-7.el6                       base                     29 k
Installing for dependencies:
 dejavu-lgc-sans-mono-fonts                    noarch                    2.30-2.el6                        base                    393 k
 dejavu-sans-mono-fonts                        noarch                    2.30-2.el6                        base                    450 k
 rrdtool                                       x86_64                    1.3.8-7.el6                       base                    293 k

Transaction Summary
=========================================================================================================================================
Install       4 Package(s)

Total download size: 1.1 M
Installed size: 2.7 M
Is this ok [y/N]: n
Exiting on user Command
But I didn't proceed as it looked like it was going to downgrade rrdtool.

Not sure what to do now.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia

Re: Bandwidth graph Stopped Updating

Post by Box293 »

OK so with the help of @jdalrymple I was able to fix the problem.

Basically I needed to delete (I moved to be safe) the old python components, re-compile rrdtools and it was OK.

Code: Select all

mkdir /usr/local/lib64/python2.6/site-packages_backup
mv /usr/local/lib64/python2.6/site-packages/*rrd* /usr/local/lib64/python2.6/site-packages_backup
mv /usr/lib/python2.6/site-packages/rrdtool-0.1.1-py2.6-linux-x86_64.egg /usr/lib/python2.6/site-packages/rrdtool-0.1.1-py2.6-linux-x86_64.egg_backup
cd /tmp
wget https://assets.nagios.com/downloads/nagios-network-analyzer/2/nagiosna-2r1.0.tar.gz
tar xzf nagiosna-2r1.0.tar.gz
cd /tmp/nagiosna/
tar xf rrdtool-1.4.9.tar.gz
cd rrdtool-1.4.9
./configure --prefix=/usr/local --disable-perl --enable-python
make
make install
service nagiosna restart
Then after about 15 minutes the graphs started to appear. You can watch the RRD file to make sure it's being updated, it's in your source directory:

Code: Select all

watch 'ls -al /usr/local/nagiosna/var/pfSense/'
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.