# Assigning an Alert to a Module

Go the agent editing, where the module is defined and click on the alert tab:

[![pfms-agent_add_alert.png](https://pandorafms.com/guides/public/uploads/images/gallery/2023-08/scaled-1680-/pfms-agent-add-alert.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2023-08/pfms-agent-add-alert.png)

Now add the module (**Host Alive**), the template (**Critical Condition**) and the action (**Mail to admin**). Click **Add alert**.

[![pfms-agent_add_alert_2.png](https://pandorafms.com/guides/public/uploads/images/gallery/2023-08/scaled-1680-/pfms-agent-add-alert-2.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2023-08/pfms-agent-add-alert-2.png)

Once added, you may see in the agent view whether it is running or not, by taking a look at is state color:

[![pfms-agent_add_alert_3.png](https://pandorafms.com/guides/public/uploads/images/gallery/2023-08/scaled-1680-/pfms-agent-add-alert-3.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2023-08/pfms-agent-add-alert-3.png)

When the host goes offline the alert will fire:

[![pfms-agent_add_alert_4.png](https://pandorafms.com/guides/public/uploads/images/gallery/2023-08/scaled-1680-/pfms-agent-add-alert-4.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2023-08/pfms-agent-add-alert-4.png)

An email should be received, something similar to this one:[![guiarapida_mail.png](https://pandorafms.com/guides/public/uploads/images/gallery/2023-08/scaled-1680-/guiarapida-mail.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2023-08/guiarapida-mail.png)

Pandora FMS alerts are extremely flexible and, therefore sometimes complex to use. There is a specific chapter for those in the documentation: [Alerts in Pandora FMS](https://pandorafms.com/manual/).