Use this file to discover all available pages before exploring further.
Create an email notifier to send monitor alerts to a specific email address.Select from the following methods to create an email notifier. You can use
variables in your
notifiers.
Web
Chronoctl
Terraform
API
In the navigation menu select
Alerts > Notifiers.
Click Create notifier.
Enter a descriptive name for the notifier.
Select Email as the type of notifier you want to create.
In the Email field, add the destination email address.
Optional: In the Body field, enter HTML or text body content.
Optional: Select Notify when resolved to send a resolved alert notification.
Click Save.
To create one or more notifiers using Chronoctl, create a YAML file
that defines them and apply the configuration to your instance.
You can use the notifiers scaffold command to generate an example notifier, and
then copy the resource definition for your notifier type:
chronoctl notifiers scaffold
Define the resource definition for your email notifier:
api_version: v1/configkind: Notifierspec: name: NAME slug: SLUG skip_resolved: true email: - to: ADDRESS html: '<b>Alert triggering</b>' text: 'Alert triggering'
Replace the following:
NAME: A descriptive name, such as team-email.
SLUG: A unique identifier, such as team-email.
ADDRESS: An email address destination for the notifier.
Optional: Update the html or text keys to include custom HTML or text body
content.
Apply the changes:
chronoctl apply -f FILE_NAME.yaml
Replace FILE_NAME with the name of your notifier YAML file.
To create an email notifier:
Create an email notifier with Terraform by using the
chronosphere_email_alert_notifier type followed by a name in a resource
declaration:
resource "chronosphere_email_alert_notifier" "email_notifier" { name = "Email Notifier" # Optional slug of the email notifier. slug = "email-notifier" ## Notifier-specific required configuration # For detailed definitions, see # https://prometheus.io/docs/alerting/latest/configuration/#email_config to = "your-address@example.com" ## Notifier-specific optional configurations html = "<b>Alert triggering</b>" text = "Alert triggering"}
Modify the to key to add the destination email address.
Optional: Update the html or text keys to include custom HTML or text body
content.
Run terraform apply to create the notifier resource.
terraform apply
To complete this action with the Chronosphere API, use the email object in the
CreateNotifier endpoint.Because the Chronosphere API requires authentication, include an API token with your
curl request, as shown in the following example. For more details, see
Create an API token.