Page 1 of 1
Additional plugin
Posted: Sat Feb 15, 2014 1:24 pm
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
Re: Additional plugin
Posted: Sun Feb 16, 2014 6:04 pm
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.
Re: Additional plugin
Posted: Mon Feb 17, 2014 12:42 pm
by slansing
Thanks jsmurphy!
