Notification Template Management using Spyctl
Last updated
Was this helpful?
Last updated
Was this helpful?
To learn more about what Notification Templates are, see
If you have never used Spyctl start to learn how to install it, then follow the guide.
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.
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:
To make a Notification Template available for use, apply it using the apply command:
For example:
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:
To modify an existing Notification Template, use the edit command:
For example:
This will open the template in your configured text editor for modification.
To remove a Notification Template from the Spyderbat system, use the delete command:
For example:
Note: Learn How to populate the Template field values