Setup SNMP to monitor Cisco switch

(Frankie) #1

Hi there,

I have already finished setting up icinga2, director. Now I need to setup the SNMP service to monitor some Cisco switches, can anyone point me to the docs or samples?


#2 :wink:

I would recommend using check_nwc_health:
and/or the manubulon plugins

Both already have their commands define inside the icinga2 ITL and thus should already be in the Icinga Director for further use.
Create templates for the checks using the commands and then apply the services to your hosts.

Remember to configure SNMP on the switches :wink:

(francisco) #3

Thanks for the reply. I am trying to use the recommended plugin, however when I setup the host and service conf files I then get an error like this

execvpe(/usr/lib/nagios/plugins/check_nwc_health) failed: No such file or directory

What I did was download the check_nwc_health plugin and install it. I placed it on a direcory and then I added the line

const CustomPluginDir = “/usr/lib/nagios/pluginsCustom/check_nwc_health/plugins-scripts”

But I think I did wrong since the plugin is already installed on some other directory.

I any case i created a host and two services following this posts information Check_nwc_health trigger points

but when i restart icinga i get

I dont know what am i doing wrong.


If you use the already existing nwc_health command that is imported from the icinga2 template library, icinga2 expects the plugin to be in /usr/lib/nagios/plugins.

Command definition from nwc_health:

object CheckCommand "nwc_health" {
    import "plugin-check-command"
    command = [ PluginDir + "/check_nwc_health" ]

where PluginDir is/usr/lib/nagios/plugins by default (defined in /etc/icinga2/constants.conf)

So just move the script to that folder and everything should work.

If you really want to go with a separate location for custom plugins you will have to re-create/clone the commands from the ITL and modify the path to the plugin