Page 1 of 1
Get real names of ports on routers and switches
Posted: Tue Jan 23, 2018 1:07 pm
by sathevaner
Using the "Network Switch / Router" wizard, I have multiple routers and switches on which I am monitoring the ports using the Number instead of Description.
How do I go back and change this for existing hosts?
If the Names and/or Descriptions get updated at a later time, does this automatically reflect in Nagios?
Re: Get real names of ports on routers and switches
Posted: Tue Jan 23, 2018 4:54 pm
by npolovenko
Hello,
@sathevaner. I don't think you can change that after you already ran the wizard. Your only option would be to run the wizard one more time, this will create new checks with descriptions instead of port names.
This wizard will not automatically reflect changes in port names or descriptions.
Re: Get real names of ports on routers and switches
Posted: Wed Jan 24, 2018 10:33 am
by sathevaner
Hi
@npolovenko, are you certain about this? What I have set in place right now contains performance data that I'd hate to lose.
What about during situations when a new NIC is added to a host? Re-run the wizard? Surely, there's got to be a better way than tearing down what we have and starting over again.
Re: Get real names of ports on routers and switches
Posted: Wed Jan 24, 2018 12:41 pm
by npolovenko
@sathevaner, Yeah, I'm certain. But you could rename those ports manually using a
Bulk Renaming Tool in Core Configurations Manager. That's the only way to rename them to keep the performance data. I understand that this is not really viable if you have hundreds of ports, renaming them manually will take up some time.
Another way to do this will include rerunning the wizard against the same port's, select -> monitor using 'ports description'. The will create new checks. Then you'd use the Box293 perfdata tool to merge the old RRD's with new ones.
What about during situations when a new NIC is added to a host?
It will just create a new service check for the new NIC. It will not mess up any other checks, so there's no problem with that.
**UPDATE After some testing I found another solution. If you run a wizard with -> monitor using 'ports description' selected it will create new checks. Then using FileZilla or WinSCP open the folder /usr/local/nagios/share/perfdata/, open the appropriate host folder. In there delete the newly created XML and RRD files and rename the old RRD and XML to exactly what those new files were called. That will make the old graph automatically sync and work with new checks.