Check_nrpe returns no output

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.
Locked
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Check_nrpe returns no output

Post by kwhogster »

Guys

This one again but a different flavor

My service

Code: Select all

define service{
        use                     generic-service
        host_name               TGCS011
        service_description     NSClient++ Version
        servicegroups           nsclients
        check_command           check_nrpe
        }
My command

Code: Select all

define command{
        command_name    check_nrpe
        command_line    /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -t 60 -c $ARG1$ $ARG2$ $ARG3$ $ARG4$
}

In Nagios


TGCS011 NSClient++ Version UNKNOWN 02-18-2017 22:41:40 0d 0h 16m 32s 3/3 (No output returned from plugin)

When I run it from command line it works
root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H TGCS011 -t 30 -4
I (0,4,1,73 2012-12-17) seem to be doing fine...


All my other check_nrpe commands are working on this same computer ;) ;)

Any ideas?
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Check_nrpe returns no output

Post by avandemore »

Your plugin is only returning perf data? Typically a plugin with return more than just perf data:

Code: Select all

[nagios@avandemore-centos7.nagios.com ~]$ /usr/local/nagios/libexec/check_ping -H 127.0.0.1 -w 100.0,20% -c 500.0,60% -p 5
PING OK - Packet loss = 0%, RTA = 0.02 ms|rta=0.023000ms;100.000000;500.000000;0.000000 pl=0%;20;60;0
Here is some information on plugins:
https://nagios-plugins.org/doc/guidelines.html
https://mathias-kettner.de/checkmk_localchecks.html
http://www.yourownlinux.com/2014/06/how ... cript.html
Previous Nagios employee
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Check_nrpe returns no output

Post by kwhogster »

Why giving my a check_ping command

Not that

I am looking to see why check_nrpe does not work from my service definition

It runs fine from the command line.

All my other check_nrpe commands work
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Check_nrpe returns no output

Post by rkennedy »

Try running it WITHOUT the -c over the command line, my guess is by passing this, it assumes a command. You may want to create a custom command for check_nrpe_version. (just an example)
Former Nagios Employee
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Check_nrpe returns no output

Post by kwhogster »

Rkennedy

good call that fixed it


Thanks

This one can now be locked.
Locked