Notification Targets

What are Notification Targets?

Notification Targets are named destinations where notifications can be sent.

You create Notification Targets to receive notifications via email, Slack, AWS SNS, and webhook. You specify which Notification Targets to use when creating Notification Configurations.

Using Notification Targets

Notification Targets can be referenced while configuring notifications for Notifiable Objects using Spyctl. You can either specify a Notification Target or a Notification Template that map specific targets to templates like below.

Example usage with Spyctl:

Example:

spyctl notifications configure saved-query QUERY_UID \
  --target TARGET_NAME_OR_UID \
  --target-map TARGET_NAME_OR_UID=TEMPLATE_NAME_OR_UID

Usage:

spyctl notifications configure saved-query query:abc \
  --target OperationsTeam \
  --target-map SecurityTeam=email-template \

The $spyctl notifications configure command allows notifications to be sent using either Custom templates with Targets or directly via Targets (using Default Template).

Types:

Emails

Email Notification Targets contain a list of email address destinations for notifications.

apiVersion: spyderbat/v1
kind: NotificationTarget
metadata:
  name: Example
  type: email
spec:
  emails:
  - engineer1@example.com
  - engineer2@example.com

Slack

Slack Notification Targets contain a single Slack Hook URL destination for notifications.

apiVersion: spyderbat/v1
kind: NotificationTarget
metadata:
  name: Example
  type: slack
spec:
  url: https://hooks.slack.com/services/xxxxxxxxxxx/xxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx

Webhook

Webhook Notification Targets contain a single generic webhook URL destination for notifications.

apiVersion: spyderbat/v1
kind: NotificationTarget
metadata:
  name: Example
  type: webhook
spec:
  url: https://my.webhook.example/location/of/webhook

PagerDuty

PagerDuty Notification Targets contain a single routing key used to send notifications to a specific PagerDuty service.

apiVersion: spyderbat/v1
kind: NotificationTarget
metadata:
  name: Example
  type: pagerduty
spec:
  routing_key: abcdef1234567890abcdef1234567890

Manage Notification Targets Using Spyctl

To start creating Targets follow our tutorial using spyctl :: Manage Notification Targets Using Spyctl

Quick Start Tutorial

If you already have Targets set, start configuring Spyderbat Notifications using spyctl.

How to setup Spyderbat Notifications (Spyctl CLI)

Last updated

Was this helpful?