-----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: > [EMAIL PROTECTED]:/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 > [EMAIL PROTECTED]:/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 > > [EMAIL PROTECTED]:/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 > > [EMAIL PROTECTED]:/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@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