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

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
Schmatte
Posts: 5
Joined: Fri Jul 31, 2015 6:34 am

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

Post 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
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

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

Post 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?
Former Nagios Employee.
me.
Schmatte
Posts: 5
Joined: Fri Jul 31, 2015 6:34 am

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

Post 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.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

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

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Schmatte
Posts: 5
Joined: Fri Jul 31, 2015 6:34 am

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

Post 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 ?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post 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/
Former Nagios employee
Locked