NRPE : log_facility

This forum is intended for the discussion of Nagios plugin development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The SourceForge.net nagiosplug-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

NRPE : log_facility

Postby jbeaujour » Fri Mar 03, 2017 10:42 am

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
jbeaujour
 
Posts: 19
Joined: Mon Oct 13, 2014 9:17 am

Re: NRPE : log_facility

Postby mcapra » Fri Mar 03, 2017 12:03 pm

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
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 2674
Joined: Thu May 05, 2016 3:54 pm


Return to Nagios Plugin Development

Who is online

Users browsing this forum: No registered users and 3 guests