OpsCenter can post alerts to selected email addresses.
To enable email alerts, you must edit the <config_location>/event-plugins/email.conf
file and provide valid SMTP server host and port information. This file is located
in the following directories:
Procedure
-
Make sure that you have valid SMTP mail accounts to send and receive
alerts.
-
On the OpsCenter daemon host, open the email.conf file for editing.
-
Set enabled to 1.
-
Provide valid values for your SMTP host, port, user, and password.
-
Enable Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocol on
your system if you want secure communications. Typically, SSL is required.
-
Provide valid values for the to_addr and from_addr email addresses. The to_addr
value is the account that will receive alerts.
-
Optionally, set the level of alerts to send and the desired subject line.
-
Save <config_location>/event-plugins/email.conf
and restart the OpsCenter daemon.
To send alerts to multpile email addresses, create a different email conf file
with settings for each email address. All conf files are loaded so you can name
them email1.conf, email2.conf, and so on.
Example
In a system with email alerts enabled for critical and alert-level events,
<config_location>/event-plugins/email.conf
looks
like:
[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 = CRITICAL,ALERT
smtp_host = smtp.gmail.com
smtp_port = 465
smtp_user = mercury@gmail.com
smtp_pass = *********
smtp_use_ssl = 1
smtp_use_tls = 0
to_addr = cassandra_admin@acme.com
from_addr = mercury@gmail.com
subject = OpsCenter Event