Network Switch/Router Bandwidth - 0 bytes

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
stauftm
Posts: 8
Joined: Wed Dec 05, 2018 1:47 pm

Network Switch/Router Bandwidth - 0 bytes

Post by stauftm »

Good morning everyone. So I'm beginning to monitor our network gear and so far everything is working great, however I am having one issue and that's bandwidth. I have run the Network Switch/Router wizard and you can monitor bandwidth, so I am doing that on ports I know are generating significant use. After I run the wizard I am getting 0 bytes for use, everything else is working fine like port status. I know this uses mrtg for bandwidth use and I haven't done anything to enable/configure it because I'm assuming the wizard takes care of all this? My version is 5.5.11 and I'm on Nagios XI. I'm assuming I'm missing some prerequisites that I should of done for MRTG?

Thanks!
Todd
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Network Switch/Router Bandwidth - 0 bytes

Post by scottwilkerson »

It is normal to get 0 bytes right away, but after a few check cycles (15 minutes) you should get data if there is data moving across the interfaces.

You can test the mrtg config by running the following from the command line

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lib/mrtg/mrtg.lock --confcache-file /var/lib/mrtg/mrtg.ok --user=nagios --group=nagios
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
stauftm
Posts: 8
Joined: Wed Dec 05, 2018 1:47 pm

Re: Network Switch/Router Bandwidth - 0 bytes

Post by stauftm »

Yep, I've left it run over night. I did run that command, thanks, i get a bunch of 'permission denied'.

2019-08-08 08:54:39: ERROR: Cannot update /var/lib/mrtg/10.1.0.1_436221440.rrd with '1565272479:0:0' opening '/var/lib/mrtg/10.1.0.1_436221440.rrd': Permission denied

I will look into that now too.

Thanks again.

Todd
stauftm
Posts: 8
Joined: Wed Dec 05, 2018 1:47 pm

Re: Network Switch/Router Bandwidth - 0 bytes

Post by stauftm »

Yep, I've left it run over night. I did run that command, thanks, i get a bunch of 'permission denied'.

2019-08-08 08:54:39: ERROR: Cannot update /var/lib/mrtg/10.1.0.1_436221440.rrd with '1565272479:0:0' opening '/var/lib/mrtg/10.1.0.1_436221440.rrd': Permission denied

I will look into that now too.

Thanks again.

Todd
stauftm
Posts: 8
Joined: Wed Dec 05, 2018 1:47 pm

Re: Network Switch/Router Bandwidth - 0 bytes

Post by stauftm »

Found my answer. Thanks for the command to run, so when I run:

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lib/mrtg/mrtg.lock --confcache-file /var/lib/mrtg/mrtg.ok --user=nagios --group=nagios

i'll get a bunch of permission denied:

2019-08-08 08:54:39: ERROR: Cannot update /var/lib/mrtg/10.1.0.1_436221440.rrd with '1565272479:0:0' opening '/var/lib/mrtg/10.1.0.1_436221440.rrd': Permission denied


The fix is below:

cd /var/lib/mrtg
chown apache:nagios *
chmod 0664 *
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Network Switch/Router Bandwidth - 0 bytes

Post by scottwilkerson »

stauftm wrote:Found my answer. Thanks for the command to run, so when I run:

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lib/mrtg/mrtg.lock --confcache-file /var/lib/mrtg/mrtg.ok --user=nagios --group=nagios

i'll get a bunch of permission denied:

2019-08-08 08:54:39: ERROR: Cannot update /var/lib/mrtg/10.1.0.1_436221440.rrd with '1565272479:0:0' opening '/var/lib/mrtg/10.1.0.1_436221440.rrd': Permission denied


The fix is below:

cd /var/lib/mrtg
chown apache:nagios *
chmod 0664 *
Glad you got it resolved!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked