First of all, thanks to everyone who added - it's moving along well now... up to a point.
I added the following to the nrpe.cfg file:
Code: Select all
command[check_sda]=/usr/local/nagios/libexec/check_disk -w 15% -c 10% -p /dev/sda
command[check_sdb]=/usr/local/nagios/libexec/check_disk -w 15% -c 10% -p /dev/sdb
Code: Select all
Define command{
command_name check_nrpe
command_line $USER1$/check_nrpe –H $HOSTADDRESS$ -c $ARG1$
}
returns:
DISK OK - free space: / 40586 MB (79% inode=92%);| /=10603MB;45839;48536;0;53929
For the purposes of testing, the monitoring checks are being carried out on the Linux host itself.
I have created a separate .cfg file (Linux.cfg) and referenced it in /usr/local/nagios/etc/nagios.cfg. It looks like this:
Code: Select all
define host {
use linux-server
host_name MyServerID
hostgroups Linux-Build
alias MyServerID
address 99.99.99.99
register 1
}
define hostgroup{
hostgroup_name Linux-Build
alias Linux-Build
}
define service{
use generic-service
hostgroup_name Linux-Build, UAT-Bet-Placement
service_description Drive Space - /dev/sda
check_command check_nrpe!check_sda
}
define service{
use generic-service
hostgroup_name Linux-Build, UAT-Bet-Placement
service_description Drive Space - /dev/sdb
check_command check_nrpe!check_sdb
}
Code: Select all
(No output on stdout) stderr: Could not resolve hostname -c: Name or service not known
Any suggestions as to where I might be going wrong, please?
Thanks in advance
Pete