NRPE plugins return null

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
peterg
Posts: 12
Joined: Wed Oct 07, 2015 11:13 am

Re: NRPE plugins return null

Post 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
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: NRPE plugins return null

Post by hsmith »

Can I see the command definition for check_load_nrpe please?
Former Nagios Employee.
me.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: NRPE plugins return null

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
peterg
Posts: 12
Joined: Wed Oct 07, 2015 11:13 am

Re: NRPE plugins return null

Post by peterg »

I took the quotes off the check_load command - no difference. This is very weird.

Pete
peterg
Posts: 12
Joined: Wed Oct 07, 2015 11:13 am

Re: NRPE plugins return null

Post by peterg »

Think I'm going to give up on nrpe, just setup exactly the same checks with ssh, worked first time.

Pete
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: NRPE plugins return null

Post 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.
Former Nagios Employee.
me.
peterg
Posts: 12
Joined: Wed Oct 07, 2015 11:13 am

Re: NRPE plugins return null

Post 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
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: NRPE plugins return null

Post by hsmith »

Oh man... I feel bad that we didn't see that either.
Former Nagios Employee.
me.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: NRPE plugins return null

Post by Box293 »

Damn sometimes the most obvious things are overlooked, I missed that as well.

Is it OK to close this thread?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
peterg
Posts: 12
Joined: Wed Oct 07, 2015 11:13 am

Re: NRPE plugins return null

Post by peterg »

Yup, hopefully it'll help out someone else in the future.

Pete
Locked