Page 1 of 1

Check_nrpe returns no output

Posted: Sat Feb 18, 2017 10:46 pm
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?

Re: Check_nrpe returns no output

Posted: Mon Feb 20, 2017 12:46 pm
by avandemore
Your plugin is only returning perf data? Typically a plugin with return more than just perf data:

Code: Select all

[[email protected] ~]$ /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

Re: Check_nrpe returns no output

Posted: Mon Feb 20, 2017 8:50 pm
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

Re: Check_nrpe returns no output

Posted: Mon Feb 20, 2017 11:55 pm
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)

Re: Check_nrpe returns no output

Posted: Tue Feb 21, 2017 8:59 am
by kwhogster
Rkennedy

good call that fixed it


Thanks

This one can now be locked.