Page 2 of 3

Re: Ubuntu Postfix NRPE: Unable to read output

Posted: Mon Aug 04, 2014 5:54 am
by nickp
Hi,

I can confirm that I do not have the following on the client nrpe.cfg:

command[check_init_service]=sudo /usr/local/nagios/libexec/check_init_service $ARG1$

This is also the case on the Nagios XI hosting server nrpe.cfg file


Also the following entry is not in the client or host sudoers file:

nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_init_service

Do both these entries need to be added to the respective files and if so does this need to be done on both the Nagios host + client or just one of these?

Thanks

Re: Ubuntu Postfix NRPE: Unable to read output

Posted: Mon Aug 04, 2014 10:57 am
by tmcdonald
Both of those changes need to be made on the remote host only - nothing should need to change in the XI server.

Re: Ubuntu Postfix NRPE: Unable to read output

Posted: Tue Aug 05, 2014 11:23 am
by nickp
I have made the changes on the remote host and I am still getting the same error

Re: Ubuntu Postfix NRPE: Unable to read output

Posted: Tue Aug 05, 2014 5:06 pm
by scottwilkerson
Can you send the output of running the following on the Ubuntu server

Code: Select all

/usr/local/nagios/bin/nrpe -h

Re: Ubuntu Postfix NRPE: Unable to read output

Posted: Wed Aug 06, 2014 5:00 am
by nickp
Here is result of the command:

root@ed-uk:~# /usr/local/nagios/bin/nrpe -h
-bash: /usr/local/nagios/bin/nrpe: No such file or directory

As you can see there are no /usr/local/nagios/bin/ directories, only /usr/local

Should these directories have been created during the Nagios agent install?

Re: Ubuntu Postfix NRPE: Unable to read output

Posted: Wed Aug 06, 2014 5:01 pm
by abrist
How was nrpe installed? From source or a package?

Re: Ubuntu Postfix NRPE: Unable to read output

Posted: Thu Aug 07, 2014 3:02 am
by nickp
I ran the following:

# add-apt-repository ppa:nagiosinc/ppa
# apt-get update
# apt-get install nagios-agent

Re: Ubuntu Postfix NRPE: Unable to read output

Posted: Thu Aug 07, 2014 4:50 pm
by abrist
Is it located at /usr/bin/nrpe?

Code: Select all

/usr/bin/nrpe -h

Re: Ubuntu Postfix NRPE: Unable to read output

Posted: Fri Aug 08, 2014 3:41 am
by nickp
abrist wrote:Is it located at /usr/bin/nrpe?

Code: Select all

/usr/bin/nrpe -h
It is located here:

root@ed-**:~# find / -name nrpe
/usr/sbin/nrpe

root@ed-uk:~# /usr/sbin/nrpe -h

NRPE - Nagios Remote Plugin Executor
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.12
Last Modified: 03-10-2008
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
TCP Wrappers Available

***************************************************************
** POSSIBLE SECURITY RISK - COMMAND ARGUMENTS ARE SUPPORTED! **
** Read the NRPE SECURITY file for more information **
***************************************************************

Usage: nrpe [-n] -c <config_file> <mode>

Options:
-n,--no-ssl = Do not use SSL
<config_file> = Name of config file to use
<mode> = One of the following two operating modes:
-i,--inetd Run as a service under inetd or xinetd
-d,--daemon Run as a standalone daemon
-h,--help Print this short help.
-l,--license Print licensing information.

Notes:
This program is designed to process requests from the check_nrpe
plugin on the host(s) running Nagios. It can run as a service
under inetd or xinetd (read the docs for info on this), or as a
standalone daemon. Once a request is received from an authorized
host, NRPE will execute the command/plugin (as defined in the
config file) and return the plugin output and return code to the
check_nrpe plugin.

Re: Ubuntu Postfix NRPE: Unable to read output

Posted: Fri Aug 08, 2014 1:53 pm
by abrist
Have you restarted the nrpe daemon since you made the config file changes?
Do you have more than one nrpe.cfg?

Code: Select all

find / -name nrpe.cfg