NRPE : log_facility

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
jbeaujour
Posts: 19
Joined: Mon Oct 13, 2014 9:17 am

NRPE : log_facility

Post 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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: NRPE : log_facility

Post 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
Former Nagios employee
https://www.mcapra.com/
Locked