Re: Alternative to NRPE for Linux monitoring with Nagios Cor
Posted: Thu Jul 07, 2016 6:09 am
Good afternoon,
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:
I added the following to commands.cfg:
From the command prompt, the command /usr/local/nagios/libexec/check_nrpe -H 99.99.99.99 -c check_sda
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:
When I verify and restart Nagios, the host specified in Linux.cfg is correctly displayed in the web interface, but the status information shows:
The other services for check_load, check_users, check_total_procs, check_xombie_process are also specified in Linux.cfg (omitted here for ease of viewing), but they all show the same error message too.
Any suggestions as to where I might be going wrong, please?
Thanks in advance
Pete
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