Page 1 of 1

network switch ports

Posted: Fri Mar 11, 2011 11:14 am
by pbernardi
Hi, I am having a similar issue with the wizard as described here:
http://support.nagios.com/forum/viewtop ... very#p5100

I wanted to add a port, I tried it manually and was getting the "rrd does not exist" error described here:
http://support.nagios.com/forum/viewtopic.php?f=6&t=940

Then, following the first link I decided to delete the host and all its services. I got the latest version of the network wizard and ran that. It, however, still only discovers the ports that I deleted, not any new ones in use since the original scan many months ago.

Any suggestions on how I can get the scan to work? I am not monitoring that switch or any other switch at the moment so I do not mind deleting stuff.

This is version 2009R1.4B running on one of your downloaded VMs.

Thanks.

Re: network switch ports

Posted: Fri Mar 11, 2011 8:02 pm
by admin
The switch wizard caches scan data in the following directory:

Code: Select all

/usr/local/nagiosxi/tmp
You should see files in that directory that correspond to your switch(es). For example:

Code: Select all

/usr/local/nagiosxi/tmp/mrtgscan-192.168.1.253
/usr/local/nagiosxi/tmp/mrtgscan-192.168.1.253.done
/usr/local/nagiosxi/tmp/mrtgscan-192.168.1.253_l
/usr/local/nagiosxi/tmp/mrtgscan-192.168.1.254
/usr/local/nagiosxi/tmp/mrtgscan-192.168.1.254.done
Delete the files that have a pattern that matches the IP address of your switch. You may also have to remove the appropriate configuration from the MRTG config file (/etc/mrtg/mrtg.cfg).

Once that is done, the switch wizard will do a "fresh" scan of the switch.

Re: network switch ports

Posted: Mon Mar 14, 2011 11:22 am
by pbernardi
well, it is almost better. For the new port that I wanted to monitor, ping and port status are ok.
For bandwidth, however, i still get the following error: /var/lib/mrtg/10.10.10.1_11125.rrd does not exist.

I removed the files in /usr/local/nagiosxi/tmp/ that referenced the IP of the switch. I also renamed mrtg.cfg.

Any ideas?
Thanks.

Re: network switch ports

Posted: Tue Mar 15, 2011 8:39 am
by pbernardi
if i go to the /var/lib/mrtg directory I do not see the associated .rrd for the port in question.

How is that file generated and is there a way I can do it manually?

Re: network switch ports

Posted: Tue Mar 15, 2011 3:04 pm
by mguthrie
I don't actually know off hand how mrtg generates it's config files, but I know the wizard runs "cfgmaker" which generates an mrtg configuration, located in /etc/mrtg/mrtg.cfg, and then the wizard parses that file for information. I know people have modified the cfgmaker call made by the wizard at times, but I couldn't tell you the exact steps to take....

Let me know if that points you in the right direction

Re: network switch ports

Posted: Thu Mar 17, 2011 9:21 am
by pbernardi
oki, I couldn't find any cfgmaker so I edited the mrtg.cfg file and uncommented the port in question. Then, I copied another .rrd file and named it after the one it was looking for. It is now up, now I am just curious if the bandwidth will be for the correct port or if it is mirroring the port that I copied the .rrd file from.

Any ideas?

Re: network switch ports

Posted: Fri Mar 18, 2011 9:39 am
by mguthrie
I don't actually know, I haven't tried that method before, so you'll have to compare the graphs and see.

cfgmaker is installed on your XI system. Type

Code: Select all

man cfgmaker 
for usage instructions.