TOP LEVEL CATEGORIES
EXPLORE
Description:
A python script which can be used as an event handler for services within Nagios to automatically send mail to a targeted mail address when a service problem occurs. The script is called by creating a command within Nagios and passing the parameters required in the script from the Nagios macros available.
There is a option to have an acknowledge list where service problem ID from Nagios can be listed on seperate lines. The script will go through the file, with the search path specefied in the variable ackFile, line-by-line to see if the service problem already have been sent as an mail. Just point this variable to an empty file to exclude this functionality.
There is another option to have an exclusion list of service problems to not be sent by mail. This is done by having strings of text of the problem description to be excluded on seperate lines within the file pointed to by the variable exclFile.
There is also a debug functionality which can be used to track down errors or formatting problems of the mails sent.
Required variables to be set within the script are the following: * sendToMail (mail address to send service problems to) * fromMailAddress (the mail address listed as sender of the mails) * sendToMail_DEBUG (only required if DEBUG is defined as true) * ackFile (just point this to an empty file if not used) * exclFile (just point this to an empty file if not used) * flapThreshold (the percentage of state change during last checks which a service needs to have to be considered flapping and thus prevent mail from being transmitted for the specific service)
Current Version
1.0
Last Release Date
2020-01-31
Compatible With
Owner
Marcus Hanikat
Download URL
https://github.com/hanikat/nagios/blob/master/servicesEventHandler.py
You must be logged in to submit a review.
Your review has been submitted and is pending approval.
To:
From:
Your recommendation has been sent.