Page 2 of 2

Re: NRPE plugins return null

Posted: Wed Oct 14, 2015 7:17 am
by peterg
Box293 wrote:
peterg wrote:If I run the check on the server as my user id, nagios or root it works perfectly:

Code: Select all

ubuntu@nagios01:~$ /usr/lib/nagios/plugins/check_nrpe -H 10.99.1.6 -c check_users
USERS OK - 1 users currently logged in |users=1;5;10;0
However, in Nagios the service status is 'WARNING' and the Status Information field is '(null)' for all my nrpe checks. Localhost checks, ping and SSH remote checks are fine but they don't use nrpe. The log file doesn't record anything for the nrpe checks.
peterg wrote:

Code: Select all

define service {
        use                     gs-generic-service
        host_name               cogs.example.com
	service_description	Load check NRPE
	check_command		check_load_nrpe
}
Can you please post the host object defintion for cogs.example.com.

Code: Select all

define host {
	use			gstation-server
	host_name		cogs.example.com
	alias			Colorado PC01
	address			10.99.1.14
}
and here's the inherited definition of gstation-server:

Code: Select all

define host {
	name			gstation-server
	check_command		check-host-alive	
	check_interval		5
	retry_interval		1
	max_check_attempts	5
	check_period		24x7
	contact_groups		admins
	notification_interval	30
	notification_options	d,u,r
}
Is the address for cogs.example.com 10.99.1.6 ?
No, 10.99.1.14. I've been checking with various remote clients, they all exhibit the same fault though.

Pete

Re: NRPE plugins return null

Posted: Wed Oct 14, 2015 1:04 pm
by hsmith
Can I see the command definition for check_load_nrpe please?

Re: NRPE plugins return null

Posted: Wed Oct 14, 2015 5:33 pm
by Box293
hsmith wrote:Can I see the command definition for check_load_nrpe please?
@hsmith, here it is from one of his previous posts.
peterg wrote:

Code: Select all

define command {
        command_name            check_load_nrpe
        command_line            $USER1$/check_nrpe -H "$HOSTADDRESS" -c "check_load"
}
Can you remove the double quotes around "check_load". Save and restart nagios.

Code: Select all

define command {
        command_name            check_load_nrpe
        command_line            $USER1$/check_nrpe -H "$HOSTADDRESS" -c check_load
}
Does this make a different?

Re: NRPE plugins return null

Posted: Thu Oct 15, 2015 4:18 am
by peterg
I took the quotes off the check_load command - no difference. This is very weird.

Pete

Re: NRPE plugins return null

Posted: Thu Oct 15, 2015 10:16 am
by peterg
Think I'm going to give up on nrpe, just setup exactly the same checks with ssh, worked first time.

Pete

Re: NRPE plugins return null

Posted: Thu Oct 15, 2015 11:14 am
by hsmith
peterg wrote:Think I'm going to give up on nrpe, just setup exactly the same checks with ssh, worked first time.

Pete
I'm sorry to hear that. I guess a piece of advice I can offer you for the future is that installing from source, while a few more steps, is generally a lot more stable than installing from the repositories. Our repositories are still in a condition that could use some love. I can provide documentation for source installations if it is something you are interested in.

Re: NRPE plugins return null

Posted: Thu Oct 15, 2015 11:54 am
by peterg
Typical, after converting it to ssh I spotted the error, it's right there in plain site above. $HOSTADDRESS should be $HOSTADDRESS$!!!!

The ssh implementation did have the type because I cut'n'pasted it from an example online.

Pete

Re: NRPE plugins return null

Posted: Thu Oct 15, 2015 12:04 pm
by hsmith
Oh man... I feel bad that we didn't see that either.

Re: NRPE plugins return null

Posted: Thu Oct 15, 2015 7:57 pm
by Box293
Damn sometimes the most obvious things are overlooked, I missed that as well.

Is it OK to close this thread?

Re: NRPE plugins return null

Posted: Fri Oct 16, 2015 3:18 am
by peterg
Yup, hopefully it'll help out someone else in the future.

Pete