Email Alerts - CPNV-ES-MAS3-X/Pandora-Containerization GitHub Wiki

Email When Alert Triggers

# Outlook account that will send the alert mais
[email protected]
Pa$$w0rd 2023

#SMTP Info from outlook : Settings > Show All Outlook settings > Mails > Syncro of mails
# Example below

Nom de serveur : smtp.office365.com
Port : 587
Méthode de chiffrement : STARTTLS

Informations picked up from here

image

#Mail configuration on PandoraFMS
From address : [email protected]
From name : Pandora FMS
SMTP Server : smtp.office365.com
SMTP Port : 587
Encryption : STARTTLS
E-mail user : [email protected]
E-mail password : Pa$$w0rd2023

#Pandora Interface Below

image

Email Test worked with this configuration

image

Email when Alerts Configuration

In Progress

New Alert Action

image

image

image

image

Times always 0 sec on creation

CPU Load Module Settings

image

Sources used

[11. Email Alert | Pandora FMS Guides](https://pandorafms.com/guides/public/books/first-steps-with-pandora-fms/page/11-email-alert)

[Pandora FMS configurat... | Pandora FMS Guides](https://pandorafms.com/guides/public/books/discord-integration/page/pandora-fms-configuration-creation-of-an-alert-command)

[Email alert configuration [Pandora FMS Documentation]](https://pandorafms.com/manual/en/quickguides/configuration_emails_alerts)

Possible Issues

After some time testing, we noticed the first email used for the smtp alerts was locked due to suspect activiy. This might happen again in the future. Even so that the activity is not flaged as suspect on the activity screen.

image

Usefull files

  • pandora_server.conf : Pandora Server main configuration file, there is mta_* settings that are for the SMTP, however we have a warrning on the SMTP Settings of Pandora that says, any configuration on this file will overwrite the WebUI configuration, that's why we comment all of them.

  • main.cf : This file is the main configuration file for PostFix, the mail agent used and installed by Pandora by default. Same situation, everything is as base installation left it and its not mentioned that you have to touch this file.

#Logs
##Server Logs
/var/log/pandora/pandora_server.log 

##Mail Logs
/var/log/mail.log

##Console Log : 
pandora_console/log/console.log

##Audit Log : 
pandora_console/log/audit.log

Mail Templates

Critical

<div style="background-color: #eaf0f6; font-family: Arial, Helvetica, sans-serif; padding: 30px; margin: 0;">
<table style="max-width: 560px; background-color: white; border-radius: 10px; padding: 10px 20px 40px;" cellspacing="0" cellpadding="0" align="center">
<thead>
<tr>

<p style="text-align: right; color: #223549; font-weight: bold; line-height: 36px; padding: 0px; font-size: 12px;">Automatic alert system</p>

<tr>
<td style="padding: 0px 0px 5px;" colspan="2"><hr style="border: 1px solid #f5f5f5; width: 100%; margin: 0px;"></td>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">
<p style="font-size: 24px; text-align: center; color: #223549; padding: 0px 10%; line-height: 34px; margin: 20px 0px;">We have bad news for you, something is on <span style="text-transform: uppercase; font-weight: 800;">critical</span> status!</p>
</td>
</tr>
<tr>
<td colspan="2">
<div style="background-color: #f6f6f6; border-radius: 10px; padding: 10px 20px; margin-top: 40px;">
<p style="font-size: 18px; line-height: 30px; color: #223549;">Monitoring details</p>
<p style="font-size: 15px; color: #333333; font-weight: 800; line-height: 15px;">Data: <span style="font-weight: 400!important;">_data_ <em>(critical)</em></span></p>
<p style="font-size: 15px; color: #333333; font-weight: 800; line-height: 15px;">Agent: <span style="font-weight: 400!important;">_agent_ <em>_address_</em></span></p>
<p style="font-size: 15px; color: #333333; font-weight: 800; line-height: 15px;">Module: <span style="font-weight: 400!important;">_module_ <em>_moduledescription_</em></span></p>
<p style="font-size: 15px; color: #333333; font-weight: 800; line-height: 15px;">Timestamp: <span style="font-weight: 400!important;">_timestamp_</span></p>
</div>
</td>
</tr>
</tbody>
</table>
<div style="text-align: center; margin-top: 10px;">
</div>
</div>

Recovery

<div style="background-color: #eaf0f6; font-family: Arial, Helvetica, sans-serif; padding: 30px; margin: 0;">
<table style="max-width: 560px; background-color: white; border-radius: 10px; padding: 10px 20px 40px;" cellspacing="0" cellpadding="0" align="center">
<thead>
<tr>
    
<p style="text-align: right; color: #223549; font-weight: bold; line-height: 36px; padding: 0px; font-size: 12px;">Automatic alert system</p>

<tr>
<td style="padding: 0px 0px 5px;" colspan="2"><hr style="border: 1px solid #f5f5f5; width: 100%; margin: 0px;"></td>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">
<p style="font-size: 24px; text-align: center; color: #223549; padding: 0px 10%; line-height: 34px; margin: 20px 0px;">We have good news for you, alert has been <span style="text-transform: uppercase; font-weight: 800;">recovered</span></p>
</td>
</tr>
<tr>
<td colspan="2">
<div style="background-color: #f6f6f6; border-radius: 10px; padding: 10px 20px; margin-top: 40px;">
<p style="font-size: 18px; line-height: 30px; color: #223549;">Monitoring details</p>
<p style="font-size: 15px; color: #333333; font-weight: 800; line-height: 15px;">Data: <span style="font-weight: 400!important;">_data_ <em>(normal)</em></span></p>
<p style="font-size: 15px; color: #333333; font-weight: 800; line-height: 15px;">Agent: <span style="font-weight: 400!important;">_agent_ <em>_address_</em></span></p>
<p style="font-size: 15px; color: #333333; font-weight: 800; line-height: 15px;">Module: <span style="font-weight: 400!important;">_module_ <em>_moduledescription_</em></span></p>
<p style="font-size: 15px; color: #333333; font-weight: 800; line-height: 15px;">Timestamp: <span style="font-weight: 400!important;">_timestamp_</span></p>
</div>
</td>
</tr>
</tbody>
</table>
<div style="text-align: center; margin-top: 10px;">
</div>
</div>
⚠️ **GitHub.com Fallback** ⚠️