Temperature sensor plugin help
Temperature sensor plugin help
Hello, I purchased temperature sensors from a company called serverscheck and I wanted to integrate them into nagios. They have thier own plugin to do this however I am not sure exactly how to set it up. Any help would be much appreciated. The link to the plugin is here: http://www.serverscheck.com/sensors/nagios.asp
Re: Temperature sensor plugin help
The rough outline is that you'll need to copy the plugin to your nagios plugins directory, on a source install this is /usr/local/nagios/libexec.
Create a new command definition:
http://nagios.sourceforge.net/docs/3_0/ ... ml#command
Create a new service definition:
http://nagios.sourceforge.net/docs/3_0/ ... ml#service
Make sure these new configs are seen by the main nagios.cfg file, verify the config, and restart nagios.
Create a new command definition:
http://nagios.sourceforge.net/docs/3_0/ ... ml#command
Create a new service definition:
http://nagios.sourceforge.net/docs/3_0/ ... ml#service
Make sure these new configs are seen by the main nagios.cfg file, verify the config, and restart nagios.
Re: Temperature sensor plugin help
Thank you very much for your help however do I need to define a host as well? Also, when defining the service, what would I put for use, service_description, and check_command?
Re: Temperature sensor plugin help
The service should belong to a host, yes. You can assign it to an existing host or define a new one. For check_command you would put the name of your command definition, as well as any arguments it might take, separated by exclamation marks. The service_description is a human-readable name for the service, it can be anything.
Re: Temperature sensor plugin help
Guys I am still having trouble getting this to work, I am getting an error of (Return code of 126 is out of bounds - plugin may not be executable) . I pasted the config file (from Serverscheck) in /usr/local/nagios/etc/objects, which contains a defined host and services. I then pasted the perl plugin file in /usr/local/nagios/libexec folder. I also made a command in the command.cfg file stating this:
define command{
command_name check_sensor
command_line $USER1$/check_sensor.pl -h $HOSTADDRESS$ $ARG1$
}
I enabled snmp on the device but disable the snmp trap.
Any ideas on what I am doing wrong?
define command{
command_name check_sensor
command_line $USER1$/check_sensor.pl -h $HOSTADDRESS$ $ARG1$
}
I enabled snmp on the device but disable the snmp trap.
Any ideas on what I am doing wrong?
Re: Temperature sensor plugin help
I have not recieved any response to this inquiry, is there anyone that can help me out with this issue? It would be greatly appreciated. Thanks
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Temperature sensor plugin help
Does the plugin have the correct execution policies for your user?
Code: Select all
ls -l check_sensor.plRe: Temperature sensor plugin help
-rwxrwxrwx 1 nagios nagios 967 2012-09-19 11:36 check_sensor.pl
Re: Temperature sensor plugin help
Can anyone please help?
Re: Temperature sensor plugin help
What do you get from running this from the command-line as the nagios user?
Code: Select all
cd /usr/local/nagios/libexec
su nagios -c './check_sensor.pl'