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
  • 716
  • 2
  • 9
  • 21
batman
  • 7,851
  • 18
  • 39
  • 38

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
  • 26,769
  • 4
  • 48
  • 62
  • +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 05: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 06: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 07:16
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
  • 6
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,143
  • 12
  • 30
  • 36
Ahmed BG
  • 21
  • 1
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
  • 7,279
  • 9
  • 31
  • 52
Kenshin
  • 241
  • 1
  • 2
  • 12