Switch wizard adding everything except entry in mrtg.cfg

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Switch wizard adding everything except entry in mrtg.cfg

Post by snapon_admin »

So I've tried everything I can think of now. I'm trying to add a router, and using the wizard. I'm running XI 2012R2.9 and I know the switch wizard is working correctly for other hosts (I just added a completely different router 20 minutes ago with no issues), but this one is being a pain. After running the wizard, configmaker (I think that's what it's called) adds the rrd and xml files needed into perfdata, it adds the rrd files in var/lib/mrtg, it adds the cfg files into /usr/local/nagios/etc/hosts and services, but it does not add the router to mrtg.cfg.

Little background refresher (I've been here for mrtg issues before):
I have the separate_mrtg_configs script, which seems to be working fine. I only mention it because I don't know if it'd be relevant or not. There is also not a separate cfg file for this router in the conf.d directory if that matters.
This router is using snmpv2 (same as all of our routers, which are working)
This router was in Nagios before, but wasn't collecting bandwidth data so I decided to re-add it. I removed it from mrtg.cfg, removed all rrd and xml files in perfdata, removed all rrd files in /var/lib/mrtg, cleared mrtgscan tmp files, removed the separate cfg file from /etc/mrtg/conf.d, and removed the cfg files from the host and services directories. Basically removing all trace of the router as if I were starting from scratch. This issue cropped up when I tried to re-add it.

It should also be noted that I just did this exact process (remove completely and re-add a router) roughly 20-30 minutes ago on a different router and everything worked without issue.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Switch wizard adding everything except entry in mrtg.cfg

Post by lmiltchev »

I've seem similar issues, caused by wrong permissions of the files in the "mrtg" folder. Can you run the following command and show us the output?

Code: Select all

ll /etc/mrtg
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Switch wizard adding everything except entry in mrtg.cfg

Post by snapon_admin »

Code: Select all

[root@lisl-ngos-01-pv mrtg]# ll /etc/mrtg
total 8452
drwxr-xr-x. 2 root   root      4096 Jan 31 12:18 bkp_cfg
drw-r--r--. 2 apache nagios    4096 Feb 27 14:01 conf.d
-rw-r--r--. 1 root   root   2525277 Feb  6 13:54 mrtg.bkp
-rw-rw-r--. 1 apache nagios 3013395 Feb 27 13:37 mrtg.cfg
-rw-r--r--. 1 root   root   3012746 Feb 27 11:58 mrtg.cfg.bkp
-rw-r--r--. 1 root   root         0 Feb 27 12:47 mrtg.cfg_l_16654
-rw-r--r--. 1 root   root         0 Feb 27 12:50 mrtg.ok
-rw-r--r--. 1 apache nagios   83763 May  1  2013 router.cfg
-rw-r--r--. 1 apache nagios       0 May  2  2013 router.ok
-rwxrwxrwx. 1 apache nagios    2074 Mar 12  2013 separate_mrtg_cfgs
[root@lisl-ngos-01-pv mrtg]#
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Switch wizard adding everything except entry in mrtg.cfg

Post by lmiltchev »

Run:

Code: Select all

chown -R apache:nagios /etc/mrtg
chmod -R 775 /etc/mrtg
See if this is going to fix your issue. You may have to clear the old entries, and re-run the wizard, though. Please, follow this document:

http://assets.nagios.com/downloads/nagi ... Router.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Switch wizard adding everything except entry in mrtg.cfg

Post by snapon_admin »

Ok, I did that and I re-added the router. It added the MRTG info into the mrtg.cfg file this time, but it's still showing no bandwidth data, when I know there is traffic on that port. Thoughts?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Switch wizard adding everything except entry in mrtg.cfg

Post by lmiltchev »

It would not show anything initially. It may take up to 20-30 min. If you think you waited long enough, but still you see 0 (zero) bandwidth, there must be another issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Switch wizard adding everything except entry in mrtg.cfg

Post by snapon_admin »

It hasn't shown any data since yesterday when I added it.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Switch wizard adding everything except entry in mrtg.cfg

Post by lmiltchev »

Do you have ":::::2" or ":::::2c" in the "/etc/mrtg/mrtg.cfg"?

Code: Select all

grep :::::2 /etc/mrtg/mrtg.cfg | head -6
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Switch wizard adding everything except entry in mrtg.cfg

Post by snapon_admin »

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

Re: Switch wizard adding everything except entry in mrtg.cfg

Post by lmiltchev »

Do you get any errors, when you run the following command?

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked