Additional plugin

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
rcraig114
Posts: 11
Joined: Sun Jan 26, 2014 12:37 am

Additional plugin

Post by rcraig114 »

I'm still trying to get the hang of Nagios. I love it, but it's still above my head. I'm trying to use the plugin http://exchange.nagios.org/directory/Pl ... ad/details but I'm having a hard time integrating it into the system. I believe I need to define the service in "commands.cfg", but not sure what to put. Anyone have any suggestions?

Robert
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Additional plugin

Post by jsmurphy »

So when you download a new plugin there's two things you really need to do. The first is to define a new "command" which is generally done in commands.cfg and then you need to define a service that attaches it to a host (or hosts). It's worth noting that you can actually put the various definitions where ever you like, the various config files exist to make it sane for humans to manage ;)

First thing to do would be to run the freshly downloaded plugin with the --help switch so that you can see what options you actually want to use. Once you've done that open up commands.cfg and put in something like this:

Code: Select all

define command {
       command_name                             check_network_load
       command_line                             $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ -2 -C $ARG1$ -T $ARG2$ -w $ARG3$ -c $ARG4$ -f
}
From there you just create a service definition where ever you normally would. Common practice these days is to have a services folder and then have an individual file for each service definition which might look something like this:

Code: Select all

define service {
        service_description             CPU Load
        use                             main-service-template
        hostgroup_name                  ntw-a-cisco-device,ntw-c-cisco-device
        check_command                   check_network_load1!myCiscoCommunity!cisco!80,80,80!90,90,90!!!!
        contact_groups                  cg-ntw-main
        register                        1
        }
Hopefully this helps.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Additional plugin

Post by slansing »

Thanks jsmurphy! :)
Locked