[csw-users] CSWnrpe not working with custom plugin
Stephen Nelson-Smith
sanelson at gmail.com
Mon Mar 2 05:37:37 CET 2009
Hi,
I've installed nrpe from the blastwave repository on Solaris 10. From
my nagios server (Redhat 5), I'm able to run remote nrpe commands, as
specified in nrpe.cfg, such as check_disk, or check_load.
I've written a custom monitor which conforms to the nrpe API, and
dropped it in /opt/csw/libexec/nagios-plugins/ with appropriate
permissions. I've added a line to nrpe.cfg to enable it to be called
remotely.
I can run this command as the nagios user, and get the results as
expected. However, if called over nrpe, I get the error:
NRPE: Unable to read output
I've enabled debug logging, and restarted nrpe, but I don't see any
log messages in syslog other than startup and shutdown.
If I disable cswnrpe via svcadm, and run /opt/csw/bin/nrpe -c
/opt/csw/etc/nrpe.cfg -d as root on the command line, everything works
fine, and I also get log messages, such as:
Mar 1 07:56:41 viper SC Alert: [ID 114403 daemon.notice] Audit |
minor: root : Activate Session : authentication type = MD5 : privilege
level = admin : initial outbound sequence number = 0x8E6E9E0F :
challenge string = 0xA8 0x4B 0xC8 0xFD 0xA2 0x4 0x1A 0x90 0xF4 0x49
0xFE 0x15 0x4B 0x48 0x96 0x2D : success
Mar 1 07:56:41 viper SC Alert: [ID 709409 daemon.notice] Audit |
minor: root : Set Session Privilege Level: privilege level = admin :
success
Mar 1 07:56:48 viper SC Alert: [ID 920036 daemon.notice] Audit |
minor: root : Close Session : session ID = 4153983266 : success
Mar 1 08:00:23 viper SC Alert: [ID 163647 daemon.notice] Audit |
minor: root : Activate Session : authentication type = MD5 : privilege
level = admin : initial outbound sequence number = 0xEC32CA41 :
challenge string = 0x25 0xCB 0x5C 0x8F 0xAE 0x6D 0x45 0x46 0x27 0x86
0xE5 0x3F 0xA9 0x8D 0x8A 0x71 : success
Mar 1 08:00:23 viper SC Alert: [ID 709409 daemon.notice] Audit |
minor: root : Set Session Privilege Level: privilege level = admin :
success
Mar 1 08:00:31 viper SC Alert: [ID 954504 daemon.notice] Audit |
minor: root : Close Session : session ID = 3706478101 : success
I've had a look at the shell script that is used by svcadm -
/opt/csw/lib/svc/method/svc-nrpe - and all that seems to do is invoke
nrpe in the same way that I have on the command line.
I see no information in the /var/svc/log/network-cswnrpe:default.log.
I'm flummoxed - I can only thing it could be something to do with my
environment - in that it works if I launch from the commandline, and
doesn't when launched from a script.
I can't really use this in production - I want to use the svc properly
- but at present I can't see any way to get this to work other than
running it manually.
Any ideas for further troubleshooting, or suggestions as to what's wrong?
Thanks in advance,
S.
--
Stephen Nelson-Smith
Technical Director
Atalanta Systems Ltd
www.atalanta-systems.com
More information about the users
mailing list