Page 1 of 1

check_snmp version discrepancy

Posted: Mon Dec 16, 2019 10:43 am
by nagwindmon
hello team - we have 2 Nagios both v.5.4.4 but check_snmp command versions are mismatched and causing issues when being executed. version 2.2.1 is timing out and version 2.0.3 returning what is expected.
System owner is OOO so I would like to procced very carefully and not to mess up anything a this time... any way I would assume I need to match versions but I do need some guidance how to do that please

Re: check_snmp version discrepancy

Posted: Mon Dec 16, 2019 2:19 pm
by mbellerue
I suspect that one of your Nagios instances was upgraded to 5.4.4 from an older version, and the other instance was either installed at 5.4.4, or a newer version than the first Nagios instance and upgraded from there. That would explain the discrepancy in the plugin versions.

As far as upgrading the plugins, if you're upgrading, it's generally recommended to go to the latest and greatest. The latest version of the Nagios plugins is 2.3.0, and can be found here,
https://www.nagios.org/downloads/nagios-plugins/

It would be a good idea to test out the installation process prior to running it on a production system. There is an INSTALL file in the nagios-plugins-2.3.0.tar.gz file. But before you run through the install process, you will need to delete the plugins in /usr/local/nagios/libexec/. So either test the installation process, or make sure you can roll back in case something goes wrong.

Another option might be to put the system in downtime until the system owner returns. But it would be good to get your two Nagios instances on par with one another.

Re: check_snmp version discrepancy

Posted: Mon Dec 16, 2019 2:32 pm
by nagwindmon
I want to match it and not to download the latest one but one that is working as designed - version 2.0.3, so that would be a downgrade but at least it should be working as other one. can I copy it from one Nagios instance to another or please advise how that could be done?

Re: check_snmp version discrepancy

Posted: Mon Dec 16, 2019 4:03 pm
by mbellerue
You can copy the plugins from one Nagios instance to another. But still, definitely be careful when doing this. Backups, or snapshots are going to be key. It might be worth your while to compile the plugins on the system, just to make sure that all dependencies are met. Here's the link to Nagios Plugins 2.0.3.
https://nagios-plugins.org/download/nag ... 0.3.tar.gz

Re: check_snmp version discrepancy

Posted: Tue Dec 17, 2019 9:52 am
by nagwindmon
ok, we do have a dev Nagios instance with 2.2.1 version where I'm going test it on, so I have downloaded 'nagios-plugins-2.0.3.tar.gz' file, now I need to copy it to /tmp directory and run install command? do you mind walk me thru the process?

Re: check_snmp version discrepancy

Posted: Tue Dec 17, 2019 11:26 am
by mbellerue
The INSTALL document is just a text document that describes the installation process. You'll actually be compiling the plugins, and that document describes the various compiler options. If I recall correctly, assuming all things are default and that you have already removed the existing plugins from /usr/local/nagios/libexec/, you should be able to just run,

Code: Select all

cd /tmp
tar xzf nagios-plugins-2.0.3.tar.gz
cd nagios-plugins-2.0.3
./configure
make && make install

Re: check_snmp version discrepancy

Posted: Tue Dec 17, 2019 3:28 pm
by nagwindmon
thank you mbellerue! I do appreciate your help, actually it was an issue with SNMP Trap Sender component, got fix it and good go now.

Re: check_snmp version discrepancy

Posted: Tue Dec 17, 2019 3:34 pm
by mbellerue
Most excellent! I'm glad you were able to get it working again. I will close this thread, but feel free to open a new thread if you need assistance!