Bandwidth Performance Graphs Issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
[email protected]
Posts: 34
Joined: Mon Sep 26, 2016 1:37 pm

Bandwidth Performance Graphs Issue

Post by [email protected] »

Hello,

We are from "dpiX" our Customer number: 39619. Installed Nagios XI version 5.2.9 with Standard License, We added the device successfully with services like Ping with graph, Port Status and Bandwidth Graph.

In this we are not able get Bandwidth Graph for any devices, For reference find the attachment of Bandwidth.jpg and Bandwidth Performance Graph.jpg.

Common Service setting we applied for all the interfaces are followed below

1. Check Command: Check_xi_service_mrtgtraf

2. Command View: $USER1$/check_rrdtraf -f /var/lib/mrtg/$ARG1$ -w $ARG2$ -c $ARG3$ -l $ARG4$

3. $ARG1$: 10.10.10.2_1023.rrd

4. $ARG2$: 500.00,500.00

5. $ARG3$: 800.00,800.00

6. $ARG4$: M

Please find the attachment of Bandwidth service settings.jpg for reference.

Kindly do the needful, Let us know if you require any more details.


Thanks,
Kondal Reddy
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Bandwidth Performance Graphs Issue

Post by lmiltchev »

What is the output of the following command?

Code: Select all

/usr/local/nagios/libexec/check_rrdtraf -f '/var/lib/mrtg/10.10.10.2_1023.rrd' -w 500.00,500.00 -c 800.00,800.00 -l M
Have you tried troubleshooting the issues by following the steps, outlined in the KB articles listed below?

https://support.nagios.com/kb/article.php?id=10

https://support.nagios.com/kb/article.php?id=29
Be sure to check out our Knowledgebase for helpful articles and solutions!
[email protected]
Posts: 34
Joined: Mon Sep 26, 2016 1:37 pm

Re: Bandwidth Performance Graphs Issue

Post by [email protected] »

Output:

Code: Select all

[root@cs1-prd-cmn-nag01 /]# /usr/local/nagios/libexec/check_rrdtraf -f '/var/lib/mrtg/10.10.10.2_1023.rrd' -w 500.00,500.00 -c 800.00,800.00 -l M
OK - Current BW in: 0Mbps Out: 0Mbps|in=0Mb/s;500.00;800.00 out=0Mb/s;500.00;800.00

Code: Select all

[root@cs1-prd-cmn-nag01 mrtg]# LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
[root@cs1-prd-cmn-nag01 mrtg]# time LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg

real    0m7.657s
user    0m1.396s
sys     0m0.105s

Increased Forks value 4 to 8 and restart crond service, No change.

Edited the SNMP configuration Incorrect steps to one of the switch added in Nagios XI, no change.

Tried the two links before reaching you, did not got any change in graph.
Last edited by tmcdonald on Tue Oct 04, 2016 10:51 am, edited 2 times in total.
Reason: Please use [code][/code] tags around terminal output
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Bandwidth Performance Graphs Issue

Post by ssax »

Please send the output of these commands:

Code: Select all

ls -l /var/lock/
ls -l /var/lock/mrtg
tail /var/log/cron
cat /etc/cron.d/mrtg
Are you seeing anything that may be related in your /usr/local/nagios/var/npcd.log, /usr/local/nagios/var/perfdata.log, or in /usr/local/nagiosxi/var/perfdataproc.log?

Thank you
[email protected]
Posts: 34
Joined: Mon Sep 26, 2016 1:37 pm

Re: Bandwidth Performance Graphs Issue

Post by [email protected] »

[root@cs1-prd-cmn-nag01 ~]# ls -l /var/lock/
total 4
-rw-r--r-- 1 root root 11 Sep 11 02:10 asound.state.lock
drwx------ 2 root root 60 Sep 12 01:20 iscsi
-rw-r--r-- 1 root root 0 Sep 12 01:20 kdump
drwxrwxr-x 2 root lock 40 Sep 11 02:10 lockdev
drwx------ 2 root root 40 Sep 12 01:20 lvm
drwxr-xr-x 2 root root 40 Oct 5 12:30 mrtg
drwxr-xr-x 2 root root 40 Sep 11 02:10 ppp
drwxr-xr-x 2 root root 140 Sep 12 01:20 subsys



[root@cs1-prd-cmn-nag01 ~]# ls -l /var/lock/mrtg/
total 0



[root@cs1-prd-cmn-nag01 ~]# tail /var/log/cron
Oct 5 12:32:01 cs1-prd-cmn-nag01 CROND[10739]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php > /usr/local/nagiosxi/var/sysstat.log 2>&1)
Oct 5 12:32:01 cs1-prd-cmn-nag01 CROND[10742]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/nom.php > /usr/local/nagiosxi/var/nom.log 2>&1)
Oct 5 12:33:01 cs1-prd-cmn-nag01 CROND[12035]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php > /usr/local/nagiosxi/var/cleaner.log 2>&1)
Oct 5 12:33:01 cs1-prd-cmn-nag01 CROND[12037]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php > /usr/local/nagiosxi/var/feedproc.log 2>&1)
Oct 5 12:33:01 cs1-prd-cmn-nag01 CROND[12041]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/nom.php > /usr/local/nagiosxi/var/nom.log 2>&1)
Oct 5 12:33:01 cs1-prd-cmn-nag01 CROND[12042]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php > /usr/local/nagiosxi/var/cmdsubsys.log 2>&1)
Oct 5 12:33:01 cs1-prd-cmn-nag01 CROND[12044]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php > /usr/local/nagiosxi/var/perfdataproc.log 2>&1)
Oct 5 12:33:01 cs1-prd-cmn-nag01 CROND[12049]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php > /usr/local/nagiosxi/var/reportengine.log 2>&1)
Oct 5 12:33:01 cs1-prd-cmn-nag01 CROND[12052]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php > /usr/local/nagiosxi/var/eventman.log 2>&1)
Oct 5 12:33:01 cs1-prd-cmn-nag01 CROND[12053]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php > /usr/local/nagiosxi/var/sysstat.log 2>&1)




[root@cs1-prd-cmn-nag01 ~]# cat /etc/cron.d/mrtg
*/5 * * * * root /root/mrtg.sh
#*/5 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok




Yes, I am able to see /usr/local/nagios/var/npcd.log, /usr/local/nagios/var/perfdata.log files

-rw-r--r--. 1 nagios nagios 1047 Sep 12 01:20 npcd.log
-rw-rw-r--. 1 nagios nagios 1078 Sep 11 05:34 perfdata.log


Thanks
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Bandwidth Performance Graphs Issue

Post by lmiltchev »

It seems like you commented out the "default" mrtg cron command, and added a custom script...
[root@cs1-prd-cmn-nag01 ~]# cat /etc/cron.d/mrtg
*/5 * * * * root /root/mrtg.sh
#*/5 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
I am not sure that is going to be a supported Nagios XI instance. Can you show us the script?

Code: Select all

/root/mrtg.sh
Be sure to check out our Knowledgebase for helpful articles and solutions!
[email protected]
Posts: 34
Joined: Mon Sep 26, 2016 1:37 pm

Re: Bandwidth Performance Graphs Issue

Post by [email protected] »

We are running MRTG on the same machine where Nagios XI is installed.

The mrtg.sh script file I created for MRTG.

Output:
#!/bin/bash

LOCK=/var/lock/mrtg/mrtg_l
CONFCACHE=/var/lib/mrtg/mrtg.ok

env LANG=C /usr/bin/mrtg /etc/mrtg/dpix-sf-02.cfg --lock-file $LOCK --confcache-file $CONFCACHE
env LANG=C /usr/bin/mrtg /etc/mrtg/wm3600-dpix-co.cfg --lock-file $LOCK --confcache-file $CONFCACHE
env LANG=C /usr/bin/mrtg /etc/mrtg/dpix-datacenter-2.cfg --lock-file $LOCK --confcache-file $CONFCACHE
env LANG=C /usr/bin/mrtg /etc/mrtg/dpix-datacenter-1.cfg --lock-file $LOCK --confcache-file $CONFCACHE
env LANG=C /usr/bin/mrtg /etc/mrtg/dpix-CamNet1-SubFab.cfg --lock-file $LOCK --confcache-file $CONFCACHE
env LANG=C /usr/bin/mrtg /etc/mrtg/dpix-CamNet-Mez.cfg --lock-file $LOCK --confcache-file $CONFCACHE
env LANG=C /usr/bin/mrtg /etc/mrtg/dpix-shd-mes.cfg --lock-file $LOCK --confcache-file $CONFCACHE
env LANG=C /usr/bin/mrtg /etc/mrtg/dpix-idnet-dc.cfg --lock-file $LOCK --confcache-file $CONFCACHE
env LANG=C /usr/bin/mrtg /etc/mrtg/dpix-sf-01.cfg --lock-file $LOCK --confcache-file $CONFCACHE
env LANG=C /usr/bin/mrtg /etc/mrtg/dpix-mz-01.cfg --lock-file $LOCK --confcache-file $CONFCACHE
env LANG=C /usr/bin/mrtg /etc/mrtg/dpix-svr-01.cfg --lock-file $LOCK --confcache-file $CONFCACHE
env LANG=C /usr/bin/mrtg /etc/mrtg/dpix-core-01.cfg --lock-file $LOCK --confcache-file $CONFCACHE
env LANG=C /usr/bin/mrtg /etc/mrtg/S8-Bonded-Core.cfg --lock-file $LOCK --confcache-file $CONFCACHE
env LANG=C /usr/bin/mrtg /etc/mrtg/cs1-prd-cmn-fw1.cfg --lock-file $LOCK --confcache-file $CONFCACHE
env LANG=C /usr/bin/mrtg /etc/mrtg/Shoretel-VPN.cfg --lock-file $LOCK --confcache-file $CONFCACHE



I did not created any thing like this for Nagios XI, Should I UN-comment that line.

Please give the examples to add lines for devices in /etc/cron.d/mrtg, If required.


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

Re: Bandwidth Performance Graphs Issue

Post by tgriep »

Since the cron tab entry calls a script and is may not have the config files for that device in it, let's put it back so it will not cause problems now and in the future.

Edit this file

Code: Select all

/etc/cron.d/mrtg
Change this from

Code: Select all

*/5 * * * * root /root/mrtg.sh
#*/5 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
to

Code: Select all

#*/5 * * * * root /root/mrtg.sh
*/5 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
Also, make sure the MRTG application is upgraded by following this article.
https://support.nagios.com/kb/article.php?id=511

Wait for about 15 minutes for the bandwidth information to update, if they do not, run the following and post the /tmp/mrtg.txt file.

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg -debug=cfg,base &> /tmp/mrtg.txt
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Bandwidth Performance Graphs Issue

Post by tgriep »

I forgot one step, You may want to copy the device cfg files from the /etc/mrtg folder to the /etc/mrtg/conf.d folder if they are still needed so the default settings will pick them up.
Be sure to check out our Knowledgebase for helpful articles and solutions!
[email protected]
Posts: 34
Joined: Mon Sep 26, 2016 1:37 pm

Re: Bandwidth Performance Graphs Issue

Post by [email protected] »

[root@cs1-prd-cmn-nag01 mrtg]# LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
[root@cs1-prd-cmn-nag01 mrtg]# LANG=C LC_ALL=C /usr/bin/mrtg
Usage: mrtg <config-file>

mrtg-2.17.4 - Multi Router Traffic Grapher

Copyright 1995-2006 by Tobias Oetiker
Licensed under the Gnu GPL.

If you want to know more about this tool, you might want
to read the docs. You can find everything on the
mrtg website:

http://oss.oetiker.ch/mrtg/



Yes I got the output by UN-commenting

/etc/cron.d/mrtg

*/5 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok



Actually I added all the nodes with SNMPv3 except one, Which is added with SNMPv2.

Please find the attached screen shots of the node which added with v2 and getting output. (Bandwidth & Bandwidth 1)


I just followed your article https://support.nagios.com/kb/article.php?id=29

steps:

SNMP Configuration Incorrect

Older verions of the Switch Wizard called mrtg with arguments for SNMPv2c, which MRTG does not use. Here is an example of an incorrect setting from a config file in /etc/mrtg/conf.d/:

Target[www.hostaddress.com]: 1:[email protected]:::::2c

Notice that after the multitude of colons, there is a 2c, this represents the SNMP version MRTG will use to poll the device. If this is instead 2c, change it to 2 and save the file. This will need to be done to every metric that is affected by being created with 2c. Entries should look like:

Target[www.hostaddress.com]: 1:[email protected]:::::2


Testing on one node which is added with v3 and made changes as above, I got the graph and it went back IN/OUT to zero 0 after few minutes.Observed about an hour, still no output.

Find attachments of testing screen shots as Test1.

Please help me to get it continuously.


Thanks
You do not have the required permissions to view the files attached to this post.
Locked