The FlashGrid deployments can be configured to send email notifications when certain conditions occur. These notifications can be sent to one or more recipients.
Modify the recipient list
To change recipients, use the flashgrid-cluster set-email-alerts
command. In the case of the FlashGrid cluster, this command will push the change to all nodes (run as the user 'fg', include a space between each recipient address). It will overwrite existing settings.
For example:
$ flashgrid-cluster set-email-alerts list1@yourcompany.co list2@yourcompany.co
Note: Using individual user addresses is not recommended. Use a distribution list address or a Slack channel address instead.
Sending a test notification
To validate email configuration and confirm with all recipients that the emails were received:
Run the following command (in a cluster, run on each node):
$ flashgrid-node test-alerts
Modifying the sender's address
The standard sender address is flashgrid@host. If you wish to change this, use the flashgrid-cluster set
command as follows (user 'fg'):
$ flashgrid-cluster set alert_reporter.email_from_addr flashgrid@host
In the case of the FlashGrid cluster, the configuration will be pushed to all nodes.
Modifying the subject line
By default, emails will be sent with the subject "'FlashGrid %(common.hostname)s alert'"
This can be modified using flashgrid-cluster set
command (user 'fg'):
$ flashgrid-cluster set alert_reporter.email_subject = 'FlashGrid %(common.hostname)s alert'
In the cluster environments, the configuration will be pushed to all nodes.
Troubleshooting email delivery
Emails are forwarded from the FlashGrid software to the local Postfix email software installed on the host(s). By default, most cloud providers prevent instances from sending outbound email over port 25, so using your organization's own SMTP relay system is recommended. This will ensure local delivery to your organization's email and reduce the likelihood of remote systems blocking the email due to email blacklists.
Configuration of the Postfix relayhost is discussed in this article (external site): http://www.postfix.org/postconf.5.html#relayhost
You must ensure that your instances are able to connect to your organization's relay server and that the relay server is set up to allow forwarding of emails from your FlashGrid VM(s). This may include modification to security groups within your deployment. Consult your systems administration team for further advice on this.
Basic steps:
In the case of a FlashGrid cluster, perform the following steps on all nodes.
- Make a backup copy of the configuration file before any change.
- Update the following parameter in /etc/postfix/main.cf:
relayhost = [<your_intermediary_smtp]:<port>
The [ ] forces Postfix to skip MX record lookups and since you want to route the e-mails through it, you'll need it.
- After making the change, run:
# systemctl restart postfix
If required, you may also need to set the local hostname in main.cf (myhostname parameter).
Postfix records mail deliveries in the /var/log/maillog file. Review this to troubleshoot further.