AMC does not send email alerts until logged in to console

AMC does not send email alerts until logged in to console

Problem Description

When AMC is being used to monitor an Aerospike cluster there is a facility to configure email alerts by editing the mailer stanza of /etc/amc/amc.conf. When this has been done and AMC has been started there are no email alerts sent, regardless of cluster state, until the AMC console has been accessed via web browser.

Explanation

This issue will manifest when there has been no cluster configured for monitoring in /etc/amc/amc.conf. Until this is done, AMC is not aware of any clusters to be monitored. Logging in to AMC via the web browser requires a cluster to be selected for monitoring. At this point AMC has something to monitor and so will send alert emails as appropriate. This is expected behaviour.

Solution

To ensure that email alerts are sent all the time an entry should be made in /etc/amc/amc.conf in the amc.clusters stanza. This means that as soon as AMC starts it will monitor the chosen cluster and send email alerts. An example is shown below:

[amc.clusters.db1]
host = "172.17.0.3"
port = 3000
show_in_ui = true

Keywords

AMC EMAIL ALERT NOT SENT

Timestamp

27 June 2019

© 2015 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.