kind: smtp version: v2 metadata: name: smtp spec: host: <smtp host> port: <smtp port> username: <username> password: <password> --- kind: alerttarget version: v2 metadata: name: email-alerts spec: email: <email>
Configure Alerting on Runtime Fabric
Runtime Fabric enables you to send alerts through an existing SMTP server. Runtime Fabric provides alert functionality to send notifications when system health is compromised.
Install rtfctl
The rtfctl
utility is required to manage alert sender email on Runtime Fabric. Perform the steps in Install rtfctl before completing the following steps.
Procedure
-
Using a terminal, open a shell/SSH connection to a controller VM.
-
Create a file named
alert-smtp.yaml
that contains the following: -
Modify the contents of
alert-smtp.yaml
using the following values specific to your environment:Table 1. Environment Variables Key Description <smtp host>
The endpoint of the SMTP server.
<smtp port>
The port used to connect to the SMTP server. (465 by default).
<username>
The username to use when connecting to the SMTP server.
<password>
The password to use when connecting to the SMTP server.
<email>
The recipient email address.
-
Run the following on the controller VM.
$ sudo gravity resource create -f alert-smtp.yaml
-
Use the
rtfctl
utility to set the alert sender email address containing your SMTP domain. Use a distinguishable email address for each cluster to identify the cluster triggering the alert.$ sudo ./rtfctl appliance apply alert-smtp-from "sender@example.com"
Alerts with the designated alert sender email address are now configured to be sent through your SMTP server.
Currently, only one alerts email recipient is supported. |
Built-in Alerts
The following table lists some of default alerts provided by Anypoint Runtime Fabric:
Alert | Description |
---|---|
High CPU usage |
Sends a warning when > 75% used. Triggers a critical error when > 90% used. |
High memory usage |
Sends a warning when > 80% used. Triggers a critical error when > 90% used. |
High disk space usage |
Sends a warning when > 80% used. Triggers a critical error when > 90% used. |
High node usage |
Sends a warning when > 90% used. Triggers a critical error when > 95% used. |
etcd instance health |
Sends an error when the etcd master is unaccessible for longer than 5 min. |