Enabling email alerts
OpsCenter can post alerts to multiple email addresses. To send alerts to multiple email addresses, create a different email configuration file with settings for each email address.
To enable email alerts, edit the <config_location>/event-plugins/email.conf file and provide valid SMTP server host and port information.
Prerequisites
Procedure
Example
[email]
# set to 1 to enable email
enabled=1
# levels can be comma delimited list of any of the following:
# DEBUG,INFO,WARN,ERROR,CRITICAL,ALERT
# If left empty, will listen for all levels
levels=WARN
smtp_host=smtp.gmail.com
smtp_port=465
smtp_user=mercury@gmail.com
smtp_pass=*********
smtp_use_ssl=1
smtp_use_tls=0
smtp_retries=1
smtp_timeout=5
to_addr=cassandra_admin@acme.com
from_addr=mercury@gmail.com
# Customizable subject for email. The key specified in {}'s must map to the items provided in json map at the end of
# the emails. For example, some available keys are:
# node, cluster, datetime, level_str, message, target_node, event_source, success, api_source_ip, user, source_node
# more advanced formatting options explained here: https://docs.python.org/2/library/string.html#formatspec
subject=[{level_str}] OpsCenter Event on {cluster} - {message}
Example
The email subject could appear as:
[WARN] OpsCenter Event - Node reported as being down: 127.0.0.1