Notification Configuration Management using Spyctl
Last updated
Last updated
© SPYDERBAT, Inc., All Rights Reserved
Published: December 7, 2023
To Learn more about Notification Configurations see:
If you have never used Spyctl start here to learn how to install it, then follow the Initial Configuration guide.
At least 1 Notification Target is required in order to use Notification Configurations.
To create a new Notification Configuration you can 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 creates a completely custom Notification Config. For first-time users we recommend creating Notifications Configs from a template.
This will give you a blank Notification Configuration that looks like this:
To better understand how to configure a custom Notification Config see the full documentation.
Note: for this example to work you would have to have an applied Notification Target named "OperationsTeam"
Creating a custom Notification Configuration from scratch is a complicated procedure and is recommended only for advanced users. For most use-cases Notification Configs should be created using Notification Configuration Templates.
For example:
When using a template most of the fields will be filled out for you, but you can still edit them to suit your preference. Refer to the full documentation to understand what each field does.
When creating new Notification Configs you may want to edit the generated document to customize some of the fields. With spyctl you can use the edit
command to ensure you don't accidentally introduce syntax errors.
If you have already applied the Notification Config you may edit the resource using the following:
For example:
This will bring up a prompt to select a text editor unless you have already done so previously. Then, using your text editor you may fill in your desired destination or destinations.
If you save without making any changes, nothing happens to the resource or file you're editing. If you save and there were syntax errors, Spyctl will save your draft to a temporary location and re-open it with comments detailing the errors. Finally, if your changes have no syntax errors, Spyctl will update the resource or file you're editing.
Note: If you edit a Notification Config in a local file, but the Config has already been applied. You will need to apply the file again for the updates to take effect.
In order for a Notification Config to be usable by the Spyderbat Notifications System you must first apply it using the apply
command.
For example:
If the operation is successful, the Spyderbat Notification System will now use your Notification Config to determine when to send you notifications.
To remove a Notification Config from the Spyderbat Notifications System you can use the delete
command.
For example:
Sometimes you might want to temporarily disable a Notification Config. When disabled, the Notification Config will still remain in the Notification System, however no notifications will be generated by it.
Use the edit
command to open up a text editor with your Notification Config
For example:
In the text editor, update the enabled
field in the Notification Config's spec:
As soon as you save, your changes will take effect.
You can use the get
command to view or download your Notification Configs.
For example:
The default output is a tabular summary of your Notification Configs. To download the Notification Config as yaml or json you can use the -o
option
Using the >
character you can save the document to a file.
Notification Configuration Templates are pre-built documents that serve as a starting point for Notification Configs. Currently, Templates are curated by Spyderbat and exist to help users setup the most commonly desired notifications.
You can use the get
command to view or download the list of Notification Config Templates.
Notification Config Templates are used as part of the Notification Config creation process.
For example: