Building flexible email notifications
By default, in default IPHost installation the simplest email notification is used. While it’s suitable for most small or testing setups, more complex notifications may be required for real-life monitoring setups.
By means of inheritance and composite alerts, notification system can be made quite flexible: small changes may be required to handle typical use cases. Let’s mention several pieces of advice to control notifications with less efforts.
Use schedules to switch notifications on an off
Schedules are used to control both maintenance and simple actions execution. By default, default schedule named “Always” is defined and used for all the actions.
Open “Settings > Schedules”, create a new schedule named “Never” and save it without entering any data. Such a schedule can be used to disable a simple actions by default. For example, if complex alerts are defined, this can be used to debug their execution.
To illustrate: proceed to “Settings > Alerts”, create new alert, add new “Send mail” simple action (by default, to $AdminMail) and use “Never” schedule for it.
By default, such an alert will never send notifications to administrator’s (default) email. In case you need to make sure alerts are sent as expected, edit that simple action and change “Never” schedule to “Always” (default one). After that, you can run test alerts and be sure a copy will always be sent to administrator’s mailbox – to study whether entire alerting is set up correctly.
Note: the above change will affect all the alerts using the affected simple action.
Use composite alerts
Typical alerting setup can require sending notifications to one set of people at, say, business hours, and sending alerts to entirely different group the rest of the time.
Create several (at least two) “Send mail” simple actions, and configure them, using schedules, to be sent only on specific date/time intervals. That way, you can be sure notifications are sent to appropriate persons, as scheduled.
If redundancy in alerting is required, add more simple actions, of different types: send to messengers, to social networks etc, as necessary. Using schedule change, you can disable them in several mouse clicks, for all the monitoring setup.
Use local mail server as backup notification storage
You need to set up proper SMTP server (“Settings” > “Email Settings”) to make email notifications work. In most cases, corporate mail servers, or third-party service such as Mailchimp or Amazon SES, is successfully used.
However, there are local mail servers, such as Courier, which actually doesn’t need an external mail server and/or connectivity with Internet. It can be used as a backup mail collection facility – add it as default mail server, and/or add corporate one as backup facility. By means of schedules, you can temporarily disable sending to local mail services.
Use inheritance and host groups
By default, inheritance for typical parameters, alerts included, is enabled. That means that changing an alerting settings in higher parts of monitoring entities hierarchy will affect all the internal (included) nodes (starting from “All Agents” and down).
By creating carefully placed host groups (perhaps nested) and assigning specific alerting rules to them, one can easily adjust alerting for all the hosts/monitors belonging to such a (sub)group. That can be convenient if different persons should be alerted to events withing different host groups.
Do you have an idea of your own, on how to fine tune IPHost alerting? Please let us know by either sending us a message or leaving a comment below.