How to add/reconfig network switches and ports

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

How to add/reconfig network switches and ports

Post by CFT6Server »

We have used the network switch wizard to add our switches as well as network ports on our UCS infrastructure. My question is, how do I 're-run' or reconfig the ports? I would like to see how others are tackling these day to day issues:

1. Update any changes (ie. add ports or replace ports)
2. Go through what's added or remove automatically (perhaps by re-running the wizard) as we have hundreds of ports per UCS chassis.
3. If ports updates and the index numbers changes, then how do we update and maintain previous mrtg graphs

If I run the wizard again over top of the current configuration, sometimes it picks up new ports, but it won't overwrite or fix any updated ports. But I am struggling in trying to maintain or keeping the configuration current, and we don't want to erase the existing configuration and data.

Looking for some advice or direction. Thanks.....
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: How to add/reconfig network switches and ports

Post by Box293 »

You can run the wizard and select new ports to monitor and this will create the services in CCM however it won't updated the config file in /etc/mrtg/conf.d/.

cfgmaker is how the Wizard configures mrtg.cfg
Run cfgmaker @ CLI to generate a config file
Add the contents of the config file to the existing mrtg.cfg (specifically the port you are after).

Code: Select all

cfgmaker --noreversedns “[email protected]" --output=output.txt
If you look at one of your existing files in /etc/mrtg/conf.d/ and one of the lines at the top of the file will be similar to above, except it won't have --output=output.txt.
CFT6Server wrote:3. If ports updates and the index numbers changes, then how do we update and maintain previous mrtg graphs
Thats really hard to deal with, contact the manufacturer and see if there is a way to stop this behaviour.

You could use this tool I created called the Performance Data Tool, it will allow you to merge data in RRD file.

http://exchange.nagios.org/directory/Ad ... ol/details

Upload it into Nagios XI via Admin > System Extensions > Manage Components.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Re: How to add/reconfig network switches and ports

Post by CFT6Server »

Thanks. Unfortunately doing this manually can be painful, as we have hundreds of network ports and our UCS infrastructure alone has a couple thousand ports that we are checking. Running mrtg manually and finding out the difference is going to be a challenge.

If we need to add in a single port or remove a port that we know of, then it is quite easy and we can do that.

As for the index numbers changing, this is because more and more networks are virtually assigned. UCS for example assigns an index number to the vNICs and vHBAs for all of its chassis and blades, so when a profile gets removed and added, it is natural for the index number to change. I guess this could be a limitation for the time being, but I wanted to find out if there are any workarounds or plans to address issues like this?

How are other users of Nagios managing their changing environment and making sure the network ports/bandwidth are kept up to date?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: How to add/reconfig network switches and ports

Post by ssax »

Please read through the section "Interface by IP" and the other Interface by sections at this link and let me know which would work best for you:

http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Re: How to add/reconfig network switches and ports

Post by CFT6Server »

We identify most of our network ports by name, so I believe Description will work best. A note: we using ifAlias for our port names and sometimes if there are duplicates, we do add in a number so that configurations are created for each interface.

Example of duplicates and what we rename to:
example wizard.JPG
Uplink.JPG
And then description vs alias (we use alias)
alias.JPG
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: How to add/reconfig network switches and ports

Post by ssax »

I've modified this component to use "name,descr,nr" (in that order) for MRTG file creation and for the status checks to use the name instead of the number, just check the box that says "Use Interface Names for MRTG and Port Status" and it should do what you want.

Just go to Admin > Manage Config Wizards
- Click the Browse button and select the switch.zip file.
- Click the Upload Wizard button and it should install for you.
switch.zip
Let me know if that works for you.

Thank you
You do not have the required permissions to view the files attached to this post.
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Re: How to add/reconfig network switches and ports

Post by CFT6Server »

Thanks! Let me try this out and report back.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: How to add/reconfig network switches and ports

Post by hsmith »

Let us know how it works out. Thanks!
Former Nagios Employee.
me.
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Re: How to add/reconfig network switches and ports

Post by CFT6Server »

So I've been testing this updated switch wizard and there are some issues. I've tested multiple scenarios and this is what I've found:

Setup 1 - device A with initial setup using the original wizard options
Setup 2 - device B with initial setup using the updated option checked

For interfaces that it detects as "new" (so either initial scan or subsequent scan/add)
Error message on interface status:
UNKNOWN: could not retrive ifdescr/iftype snmpkey - 0-0

The port names in these instances are
fc1/47 Status
Ethernet6/1/33
U: Uplink Status

This name seems to be ok: port-channel1025 Status
unknown.JPG
But then I have this which seems to show up correctly and status check is fine: "server 1/8 VNIC ESX_NFS_A Status" so not sure what that means?

I will put this into our production and do a scan of the existing inventory to do further testing.
You do not have the required permissions to view the files attached to this post.
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Re: How to add/reconfig network switches and ports

Post by CFT6Server »

Looks like the working checks were leftovers from previous configurations. I removed the mrtg config and lib files for the host/services, and looks like I am getting these errors.
unknown.JPG
I think the created rrd files are all in lower case and the name in XI is in its original form. For example:
kdcbchucs02-a_Ethernet1_1_1.rrd in XI
kdcbchucs02-a_ethernet1_1_1.rrd in /var/lib/mrtg

Once I renamed it in the config, it is working. Looks like the code just needs a slight updating to address this. However, the unknown error - UNKNOWN: could not retrive ifdescr/iftype snmpkey - 0-0 message still exists. In the old status check, it is calling the interface number with -k. With the newer check, it is using -d with "Ethernet1_1_1". Looks like this is where it is breaking.
You do not have the required permissions to view the files attached to this post.
Locked