Page 1 of 1

Network Switch/Router Bandwidth - 0 bytes

Posted: Thu Aug 08, 2019 8:28 am
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

Re: Network Switch/Router Bandwidth - 0 bytes

Posted: Thu Aug 08, 2019 8:35 am
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

Re: Network Switch/Router Bandwidth - 0 bytes

Posted: Thu Aug 08, 2019 8:57 am
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

Re: Network Switch/Router Bandwidth - 0 bytes

Posted: Thu Aug 08, 2019 8:57 am
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

Re: Network Switch/Router Bandwidth - 0 bytes

Posted: Thu Aug 08, 2019 9:26 am
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 *

Re: Network Switch/Router Bandwidth - 0 bytes

Posted: Thu Aug 08, 2019 9:39 am
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