Spyderbat
Book a DemoStart FreeContact Us
  • Spyderbat Product Docs
  • Getting Started
    • Create an Organization
    • Install the Nano Agent
    • Three Things to Try with Spyderbat Community Edition
    • Manage Users and Roles
  • Installation
    • Spyderbat Nano Agent
      • Kubernetes
        • Pre Deployment Environment Data Collection Script
      • Linux Standalone
      • AWS Unattended Install
        • Secure your Registration Code with AWS Secrets Manager
      • Create a Golden Image with the Nano Agent Pre-Installed
    • Spyderbat AWS Agent
      • AWS Linux VM
      • Kubernetes
      • Configuration Guide - AWS Linux VM
      • Configuration Guide - Kubernetes
    • Install Spyctl CLI
      • Initial Configuration
    • Install Spydertop CLI
    • Install the Spyderbat Event Forwarder
      • Helm Chart
      • Traditional Installer
  • Concepts
    • Guardian & Interceptor
      • Ruleset Policies
      • Workload Policies
    • Flashback (Go Back In Time)
      • Investigations
    • Search
      • Saved Searches
    • Summarize
      • Spydertrace Summarize
    • Dashboards
      • Dashboard Categories
    • Reports
    • Notifications
      • Notification Targets
      • Notification Templates
    • Actions
    • Integrations
      • AWS Integration
      • Spyderbat Event Forwarder
    • Suppression & Tuning
    • Scout (Detections)
      • Custom Flags
  • Tutorials
    • Flashback
      • How to Use the Investigations Feature in Spyderbat
    • Guardian
      • How to Lock Down Your Workloads With Guardian Policies Using Spyctl
      • How to Put Guardrails Around Your K8s Clusters Using Spyctl
    • Integrations
      • How to Configure Event Forwarder Webhook for Panther
      • How to Set Up Spyderbat to Ingest Falco Alerts
      • How to Create and Use a Spyderbat API Key
    • Notifications
      • How to Set Up Notifications Using Spyctl
      • How to Set up Agent-Health Notifications Using Spyctl
    • Dashboards
    • Miscellaneous
      • How to Set Up Spyderbat to Monitor Systems From vulnhub.com
    • Scout (Detections)
      • How to Set Up Custom Flags Using Spyctl CLI
  • Reference
    • Policies
      • Response Actions
    • Rulesets
    • Selectors
    • Notifications
    • Spyctl CLI
      • Spyctl Commands
      • Guardian Policy Management using Spyctl
      • Notification Template Management using Spyctl
      • Notification Target Management using Spyctl
    • Search
      • All Operators
      • All Fields
      • All Related Objects
  • Quick Links
    • Contact Us
    • Try Spyderbat for Free
    • Book a Demo
Powered by GitBook

© SPYDERBAT, Inc., All Rights Reserved

On this page
  • Prerequisites
  • What are Notification Templates?
  • Managing Notification Templates
  • Create
  • Apply
  • Get or Download
  • Edit
  • Delete

Was this helpful?

Export as PDF
  1. Reference
  2. Spyctl CLI

Notification Template Management using Spyctl

Last updated 2 months ago

Was this helpful?

To learn more about what Notification Templates are, see

Prerequisites

If you have never used Spyctl start to learn how to install it, then follow the 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:

  1. email - Create an email notification template.

  2. pagerduty - Create a PagerDuty notification template.

  3. slack - Create a Slack notification template.

  4. 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.

 spyctl create notification-template [TYPE] -n NAME

For example:

 spyctl create notification-template slack -n slack-template > template.yaml

This will create a default Slack Notification Template and save it to a file called template.yaml.

apiVersion: spyderbat/v1
kind: NotificationTemplate
metadata:
  name: Example
  type: slack
spec:
  text: ''
  blocks: []

To get the template in JSON format use -o json option:

 spyctl create notification-template slack -n slack-template -o json > template.yaml

Apply

To make a Notification Template available for use, apply it using the apply command:

 spyctl apply -f FILENAME

For example:

 spyctl apply -f template.yaml

Get or Download

You can use the get command to view or download your Notification Templates.

 spyctl get notification-templates

For example:

 spyctl get notification-templates
Getting notification-templates
Page 1/1
NAME                 UID                        TYPE       CREATED                     DESCRIPTION
test-email-tmpl      tmpl:avgUE                 email      2024-09-30T21:06:03 UTC     Operations teams.

To download a Notification Template as YAML or JSON, use the -o option:

 spyctl get notification-templates -o yaml slack-template

Using the > character, you can save the document to a file:

 spyctl get notification-templates -o yaml slack-template > template.yaml

Edit

To modify an existing Notification Template, use the edit command:

spyctl edit notification-template NAME_OR_UID

For example:

 spyctl edit notification-template slack-template

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:

spyctl delete notification-template <NAME_OR_UID>

For example:

spyctl delete notification-template slack-template

Note: Learn How to populate the Template field values

Notification Templates
here
Initial Configuration
here