Page 1 of 1

How to suppress "SERVICE ALERT:"-entries in nagios.log-file

Posted: Fri Aug 14, 2015 4:11 am
by Schmatte
Hello,

does there exist an option to suppress the log-entries "SERVICE ALERT:" in the Nagios-core-Logfile?

No one of the logging-options in the nagios.cfg - file seems to be handle this, to avoid this output. We have thousand of services and that's why we would like to suppress this log-entries, because we handle this service-states already and we would like to reduce the redundant I/O-traffic.

Regards

Re: How to suppress "SERVICE ALERT:"-entries in nagios.log-f

Posted: Fri Aug 14, 2015 12:45 pm
by hsmith
Schmatte wrote:Hello,

does there exist an option to suppress the log-entries "SERVICE ALERT:" in the Nagios-core-Logfile?

No one of the logging-options in the nagios.cfg - file seems to be handle this, to avoid this output. We have thousand of services and that's why we would like to suppress this log-entries, because we handle this service-states already and we would like to reduce the redundant I/O-traffic.

Regards
Do you want the logging of the alerts all together to stop, or just the logging saying that a notification was sent out?

Re: How to suppress "SERVICE ALERT:"-entries in nagios.log-f

Posted: Mon Aug 17, 2015 1:06 am
by Schmatte
I would like to stop this alerts all together. Option log_notifications=0 has been set already, but this doesn't suppress this log-entries.

Re: How to suppress "SERVICE ALERT:"-entries in nagios.log-f

Posted: Mon Aug 17, 2015 3:47 pm
by tgriep
Did you restart the nagios process after the change was made?
Run this to see if the logging stops.

Code: Select all

service nagios restart
If not, could you post your nagios.cfg file so we can review it?
Format: log_notifications=<0/1>
Example: log_notifications=1

This variable determines whether or not notification messages are logged. If you have a lot of contacts or regular service failures your log file will grow relatively quickly. Use this option to keep contact notifications from being logged.

0 = Don't log notifications
1 = Log notifications
Changing log_notifications to 0 will just suppress Notifications.

Re: How to suppress "SERVICE ALERT:"-entries in nagios.log-f

Posted: Tue Aug 18, 2015 2:16 am
by Schmatte
I set all possible "log_*"-options to 0. I also restarted nagios every time (checked PID in nagios.lock) .

At this time I think the logging-problem depends on the "is_volatile=1" - option of the configured services.

see https://assets.nagios.com/downloads/nag ... vices.html

Here is a hint:

"[..] Volatile services differ from "normal" services in three important ways. Each time they are checked when they are in a hard non-OK state, and the check returns a non-OK state (i.e. no state change has occurred)...
•The non-OK service state is logged [..]"

So I would substantiate the question: How could I suppress this logging of non-OK service states of a volatile-service ?

Re: How to suppress "SERVICE ALERT:"-entries in nagios.log-f

Posted: Tue Aug 18, 2015 11:50 am
by tmcdonald
That's not currently possible in Core, as logging is one of the three things that take place for a volatile service (the other two being event handlers and notifications). You would need to do this at a syslog/rsyslog level:

http://www.rsyslog.com/discarding-unwanted-messages/