Page 1 of 1

Service checks aren't reporting client details

Posted: Fri Jul 17, 2015 11:14 am
by daryl388terry
I have a Nagios 3.5.1 built using the community nagios and nrpe cookbooks running on AWS linux.

I have gotten to the point where I can bootstrap a new Nagios server and have it come up fully configured without intervention.

The issue I have is that my core service checks for all my clients appear to report the same information. In fact it's the information from the Nagios server. Here are some examples.

Host 1
disk
OK 2015-07-17 15:09:01 0d 18h 58m 35s 1/3 DISK OK - free space: / 5863 MB (74% inode=84%): /dev 1876 MB (99% inode=99%): /dev/shm 1884 MB (100% inode=99%):
load
OK 2015-07-17 15:09:52 0d 18h 57m 44s 1/3 OK - load average: 0.00, 0.01, 0.05


Host 2
disk
OK 2015-07-17 16:02:04 1d 19h 5m 32s 1/3 DISK OK - free space: / 5863 MB (74% inode=84%): /dev 1876 MB (99% inode=99%): /dev/shm 1884 MB (100% inode=99%):
load
OK 2015-07-17 16:03:06 1d 19h 4m 30s 1/3 OK - load average: 0.00, 0.01, 0.05


Nagios server
disk
OK 2015-07-17 15:56:46 1d 18h 12m 38s 1/3 DISK OK - free space: / 5863 MB (74% inode=84%): /dev 1876 MB (99% inode=99%): /dev/shm 1884 MB (100% inode=99%):
load
OK 2015-07-17 15:56:05 1d 18h 16m 21s 1/3 OK - load average: 0.00, 0.03, 0.05

Is there something I have missed in a config file that may address this?

Thanks in advance
Daryl

Re: Service checks aren't reporting client details

Posted: Fri Jul 17, 2015 12:40 pm
by jolson
Interesting. A good start would be taking a look at the relevant config files. Please post the .cfg files for host 1, host 2, and the Nagios Server. Be sure to include both the host and service configurations of the hosts you mentioned.

Re: Service checks aren't reporting client details

Posted: Fri Jul 17, 2015 1:57 pm
by daryl388terry
Thanks for the reply Jolson,

Please forgive my ignorance but RTFM is offline at Sourceforge at the moment.

Here are some excerpts from my nagios server configs.

commands.cfg
define command {
command_name check_load
command_line $USER1$/check_load -r -w 3.6,2.8,2.0 -c 4.0,3.2,2.4
}

hosts.cfg
define host {
use server
host_name base-nrpe-dev-22236
hostgroups base-nrpe,dev,linux
address 10.13.22.236
}

services.cfg
define service {
use default-service
service_description load
hostgroup_name all
check_command check_load
}

I have a basic nrpe config on the client.

nrpe.cfg
pid_file=/var/run/nrpe.pid
server_port=5666

nrpe_user=nrpe
nrpe_group=nrpe
dont_blame_nrpe=0
debug=0
command_timeout=60

allowed_hosts=10.13.14.176,10.13.4.122,127.0.0.1
include_dir=/etc/nagios/nrpe.d


I was under the impression that this basic config should allow the Nagios server to talk to nrpe on the client and run check_load. The more I read on the net it looks like I may need to define the checks on the client side for check cpu, memory, and local process items. Is that the general direction.

thanks in advance.

Daryl

Re: Service checks aren't reporting client details

Posted: Fri Jul 17, 2015 2:06 pm
by ssax
The check_load command will only run the plugin on the Nagios Host, the plugin needs to be installed on the remote host, defined in the nrpe config, and then you run the check_nrpe -a check_load command to run it remotely on the remote host.