snmp community changed no longer logging switch bandwidth

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
lilydalehs
Posts: 34
Joined: Fri May 29, 2020 7:20 pm

snmp community changed no longer logging switch bandwidth

Post by lilydalehs »

Hi All,

the community string on a number of our switches was recently changed (from the default public to something else) and now the services that were logging the bandwidth through ports on the switch is no longer getting any data.

I was able to change the community string on the services that were checking the status of those ports, as the community string was one of the arguments. However, the check bandwidth service didn't have the community string listed. The service is still polling, but returns a zero value.

How do I get this service to update with the new community string?

Regards,
Chris.

P.S. We're running version 5.2.5
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: snmp community changed no longer logging switch bandwidt

Post by tgriep »

On the Nagios server, there is a application called MRTG that gathers the bandwidth data from the devices that is used with the check_rrdtraf plugin.
The MRTG process has it's own configuration files and they would have to be edited as well to update the community string.

The configuration files are in the /etc/mrtg/conf.d folder and they are named with the IP Address of the device you are monitoring.
Edit those files and after the change, the bandwidth should start up again after 20 minutes or so.

You might be able to recreate the files quickly and here is how to do that.
If you open up one of the /etc/mrtg/conf.d file you may see a line like the following example.

Code: Select all

/usr/bin/cfgmaker --show-op-down --noreversedns --zero-speed 100000000 [email protected]:161::::2
That is the command that was used to create the cfg file.
First make a copy of the existing file in to a different folder.

Then run the following command, but replace public with the new community string. Run this from the /etc/mrtg/conf.d folder.

Code: Select all

/usr/bin/cfgmaker --show-op-down --noreversedns --zero-speed 100000000 [email protected]:161::::2 >10.174.64.159.CFG
That will overwrite the file with the new community string and allow MRTG to gather the data for the plugin.
Be sure to check out our Knowledgebase for helpful articles and solutions!
lilydalehs
Posts: 34
Joined: Fri May 29, 2020 7:20 pm

Re: snmp community changed no longer logging switch bandwidt

Post by lilydalehs »

Hi tgriep,

many thanks for the very informative reply. I used that 2nd example you showed above to re-run the configuration file and it worked a treat.

Cheers,
Chris.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: snmp community changed no longer logging switch bandwidt

Post by tgriep »

@lilydalehs, Your very welcome, glad to help.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked