Mail Notification

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

Mail Notification

Post 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?
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Mail Notification

Post 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.
Former Nagios employee
https://www.mcapra.com/
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Mail Notification

Post 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/
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
mayank__
Posts: 3
Joined: Wed Jun 14, 2017 4:03 am

Re: Mail Notification

Post 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.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Mail Notification

Post 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.
Former Nagios employee
https://www.mcapra.com/
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Mail Notification

Post 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.
Locked