Ok, we got our brand new HP rx8640 servers running HPUX 11.31 and needed to monitor them with nagios. As check_by_ssh turned to be a lot slower than NRPE+SSL on our former Solaris servers, we defined as policy that every server under our control should be monitored using NRPE.
Found that someone already did the nasty work of compiling it and even created a current depot (software package in HPUX terms) that works with 11.31. There are a couple of drawbacks though, it runs using inetd which is not practical when you run a lot of frequent checks and it’s compiled without the “–enable-command-args” and this last bit makes it useless for our needs.
Using Olivier’s build notes, slightly modified, I’ve built NRPE with “–enable-command-args” and created a script to start it as a standalone service rather than using inetd.
Here’s the process:
TCP Wrappers note
According to Olivier’s notes, he used the tcpwrapper’s source included with SSHD (is it Openssh?) located at /opt/ssh/src/tcp_wrappers_7.6-ipv6.4. To be able to build it, I had to modify the Makefile, adding “-DUSE_GETDOMAIN” to the BUGS macro definition. Otherwise, I was getting the following error:
Procedure:
The thing is, it didn’t work…. After building it and using the generated libwrap.a at NRPE compilation time, I was getting:
Going back with stock libwrap on HPUX, I only needed to define a missing variable for it in nrpe.c (rfc931_timeout)
Patching/modifying NRPE
NRPE configuration
Compilation & Installation
Init script
I created a init script to start NRPE as a service, but apparently wordpress doesn’t allow any arbitrary file to be uploaded. I’ll upload it as soon as possible.
Update: As I’m unable to post files, I’ll have to include the script inline…. For this to work you need two files, one for “enablement” of the service and the control script.
/etc/rc.config.d/nrpe
/sbin/init.d/nrpe
After creating those files you’ll need to make links to the control script to be able to start and stop on boot and shutdown