Log file for NRPE

NRPE does not have its own log file, everything goes to /var/log/messages. It would be nice to have a dedicated log file for NRPE.
To do that add the following lines in your NRPE configuration file. In my case the configuration file is /etc/nagios/nrpe.cfg

log_facility=local1
debug=0

and add the following lines to rsyslog configuration file. In my case the configuration file is /etc/rsyslogd.conf

local1.* /var/log/nrpe.log

And now, restart rsyslogd and nrep:

/etc/init.d/./rsyslogd restart
/etc/init.d/./nrpe restart

Leave a Reply

Your email address will not be published. Required fields are marked *

*