sea nerd blog
nrpe hack

In nagios & nrpe, I said that I’d written a fix for a problem I had with NRPE. I didn’t have access to syslog configuration, so I had to hack NRPE to log to a file.

image: an image

Here is ll.zip, which includes a drop–in replacement for nrpe.c from NRPE source, version 2.15. The new files, locallog.c and locallog.h, replace the syslog functions to output to a file. It’s a dirty hack, and does not deserve any praise. To use it, download NRPE 2.15, download ll.zip, added locallog.c to the Makefile, and rebuild. To use it, amend the config file to replace the facility name with a filename, and maybe add a log_level. For example:

log_facility=/home/user/log/logfilename
log_level=3

Download the nrpe hack.