Page 1 of 1

Mail Notification

Posted: Wed Jun 14, 2017 4:10 am
by mayank__
I want to make changes in the triggering of notification.
For example - instead of hard state change i want to notify admin if new log entry comes in.
What the files in the source code which i will be required to change. Is there a proper developer's documentation for the same?

Re: Mail Notification

Posted: Wed Jun 14, 2017 9:29 am
by mcapra
Could you expand a little bit more on this:
mayank__ wrote: For example - instead of hard state change i want to notify admin if new log entry comes in.
What log? The Nagios log? You would get a lot of notifications if you wanted one for every new log entry. Is this a log file for some application/machine you want to monitor? There's plenty of plugins available for that:
https://exchange.nagios.org/index.php?o ... =check_log

Your use case is way too narrowly defined to approach this topic:
mayank__ wrote: What the files in the source code which i will be required to change.

Re: Mail Notification

Posted: Wed Jun 14, 2017 10:33 am
by scottwilkerson
Or you may want to check out Nagios Log Server which can accomplish this as well

https://www.nagios.com/products/nagios-log-server/

Re: Mail Notification

Posted: Thu Jun 15, 2017 3:13 am
by mayank__
mcapra wrote:Could you expand a little bit more on this:
I am using nagios to monitor a remote server via the IPMI plugin. I want to send email notification when the SEL log of the server has a new entry. Currently it is notifying for the log only when there is a hard state change.

Re: Mail Notification

Posted: Thu Jun 15, 2017 9:30 am
by mcapra
Can you share the specific plugin you're using? The source would be helpful if possible.

Unless the plugin is also responsible for purging the SEL as a post-request step, I don't see how this would be possible without some richer logic happening in the plugin itself. Or some sort of spooling/queuing mechanism. If the log is never purged, how exactly is the plugin determining what is a "new entry"?

Assuming the plugin is purging the SEL after looking for new entries, then you could set the plugin to return "CRITICAL" when any entry is found period and return those entries in the plugin's output.

Apologies if any of that is particularly ignorant. My experience with IMPI is limited.

Re: Mail Notification

Posted: Thu Jun 15, 2017 12:03 pm
by dwhitfield
Is https://exchange.nagios.org//directory/ ... &Itemid=74 the plugin you are using? If so, the developer has an email listed there. You may want to reach out to them, but my thought is you are going to want a different plugin to check logs.