new NRPE -t option not working with Nagios

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
wyomurf
Posts: 1
Joined: Tue Nov 29, 2016 11:45 pm

new NRPE -t option not working with Nagios

Post by wyomurf »

I have a few commands that sometimes need a little more time to report their results.

I'm using Nagios 4.2.3, and NRPE 3.0.1
I think this used to work with my nagios 3.x implementation.

Nagios setup:

Code: Select all

define service {
        use                     generic-service-intorrent
        host_name               vm25ainst
        service_description     ADE
        check_command           check_nrpe_long!check_ADE
}
and:

Code: Select all

define command{
        command_name    check_nrpe_long
        command_line    /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -t 25:CRITICAL -c $ARG1$
        }
Not that it matters at this point, but at the other end, on the remote NRPE machine, in the NRPE config:

Code: Select all

command[check_ADE]=/usr/libexec/check_ADE
In nagios I see:

(I added a little debug to nrpe to help determine problems)

Code: Select all

Incorrect command line arguments supplied.
Given: /usr/local/nagios/libexec/check_nrpe -H 192.168.134.220 -t 25 -c check_ADE
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 3.0.1
...

Looking at the nagios debug log, I see this:
[code]
[1480693147.637895] [2048.2] [pid=121224]   Uncleaned macro.  Running output (83): '/usr/local/nagios/libexec/check_nrpe -H 192.168.134.220 -t 25:CRITICAL -c check_ADE'
[1480693147.637904] [2048.2] [pid=121224]   Just finished macro.  Running output (83): '/usr/local/nagios/libexec/check_nrpe -H 192.168.134.220 -t 25:CRITICAL -c check_ADE'
[1480693147.637913] [2048.2] [pid=121224]   Processing part: ''
[1480693147.637922] [2048.2] [pid=121224]   Not currently in macro.  Running output (83): '/usr/local/nagios/libexec/check_nrpe -H 192.168.134.220 -t 25:CRITICAL -c check_ADE'
[1480693147.637931] [2048.1] [pid=121224]   Done.  Final output: '/usr/local/nagios/libexec/check_nrpe -H 192.168.134.220 -t 25:CRITICAL -c check_ADE'
[1480693147.637939] [2048.1] [pid=121224] **** END MACRO PROCESSING *************
So, nagios says it sends the -t 25:CRITICAL
but check_nrpe says the :CRITICAL was removed...

What do I do to get around this?
wrapping the 25:CRITICAL in quotes doesn't help.
Last edited by dwhitfield on Fri Dec 02, 2016 1:10 pm, edited 1 time in total.
Reason: adding code blocks
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: new NRPE -t option not working with Nagios

Post by avandemore »

I have been not able to reproduce this issue. What happens if you run

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 192.168.134.220 -t 25:2 -c check_ADE
Also please note timeout settings generally can happen at 3 levels. nagios.cfg, the command level, and the NRPE cfg. These are listed in order of precedence.
Previous Nagios employee
Locked