7

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.

Jason C
  • 948
batman
  • 8,071

4 Answers4

5

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
Jeremy Kerr
  • 27,829
2

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 .$
    }
peizhao
  • 141
2

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

Thomas
  • 6,433
1

If you install nagios 4 following this tutorial, 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

Gryu
  • 8,002
  • 9
  • 37
  • 53
Kenshin
  • 251