This KB article explains how to configure XINETD to stop the logging of successful NRPE connections.
Every time the Nagios XI or Nagios Core server connects to the NRPE client, the following is logged in /var/log/messages (or equivalent):
Mar 7 17:22:33 centos21 xinetd[3326]: START: nrpe pid=3537 from=10.25.5.1
Mar 7 17:22:33 centos21 xinetd[3326]: EXIT: nrpe status=0 pid=3537 duration=0(sec)
This can be disabled by defining the log parameters for successful connections via XINETD. This document only applies to NRPE that is run via XINETD as this logging is a function of XINETD.
This KB article is oriented at RHEL / CentOS however the XINETD configuration applies to any operating system (OS) using XINETD for NRPE.
Configure XINETD
Establish a terminal session to your NRPE client as the root user.
Execute the following command to open the file in vi:
vi /etc/xinetd.d/nrpe
When using the vi editor, to make changes press i on the keyboard first to enter insert mode. Press Esc to exit insert mode.
Add the following line to the configuration:
log_on_success =
Here is an example configuration with that line added:
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
log_on_success =
disable = no
only_from = 127.0.0.1 10.25.5.1
}
When you have finished, save the changes in vi by typing:
:wq
and press Enter.
You need to restart the service using one of the commands below:
RHEL/CentOS 5.x/6.x
service xinetd restart
RHEL/CentOS 7.x
systemctl restart xinetd.service
After making these changes, you will no longer see the START and EXIT messages in the in /var/log/messages file for successful NRPE connections via XINETD.
Final Thoughts
For any support related questions please visit the Nagios Support Forums at:
http://support.nagios.com/forum/
Article ID: 566
Created On: Tue, Mar 7, 2017 at 1:41 AM
Last Updated On: Tue, Mar 7, 2017 at 1:41 AM
Authored by: tlea
Online URL: https://support.nagios.com/kb/article/nrpe-turn-off-xinetd-logging-on-success-566.html