4

I have installed Nagios in my ec2 server. Now I want to install check_snmp plugin. I found that this is not available in :

/usr/local/nagios/libexec

I tried :

sudo apt-get install nagios-plugins-snmp

But I'm getting :

E: Unable to locate package nagios-plugins-snmp

How can I install the plugins?

Thanks in advance.

3

This is in the nagios-plugins-standard package. I'd suggest installing the nagios-plugins package, as that will install it, as well as the nagios-plugins-basic package:

sudo apt-get install nagios-plugins

Then, your SNMP plugin will be available in:

/usr/lib/nagios/plugins/check_snmp
  • +1 for the answer...If I do that, I'm getting this : 0 upgraded, 0 newly installed, 0 to remove and 33 not upgraded. – batman Jul 31 '12 at 5:41
  • So you already have the check_snmp plugin then? Can you not find it at /usr/lib/nagios/plugins/? – Jeremy Kerr Jul 31 '12 at 6:01
  • Actually I use nagios3 version. There is nothing in /usr/lib/nagios3/. I need to install plugin for nagios3 and not in nagios (which is also installed in my system). Is there any way I can configure my nagios3 to take up plugins from /usr/lib/nagios/plugins/ in nagios.cfg file? – batman Jul 31 '12 at 7:16
1

On your monitoring server:

sudo apt-get install nagios-plugins

All standarded plugins will be installed in

/usr/lib/nagios/plugins/

Not in

/usr/lib/nagios3/

Please see Nagios - Official Ubuntu Documentation in the section of "Configuration Overview"

Then in

/etc/nagios-plugins/config/

you will find snap.cfg, which assigns each command_line a correspondent command_name.

For example

define command{
    command_name    snmp_load
    command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o .$
    }
0

If you install nagios 4 following this tutorial http://sharadchhetri.com/2014/02/08/install-and-configure-nagios-core-4-on-ubuntu-12-04-lts/", then your installation directory is "/usr/local/nagios". On starting nagios and browsing to nagios admin portal, you could see the following errors

  • (No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_ping
  • (No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_users
  • (No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_http

This is how I fixed the above errors, Install plugins

sudo apt-get install nagios-plugins

This will install all plugins to /usr/lib/nagios/plugins directory.

Just copy all files starting with check_* to /usr/local/nginx/libexec.

cp /usr/lib/nagios/plugins/check_* /usr/local/nagios/libexec

and wait for nagios to reload/refresh browser window

0

I had this same issue and found the problem.

The point is that when you have installed the nagios-plugins, you shouldn't had net-snmp and net-snmp-utils packages installed at all. And thats why check_snmp were not compiled.

For fix this, you have to install net-snmp and net-snmp-utils and after that compile/install nagios-plugins again.

FYI: copy paste from another forum Ahmed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.