Page 1 of 1

NRPE : log_facility

Posted: Fri Mar 03, 2017 10:42 am
by jbeaujour
Hello,
Now we have "log_facility=daemon" parameter in ./etc/nrpe.cfg.
We want to have a special value "log_facility=local6" for rsyslog for this parameter in a custom config file ./etc/conf.d/nrpe-custom.cfg.
/etc/rsyslog.conf have a parameter "local6.* /var/log/nrpe.log"
We have a new file created as wanted, but some messages remains in /var/log/messages.
Exemple :
in /var/log/nrpe.log, only those without debug mode:
Mar 3 16:20:51 u3recu42 nrpe[7284]: Could not read request from client, bailing out...
with debug mode, we have more messages like
Mar 3 16:37:51 u3recu42 nrpe[6956]: Added command[check-procs]=/opt/nrpe/libexec/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
Mar 3 16:37:51 u3recu42 nrpe[6956]: INFO: SSL/TLS NOT initialized. Network encryption DISABLED.
Mar 3 16:37:51 u3recu42 nrpe[6956]: Handling the connection...
Mar 3 16:37:51 u3recu42 nrpe[6956]: Host is asking for command 'check-load' to be run...

and also in /var/log/messages :
Mar 3 16:37:51 u3recu42 xinetd[18104]: START: nrpe pid=6956 from=::ffff:10.178.133.10
Mar 3 16:37:51 u3recu42 nrpe[6956]: INFO: SSL/TLS NOT initialized. Network encryption DISABLED.
Mar 3 16:37:51 u3recu42 xinetd[18104]: EXIT: nrpe status=0 pid=6956 duration=0(sec)

Is this a bug ?
Thank's a lot

Re: NRPE : log_facility

Posted: Fri Mar 03, 2017 12:03 pm
by mcapra
If you're running NRPE under xinetd, you may also need to change the facility xinetd is using for the NRPE service. This directive should do the trick:

Code: Select all

log_type                = SYSLOG local6