nrpe configuration issues

Marc Powell marc at ena.com
Mon Jul 25 22:22:11 CEST 2005



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Mark Wisniewski
> Sent: Monday, July 25, 2005 2:51 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] nrpe configuration issues
> 
> I'm trying to get nrpe working and I am getting the following message:
> 
> # check_nrpe -H kronotmp1 -c check_disk
> NRPE: Unable to read output
> 
> Here's the nrpe.cfg file on the remote system:

[snip]

> # The following examples use hardcoded command arguments...
> 
> command[check_users]=@libexecdir@/check_users -w 5 -c 10
> command[check_disk]=/usr/local/libexec/check_disk -w 10 -c 5 -p /var
> 
> Here's the syslog output from that same machine:
> 
> Jul 25 15:31:26 kronotmp1 syslogd: restart
> Jul 25 15:31:29 kronotmp1 nrpe[589858]: Connection from 172.20.243.53
port
> 51079
> Jul 25 15:31:29 kronotmp1 nrpe[589858]: Host address checks out ok
> Jul 25 15:31:29 kronotmp1 nrpe[589858]: Handling the connection...
> Jul 25 15:31:29 kronotmp1 nrpe[589858]: Host is asking for command
> 'check_users'
> to be run...
> Jul 25 15:31:29 kronotmp1 nrpe[589858]: Running command:
> @libexecdir@/check_users -w 5 -c 10
> Jul 25 15:31:29 kronotmp1 nrpe[589858]: Command completed with return
code
> 3 and
> output:
> Jul 25 15:31:29 kronotmp1 nrpe[589858]: Return Code: 3, Output: NRPE:
> Unable to
> read output
> Jul 25 15:31:29 kronotmp1 nrpe[589858]: Connection from 172.20.243.53
> closed.

The path to check_users is incorrect. @libexecdir@ isn't valid. Did you
copy the file unmodified by make? It should _probably_ be
/usr/local/libexec/check_users if it's in the same place you've
specified for check_disk.

> Jul 25 15:32:09 kronotmp1 nrpe[544922]: Connection from 172.20.243.53
port
> 48973
> Jul 25 15:32:09 kronotmp1 nrpe[544922]: Host address checks out ok
> Jul 25 15:32:09 kronotmp1 nrpe[544922]: Handling the connection...
> Jul 25 15:32:09 kronotmp1 nrpe[544922]: Host is asking for command
> 'check_disk'
> to be run...
> Jul 25 15:32:09 kronotmp1 nrpe[544922]: Running command:
> /usr/local/libexec/check_disk -w 10 -c 5 -p /var
> Jul 25 15:32:09 kronotmp1 nrpe[544922]: Command completed with return
code
> 3 and
> output:
> Jul 25 15:32:09 kronotmp1 nrpe[544922]: Return Code: 3, Output: NRPE:
> Unable to
> read output
> Jul 25 15:32:09 kronotmp1 nrpe[544922]: Connection from 172.20.243.53
> closed.
> 
> Running of check_disk on the client:
> 
> root at kronotmp1 /usr/local/nagios/libexec > check_disk -w 10 -c 5 -p
/var
> DISK OK - free space: /var 121 MB (95%);| /var=7MB;118;123;0;128

Ah, two things here... 1) You're not running the command in the same way
nrpe is. You should be running it as the nagios user and 2) using the
command exactly as it's defined in nrpe.cfg. If you had done that you
would see that the path you are using in your test,
/usr/local/nagios/libexec, is not the same path you have defined in
nrpe.cfg, /usr/local/libexec and @libexecdir at .


--
Marc


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list