If you want your nagios server to perform passive checks, use nsca.
If you want your nagios server to perform active checks, use nrpe.
So, which do you want?
With passive checks, the actual check is performed by the remote host, and the results is sent to nagios server as a passive check.
With an active check, the nagios server spends the time to make the check actively by connecting to the remote host, making the check, and then handling the resutls.
To use either one, the README file included spells it out pretty well, on just how to use them.
No, you don’t have to use nsca if you don’t want to.
The plugin, check_disk, is a local check, so no -H option.
If you want, you can run the check locally on the remote host, then pass the output of that check via nsca. See the nsca docs for more info.
Or if you prefer and active check, then run the check_disk via nrpe.
According to the nrpe readme, on the nagios server:
define service{
host_name someremotehost
service_description someremoteservice
check_command check_nrpe!yourcommand
… etc …
}where “yourcommand” is a name of a command that you define in
your nrpe.cfg file on the remote host.
on the remote host, define the “yourcommand” in nrpe.cfg
command[check_disk1]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p /dev/hda1
You must make a decision, passive or active. If you plan to have a large number of checks, then make most of them passive.
I’m getting there but now I get the following from the client:
Jan 30 15:52:06 gentest nrpe[8440]: Connection from 10.0.0.11 port 1552
Jan 30 15:52:06 gentest nrpe[8440]: Host address checks out ok
Jan 30 15:52:06 gentest nrpe[8440]: Handling the connection…
Jan 30 15:52:06 gentest nrpe[8440]: Error: Request contained command arguments, but argument option is not enabled!
Jan 30 15:52:06 gentest nrpe[8440]: Client request was invalid, bailing out…
Jan 30 15:52:06 gentest nrpe[8440]: Connection from 10.0.0.11 closed.
perhaps you should look at ./check_nrpe --help. I don’t see that you can pass a -a to nrpe.
On your nagios server you define your check as:
check_command check_nrpe!yourcommand
just like the README says to do.
On the remote host you define “yourcommand” in the nrpe.cfg like:
command[yourcommand]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p /dev/hda1
So, the remote host executes the command “yourcommand” which contains all the switches/options/etc…
Your problem is exactly what the error says: “…argument option is not enabled!”
You cannot define arguments for NRPE on your Nagios configuration unless you compile NRPE specifically to allow arguments. The way around this is to just define the arguments on the NRPE host, which I see you have done.
Your fix should be to get rid of the !20%!10%!/boot arguments in your service definition. Then make sure to restart NRPE (restarting Nagios will not be necessary).
Looks like you’ve got everything else configured correctly, though, as you’re clearly able to make a connection to the correct port on the remote host.
On nagios server:
check_command check_nrpe!check_boot
On remote host:
command[check_boot]=/usr/nagios/libexec/check_disk -w 20% -c 10% -p /boot
Glad you got it figured out. Now, to reitterate, the README file had shown this, but it can be a bit confusing. So, it’s important to not deviate from the README until you know exactly what’s going on.
No problem, and yes, the README can be a bit confusing, though that info is in there…
This is a bit of an off-hand question, but…and reason why you’ve got your notification interval set to 2440? If you’ve got interval length set to default, then that’s over 40 hours between notifications…