NRPE: Unable to read output

Thomas Guyot-Sionnest dermoth at aei.ca
Fri May 16 11:17:54 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 16/05/08 05:05 AM, Marcus wrote:
> Hi Folks,
> 
> i'm trying to get a plugin for openvpn 
> (http://www.nagiosexchange.org/cgi-bin/pages/Detailed/1315.html) to work 
> with nrpe, but it gives me the dreaded "NRPE: Unable to read output"-error.
> 
> The server is a sles10sp1-xen-host running openvpn with the 
> management-console which is reachable via telnet on localhost:1195.
> 
> When i run the check manually, it works, although there is no "Linefeed" 
>   at the end.(Wonder if that might be the problem?)
> 
> The invocation-command basically looks like this:
> nagios at u-23:/usr/local/nagios/libexec> 
> /usr/local/nagios/libexec/check_openvpn -H 127.0.0.1 -p 1195 -P mypwd -n
> 
> Then the output is (on one line):
> OpenVPN OK: 0 connected 
> clients.nagios at u-239-s087:/usr/local/nagios/libexec>
> 
> Perl::Telnet is used to connect to tcp/1195, gives the pwd and checks 
> how many clients are connected.
> 
> My nrpe.cfg looks like this:
> 
> command[check_vpn]=/usr/local/nagios/libexec/check_openvpn -H 127.0.0.1 
> -p 1195 -P mypwd -n
> 
> When i issue
> 
> nagios at u-23:/usr/local/nagios/libexec> 
> /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c check_hd
> DISK OK - free space: / 9334 MB (86% inode=96%);| 
> /=1424MB;9067;10200;0;11334
> 
> it works great, however
> 
> nagios at u-23:/usr/local/nagios/libexec> 
> /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c check_vpn
> 
> results in
> 
> NRPE: Unable to read output
> 
> Can anybody please give me a hint whats going wrong here. :-/

If you're trying to run the plugin locally as root then try as the
nagios user instead (or whichever user nrpe runs as). I.e.:

> su nagios -c 'usr/local/nagios/libexec/check_openvpn -H 127.0.0.1 -p
1195 -P mypwd -n'

I doubt it would be caused by the missing newline, but if you think so
you can certainly add one in the plugin since it's written in perl...

Which version of Nrpe are you using?

Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFILVFC6dZ+Kt5BchYRAgtGAJkBO/nryUXvcJF/O6CfiCSvn1MqWACgvg+g
KwREWdj7hCnQtwCitq2mjD4=
=Fmxh
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
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