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
  • Managing Notification Targets
  • Create
  • Edit
  • Apply
  • Delete
  • View or Download

Was this helpful?

Export as PDF
  1. Reference
  2. Spyctl CLI

Notification Target Management using Spyctl

Last updated 2 months ago

Was this helpful?

To learn more about what Notification Targets are, see:

Prerequisites

If you have never used Spyctl start to learn how to install it, then follow the guide.

Managing Notification Targets

Create

To create a new Notification Target 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.

spyctl create notification-target -n NAME -T TYPE

For example:

spyctl create notification-target -n OperationsTeam -T emails > target.yaml

This will create a default Notification Target and save it to a file called target.yaml

target.yaml
apiVersion: spyderbat/v1
kind: NotificationTarget
metadata:
  name: OperationsTeam
spec:
  emails:
  - example@example.com

Edit

When creating new Notification Targets you will need to edit the default document to point to the proper destination. With spyctl you can use the edit command to ensure you don't accidentally introduce syntax errors.

spyctl edit -f FILENAME
spyctl edit [OPTIONS] notification-target NAME_OR_UID

For example:

spyctl edit -f target.yaml

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.

Apply

In order for a Notification Target to be usable by the Spyderbat Notifications System you must first apply it using the apply command.

spyctl apply -f FILENAME

For example:

spyctl apply -f target.yaml

If the operation is successful, your Notification Target will be ready for use.

Delete

To remove a Notification Target from the Spyderbat Notifications System you can use the delete command.

spyctl delete [OPTIONS] notification-target NAME_OR_UID

For example:

spyctl delete notification-target OperationsTeam

View or Download

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

spyctl get [OPTIONS] notification-targets [NAME_OR_UID]

For example:

spyctl get notification-targets
$ spyctl get notification-targets
Getting notification-targets
NAME              ID                                  AGE    TYPE      DESTINATIONS
OperationsTeam    notif_tgt:XXXXXXXXXXXXXXXXXXXXXX    7d     emails               1

The default output is a tabular summary of your Notification Targets. To download the Notification Target as yaml or json you can use the -o option

spyctl get notification-targets -o yaml OperationsTeam
$ spyctl get notification-targets -o yaml OperationsTeam
apiVersion: spyderbat/v1
kind: NotificationTarget
metadata:
  name: OperationsTeam
spec:
  emails:
  - engineer1@example.com
  - engineer2@example.com

Using the > character you can save the document to a file.

spyctl get notification-targets -o yaml OperationsTeam > target.yaml

If you have already the Notification Target you may edit the resource using the following:

Note: If you edit a Notification Target in a local file, but the Target has already been . You will need to apply the file again for the updates to take effect.

Notification Targets
here
Initial Configuration
applied
applied