3.1. Health Monitor: e-mail notification when a task fails

You can have an error or warning notification sent for failed tasks.

You make the settings for e-mail notifications in the configuration file $CADENAS_SETUP/pappserver.cfg.

Settings in the "SendMailTask" block

In the block SendMailTask must be at least the Settings in the key MailHost be set:

  • MailHost (mandatory): Host name and port of the SMTP server used for sending e-mails.

  • username (optional): Username for authentication on the SMTP server

  • password (optional): Password for authentication on the SMTP server (can be encrypted)

  • sender (optional): Email address that is used as the sender of the notification. Fallback if not set in a mail task.

  • receiver (optional): Recipient e-mail address for the notification. Fallback if not set in a mail task.

Settings in the "task:SendMail.Healthinfo" block

  • Module: Module name

  • Active: Activation/deactivation

  • TimeTable: OnHealthInfoNotification: The start time for the task is event-based here. The key value is displayed under Run task, when ....

  • sender

  • receiver

  • subject (default): Health Info Notification : Heading in the e-mail

  • template: preset template

The values entered under sender, receiver and subject are displayed in the e-mail notification.

Settings in the "healthtask:DiskCheck<specific_task>" block

The following settings must be made so that notifications (error or warning mails) are sent:

Example for block "healthtask:DiskCheck"

  • SendMailOnError 0/1: Non-existent paths trigger an error mail (if the key is activated)

    Example for "DiskCheck": Health Info Notification: DiskCheck -> Error

    Example for "DiskCheck": Health Info Notification: DiskCheck -> Error

  • SendMailOnWarning 0/1: If the disk space is less than the set value, a warning mail is sent (if the key is activated)

    Example for "DiskCheck": Health Info Notification: DiskCheck -> Warning

    Example for "DiskCheck": Health Info Notification: DiskCheck -> Warning

  • SendMailRepeat 0/1:

  • Paths (default): $CADENAS_DATA

  • WarnLimitGB: