I am using nagios core 4.3.2 to monitor many servers and services and rely on it daily. As of right now all services get written to the system log (currently CentOS 6.9) and sys admins get notified when services are failing. However, services that have been acknowledged still write to the system log and so I am constantly being notified by services that I have already acknowledged. Is there a way to add ACKNOWLEDGED to the log entry so that I may filter there out via logcheck? Here is an example of the current log entry:
Aug 16 00:00:00 nagios[4711]: CURRENT SERVICE STATE: ;Apache Servers;CRITICAL;HARD;4;CRITICAL - Socket timeout
And what I would like to accomplish is:
Aug 16 00:00:00 nagios[4711]: CURRENT SERVICE STATE: ACKNOWLEDGED; Apache Servers;CRITICAL;HARD;4;CRITICAL - Socket timeout
or something similar. Thanks in advance.
Appending Acknowledgement to system logging
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Appending Acknowledgement to system logging
It's not exactly clear what you are doing and what you want to happen, but if you want things to go to nagios.log and not the system log, the following directive should suffice:
Format: use_syslog=<0/1>
Example: use_syslog=1
This variable determines whether messages are logged to the syslog facility on your local host. Values are as follows:
0 = Don't use syslog facility
1 = Use syslog facility
Format: use_syslog=<0/1>
Example: use_syslog=1
This variable determines whether messages are logged to the syslog facility on your local host. Values are as follows:
0 = Don't use syslog facility
1 = Use syslog facility
Re: Appending Acknowledgement to system logging
yea, I am aware of that option, however I like my servers to notify of all events the write to the system log. Since nagios seems to like to write any warnings (even when marked as acknowledged) to the system log my inbox gets flooded with these warnings I am already aware of. If I could append Acknowledged to the log entry I could filter them out using logcheck. Does that make it clearer?
Thanks
Thanks
Re: Appending Acknowledgement to system logging
Just to be sure that your going through the right process...I did i a test on notifications and acknowledgements on my core....please follow the below
and don't mind the Nagios Core UI am using,everything is the same..am just using a template from nagios exchange.
After acknowledging you should stop receiving notifications and there should be a log saying acknowledged........ Look at the last image above.
and don't mind the Nagios Core UI am using,everything is the same..am just using a template from nagios exchange.
After acknowledging you should stop receiving notifications and there should be a log saying acknowledged........ Look at the last image above.
Re: Appending Acknowledgement to system logging
We will leave this thread open, but please note our holiday office hours.
Former Nagios employee