My notes say do the following to make Nagios not log to syslog/messages, but it does anyway...
###############################################################################
Disable nrpe start/exit logging in syslog
/etc/xinetd.d/nrpe:
log_on_success =
###############################################################################
Disable nagios logging in syslog
/usr/local/nagios/etc/nagios.cfg
use_syslog=0
###############################################################################
Mar 10 01:23:54 sbiotlnxi001 nagios: job 10 (pid=5952): read() returned error 11
Mar 10 01:23:55 sbiotlnxi001 nagios: job 12 (pid=5967): read() returned error 11
Mar 10 01:23:56 sbiotlnxi001 nagios: job 14 (pid=5993): read() returned error 11
Mar 10 01:23:56 sbiotlnxi001 nagios: job 14 (pid=5992): read() returned error 11
Mar 10 01:23:57 sbiotlnxi001 nagios: job 16 (pid=6010): read() returned error 11
Mar 10 01:23:57 sbiotlnxi001 nagios: job 16 (pid=6014): read() returned error 11
# grep syslog /usr/local/nagios/etc/nagios.cfg
use_syslog=0
# grep -v ^# /etc/xinetd.d/nrpe
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 =
log_on_success =
disable = no
only_from = 127.0.0.1 2001:9888:ef8:4343::30 2001:9888:ef8:4343::31
}
I don't want Nagios to log much of anything in messages, and just log to nagios.log.
What am I missing?
# grep -v ^# /usr/local/nagios/etc/nagios.cfg | grep log
log_event_handlers=0
log_archive_path=/usr/local/nagios/var/archives
log_external_commands=0
log_file=/usr/local/nagios/var/nagios.log
log_host_retries=1
log_initial_states=0
log_notifications=1
log_passive_checks=0
log_rotation_method=d
log_service_retries=1
use_syslog=0
Nagios logging to /var/log/messages
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Nagios logging to /var/log/messages
This has been filed and marked as working as intended: https://github.com/NagiosEnterprises/na ... issues/311
I am going to leave this thread on the github comment page to see if the devs want to reevaluate.
I am going to leave this thread on the github comment page to see if the devs want to reevaluate.
Re: Nagios logging to /var/log/messages
I see, so works as intended means it does something its been configured not to do. Sort of like fake news and alternate facts.
Re: Nagios logging to /var/log/messages
I will be closing this thread now. Please see my PM.
Former Nagios employee