Page 1 of 1
Rerunning Switch Wizard
Posted: Fri Jun 19, 2015 11:20 am
by CFT6Server
I have configured switches using the network wizard and I went to rerun it to capture additional ports. However when I do, it will not apply configuration properly and will fail. When I go to check services, the service is created. However, when I check the host / services, it is now empty and shows nothing in my services for the host. I basically have to deactivate all services for that host and reactivate them in order to get the services back.
Perhaps this is not the way to add additional ports? Any advice? (The host also has 700+ service checks, as there are a lot of ports to monitor. Could it be the number of service checks?) Going back to deactivate the added port and applying configuration takes a VERY long time... and I am hoping that something isn't corrupted by doing this.
apply config.JPG
The error that shows up is
Code: Select all
Error: Contactgroup 'UCS admins' is not defined anywhere
Error: Could not add contactgroup 'UCS admins' to host (config file '/usr/local/nagios/etc/hosts/kdcbchucs01-a network.cfg', starting on line 16)
however the host config is fine and the contactgroup is there (since the host/services was running already and I am just rerunning to add more ports)
Re: Rerunning Switch Wizard
Posted: Fri Jun 19, 2015 12:01 pm
by lmiltchev
If you need to rerun the switch wizard and add additional ports, you will need to remove previous configs for this particular device, mrtg scans, etc. Please, review the document below:
https://assets.nagios.com/downloads/nag ... Router.pdf
Re: Rerunning Switch Wizard
Posted: Fri Jun 19, 2015 2:11 pm
by CFT6Server
Is there anyway we can retain the MRTG configurations? This is because the wizard's default port name or number options do not provide us with what we need. We are manually updating the port names after the scan is done during step 2 of the wizard. If we following this, we would end up creating different service checks due to different names.
I just want to be able to capture the difference/new ports. Any suggestions?
Re: Rerunning Switch Wizard
Posted: Sun Jun 21, 2015 7:22 pm
by Box293
The config file for the device lives in /etc/mrtg/conf.d/xxxxx.cfg
CFT6Server wrote:I have configured switches using the network wizard and I went to rerun it to capture additional ports
Are you talking about ports you didn't previously monitor because the didn't physically exist in the switch? If this is the case you'll need to update the cfg file.
Open the file.
The third line shows the command used to create the file.
Execute this command again but add --output=/tmp/test.cfg to the end
Now you have an updated mrtg file.
You can find the additional ports in this file and add them to the existing file
Then the other part is to go into CCM and copy an existing service and modify it so it works for the addional ports.
If you are wanting to monitor additional ports that previously physically existed but you didn't select them in the wizard, they will already exist in the cfg file. In this case all you need to do is to go into CCM and copy an existing service and modify it so it works for the addional ports.
Does this make sense?
Re: Rerunning Switch Wizard
Posted: Mon Jun 22, 2015 12:01 pm
by CFT6Server
It does and thanks for the tip. Just that this is a very manual process and does not provide a good way to have us maintain these switches. The port assignment changes or could be added and we are looking for a way to make sure we catch those. Re-running the wizard will help with the port labels etc as we are labeling the ports via ifalias.
We have tons of ports and some aren't used, so they are not adding in the beginning when the wizard is ran. But new ports might be assigned or changed, and we need to have an efficient way to update them. manually copying or creating services might not be the best option here, as we have hundreds of ports being checked.
Any suggestions? What is a recommended approach for large organizations or customers of Nagios are doing?
Re: Rerunning Switch Wizard
Posted: Mon Jun 22, 2015 5:06 pm
by jdalrymple
Unfortunately the check_mrtgtraf switch/router wizard is the most convoluted mess we have in XI - and it works, but it's convoluted.
We have a new component coming in the next major release that will ease your pain. It simplifies the whole process and does away with mrtg. That doesn't help today, but unfortunately because that feature is pending release it seems somewhat senseless to request a feature to fix the existing process. For now the best option is manual intervention I'm afraid.
Before you ask when the next major release is - we don't know

The Developers have high hopes, and are shooting us tons of testing tasks - so this bodes well. No promises have been made one way or the other though.