I've been spoiled using NagiosXI Enterprise and in working with a smaller core3 install I'm having a difficult time getting a particular service check to work on a linux client. I have it working from command line on the core3 server but for the life of me can't seem to get the .cfg definitions right.
/usr/lib/nagios/plugins/check_nrpe -H 10.0.200.112 -c check_disk -a '-w 10% -c 5% -p /dev/sdc1'
DISK OK - free space: /dev/sdc1 1954974 MB (99% inode=99%);| /dev/sdc1=4412MB;1857819;1961031;0;2064244
How can I add the service definition for the host properly for check-disk-sdc1 below?
define host{
use generic-host
host_name client1.internal.local
alias client1
address 10.0.200.112
}
define service{
use generic-service
host_name client1.internal.local
service_description HTTP-Server
check_command check_http
}
Core3 Service Def using nrpe
Re: Core3 Service Def using nrpe
Is this the correct config? You're asking about a disk check but this is a HTTP service.zovy wrote:How can I add the service definition for the host properly for check-disk-sdc1 below?
define host{
use generic-host
host_name client1.internal.local
alias client1
address 10.0.200.112
}
define service{
use generic-service
host_name client1.internal.local
service_description HTTP-Server
check_command check_http
}
Former Nagios employee
Re: Core3 Service Def using nrpe
Yes I want to append to the disk check to this config. Sorry I didn't make that clear 
Re: Core3 Service Def using nrpe
You will need to install nagios plugins and NRPE on 10.0.200.112, and define "check_disk" in the "nrpe.cfg", i.e.
then set up a check in nagios, for example:
Code: Select all
command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$Code: Select all
define service{
use generic-service
host_name client1.internal.local
service_description Disc Usage
check_command check_nrpe!check_disk!-a '-w 10% -c 5% -p /dev/sdc1'
}Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Core3 Service Def using nrpe
Ugh ... failing miserably at getting this proper. The check returns (No output returned from plugin)
I've gone down the road of your example and found the hard coded local nrpe checks so copied the existing /dev/hda1 line and changed to match what I need:
then in the core3 server changed the host cfg file:
I did reload the nagios-nrpe-server service on the target machine and have also tested the hard coded /dev/hda1 example with the same result (no output returned from plugin). Frustrating indeed ...
I've gone down the road of your example and found the hard coded local nrpe checks so copied the existing /dev/hda1 line and changed to match what I need:
Code: Select all
command[check_sdc1]=/usr/lib/nagios/plugins/check_disk -w 40% -c 25% -p /dev/sdc1 Code: Select all
define service{
use generic-service
host_name client1.internal.local
service_description SDC1
check_command check_nrpe!check_sdc1
}
Re: Core3 Service Def using nrpe
Ha! Found it after bashing my head for a bit. The local NRPE command was expecting an argument from the core server. Thanks for your help it got me on the road to where I need to be 
Re: Core3 Service Def using nrpe
Glad to hear you're rolling on this one. Is there anything else we can do in this thread, or are we all right to close it out?
Former Nagios Employee.
me.
me.