Probem with nrpe and sudo on rhel5 servers

Hari Sekhon hpsekhon at googlemail.com
Fri Mar 7 11:54:45 CET 2008


Nicole Hähnel wrote:
> Hi,
>
> I wrote a plugin to check running ipsec tunnels on our gateways.
> The plugin needs to have access to /proc/net/ipsec_eroute, so I have to
> run nrpe command with sudo.
>
> sudoers (for testing):
> nagios          ALL=(ALL)       NOPASSWD: ALL
>
> nrpe.conf:
> command[check_tunnel]=sudo /usr/lib/nagios/plugins/check_tunnel
> --tunnels $ARG1$
>
> I tested the plugin on the gateway, it works fine,
> but with nagios I get "NRPE: Unable to read output".
> Running the plugin without sudo, nagios has an output,
> but 0 running tunnels.
>
> Looks like a problem with sudo command on rhel5 servers.
> Any ideas
2 Things:

1. You cannot embed Nagios macros like $ARG1$ in nrpe unless you're 
doing something like dont_blame_nrpe which is a bad idea according to 
those that make it.
2. Have you confirmed that the nrpe user is in fact nagios and that the 
path to the plugin is correct?

-h

-- 
Hari Sekhon


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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