Mail Notification

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Mail Notification

Postby mayank__ » Wed Jun 14, 2017 4:10 am

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?
mayank__
 
Posts: 2
Joined: Wed Jun 14, 2017 4:03 am

Re: Mail Notification

Postby mcapra » Wed Jun 14, 2017 9:29 am

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?option=com_mtree&task=search&Itemid=74&searchword=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.
Former Nagios employee - https://github.com/mcapra/
User avatar
mcapra
 
Posts: 2457
Joined: Thu May 05, 2016 3:54 pm

Re: Mail Notification

Postby scottwilkerson » Wed Jun 14, 2017 10:33 am

Or you may want to check out Nagios Log Server which can accomplish this as well

https://www.nagios.com/products/nagios-log-server/
User avatar
scottwilkerson
CTO
 
Posts: 6945
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Mail Notification

Postby mayank__ » Thu Jun 15, 2017 3:13 am

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.
mayank__
 
Posts: 2
Joined: Wed Jun 14, 2017 4:03 am

Re: Mail Notification

Postby mcapra » Thu Jun 15, 2017 9:30 am

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.
Former Nagios employee - https://github.com/mcapra/
User avatar
mcapra
 
Posts: 2457
Joined: Thu May 05, 2016 3:54 pm

Re: Mail Notification

Postby dwhitfield » Thu Jun 15, 2017 12:03 pm

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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
dwhitfield
The Doctor
 
Posts: 3061
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 5 guests