Notification Template Management using Spyctl
To learn more about what Notification Templates are, see Notification Templates
Prerequisites
If you have never used Spyctl start here to learn how to install it, then follow the Initial Configuration guide.
What are Notification Templates?
Notification Templates define the format of notifications sent via different channels such as Email, Slack, Webhook, and PagerDuty. These templates help in customizing the notification messages. You can either specify a Notification Target or a Notification Template that map specific targets to templates.
Available Notification Template Types:
email - Create an email notification template.
pagerduty - Create a PagerDuty notification template.
slack - Create a Slack notification template.
webhook - Create a webhook notification template.
Managing Notification Templates
Create
To create a new Notification Template, use the create command:
Note: This will only create a local YAML file for you to edit. It makes no immediate changes to your Spyderbat environment.
For example:
This will create a default Slack Notification Template and save it to a file called template.yaml.
To get the template in JSON format use -o json
option:
Note: Learn How to populate the Template field values here
Apply
To make a Notification Template available for use, apply it using the apply command:
For example:
Get or Download
You can use the get command to view or download your Notification Templates.
For example:
To download a Notification Template as YAML or JSON, use the -o option:
Using the > character, you can save the document to a file:
Edit
To modify an existing Notification Template, use the edit command:
For example:
This will open the template in your configured text editor for modification.
Delete
To remove a Notification Template from the Spyderbat system, use the delete command:
For example:
Last updated
Was this helpful?