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
Network Switch/Router Bandwidth - 0 bytes
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Network Switch/Router Bandwidth - 0 bytes
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
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=nagiosRe: Network Switch/Router Bandwidth - 0 bytes
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
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
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
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
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 *
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
Glad you got it resolved!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 *
Locking thread