--- title: "Adding Email Handler on Sensu Server" slug: "fortanix-dsm-for-adding-email-handler-to-sensu-server" updated: 2026-08-27T09:07:02Z published: 2026-08-27T09:07:02Z canonical: "support.fortanix.com/fortanix-dsm-for-adding-email-handler-to-sensu-server" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.fortanix.com/llms.txt > Use this file to discover all available pages before exploring further. # Adding Email Handler on Sensu Server ## 1.0 Introduction The purpose of this article is to describe the procedure for adding an email handler to a Sensu server to send email notifications or alerts when a check is executed or reaches a warning or critical status for a Fortanix Data Security Manager (DSM) instance. ## 2.0 Terminology References - SMTP - Simple Mail Transfer Protocol - VM - Virtual Machine ## 3.0 Prerequisites Before configuring the email handler, ensure the following: - The Sensu server is set up and monitoring the Fortanix DSM targets. ## 4.0 Configure Email Handler on Sense VM This section explains how to configure the email handler on the Sensu VM. Perform the following steps: 1. Run the following command to navigate to the `Monitoring-Server-Artifacts` folder on the Sensu VM created in “*Section 5.1: Setting Up Sensu Server” in* [*Fortanix DSM with Sensu Monitoring and Alerting*](/v1/docs/fortanix-dsm-sensu-monitoring-and-alerting): ```plaintext cd Monitoring-Server-Artifacts ``` 2. Run the following command to execute the `add_handlers.sh` script to add an email handler: ```plaintext ./add_handlers.sh ``` When prompted, select Y for email handler: ```plaintext Do you want to create email handler ? (Y/N): Y Creating email handler Specify From email address : Specify To email address : Specify SMTP server address : Does SMTP server allow insecure connection (unauthenticated on port 25)? (Y/N) : Specify SMPT username : Specify SMTP user password : Specify SMTP port (default 587) : Created Attaching email handler to all checks ``` 3. Verify the email handler configuration from Sensu Web user interface (UI): ![](https://cdn.us.document360.io/c3bd85d2-4ad8-4d85-9f60-f1c168a3aad9/Images/Documentation/image (58).png) **Figure 1: Select the Email handler** ![](https://cdn.us.document360.io/c3bd85d2-4ad8-4d85-9f60-f1c168a3aad9/Images/Documentation/image (57).png) **Figure 2: Email handler specification** ## 5.0 Configure Keepalive Handler This section explains how the keepalive handler monitors the status of the `sensu-agent` service on each node. ### 5.1 Configure Keepalive Handler on Sense VM Perform the following steps on the Sensu VM: 1. Run the following command to navigate to the `Monitoring-Server-Artifacts` folder in Sensu VM created in “*Section 5.1: Setting Up Sensu Server” in* [*Fortanix DSM with Sensu Monitoring and Alerting*](/v1/docs/fortanix-dsm-sensu-monitoring-and-alerting): ```plaintext cd Monitoring-Server-Artifacts ``` 2. Run the following command to create the `email-keepalive-handler.yml` file: ```plaintext vi email-keepalive-handler.yml ``` 3. Add the following configuration to the `email-keepalive-handler.yml` file: ```plaintext type: Handler api_version: core/v2 metadata:  name: keepalive  namespace: default spec:  handlers:  - email  type: set  filters:  - is_incident  - not_silenced ``` 4. Run the following command to create the keepalive handler for email handler: ```plaintext sensuctl create -f email-keepalive-handler.yml ``` 5. Run the following commands to reload the `systemd` manager configuration: ```plaintext sudo systemctl daemon-reload ``` 6. Run the following commands to restart the `sensu-agent` service: ```plaintext sudo systemctl restart sensu-agent ``` 7. Run the following command to verify the status of the `sensu-agent` service: ```plaintext sudo systemctl status sensu-agent ``` ### 5.2 Apply Configuration Changes on Fortanix DSM Node Perform the following steps on each Fortanix DSM node where the `sensu-agent` service is configured: 1. Add the following values in the `/etc/sensu/agent.yml` file: ```plaintext keepalive-warning-timeout: 60 keepalive-critical-timeout: 90 ``` 2. Run the following command to reload the `systemd` manager configuration: ```plaintext sudo systemctl daemon-reload ``` 3. Run the following command to restart the `sensu-agent` service: ```plaintext sudo systemctl restart sensu-agent ``` 4. Run the following command to verify the status of the `sensu-agent` service: ```plaintext sudo systemctl status sensu-agent ```