Home Directory Plugins Helpdesk and Ticketing Send Nagios service problem as mail

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com


Remember Me

Directory Tree

Send Nagios service problem as mail

0 votes
Current Version
Last Release Date
Compatible With
  • Nagios 4.x
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
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)