The FlashGrid cluster 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. This will push the change to all nodes in your cluster (run as the user 'fg' , include a space between each recipient address). It will overwrite existing setting:
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, run the following on each node in your cluster, and confirm with all recipients that the emails were received:
$ flashgrid-node test-alerts
Modifying the sender 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
This configuration will be pushed to all nodes in the cluster.
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'
This configuration will be pushed to all nodes in the cluster.
Troubleshooting email delivery
Emails are forwarded from the FlashGrid software to the local Postfix email software installed on each host. By default, most cloud providers prevent instances from sending outbound email over port 25, so it is recommended to use your organization's own SMTP relay system. This will ensure local delivery to your organization email, and reduce the likely-hood of remote systems blocking the email due to email black-lists.
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 setup to allow forwarding of emails from your Flashgrid nodes (this may include modification to security groups within your deployment). Consult your systems administration team for further advice on this.
Basic steps:
In /etc/postfix/main.cf on all nodes (make a backup copy before any change):
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.