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
  • Overview
  • Prerequisites
  • Step-by-Step Guide
  • Step 1: Identify Notification Targets
  • Step 2: Create an Agent Health Notification Setting
  • Step 3: Edit an Existing Notification Setting
  • Step 4: List All Existing Notification Settings
  • Step 5: Delete an Agent Health Notification Setting

Was this helpful?

Export as PDF
  1. Tutorials
  2. Notifications

How to Set up Agent-Health Notifications Using Spyctl

Last updated 3 months ago

Was this helpful?

Overview

The spyctl create agent-health-notification-settings command in Spyctl allows you to configure notifications for agent health events. This helps you stay informed about the status (Unhealthy, Offline, Online, Healthy) of agents in your environment.

Prerequisites

Before configuring agent health notifications, ensure you have:

  • Install Spyctl ()

  • Configure Spyctl with a context ()

  • Spyderbat Notifications

  • What are Notification Targets? ()


Step-by-Step Guide

Step 1: Identify Notification Targets

Before setting up agent health notifications, ensure you have configured notification targets. These can include:

  • Email

  • Slack Channel

  • Webhook

  • PagerDuty


Step 2: Create an Agent Health Notification Setting

Use the below command to create a new notification setting. Once configured, agent health alerts are received in real-time on the chosen targets.

Available Options

spyctl create  agent-health-notification-settings -h
Option
Description

-a, --apply

Apply the agent health notification settings during creation.

-n, --name

Custom name for the agent health notification settings. (Required)

-d, --description

Description of the agent health notification settings.

-q, --scope-query TEXT

SpyQL query on model_agents table to determine which agents the setting applies to.

-T, --targets

Comma-separated list of notification targets.

--is-disabled

Disable the agent health notification settings on creation.

`-o, --output [yaml

json

-y, --yes

Automatically answer yes to all prompts.

Creating a agent-health-notification-settings

spyctl create agent-health-notification-settings \
  --name "Agent Health Alerts" \
  --description "Alerts for agent health issues" \
  --targets "work-email"

This command creates an agent health notification setting named Agent Health Alerts, which triggers notifications for unhealthy agents and sends them to the specified targets.


Step 3: Edit an Existing Notification Setting

To modify an existing agent health notification setting, use:

spyctl edit agent-health-notification-settings <NAME_OR_UID>

For example:

spyctl edit agent-health-notification-settings "Agent-Health Alerts"

Step 4: List All Existing Notification Settings

To view all configured agent health notification settings, run:

spyctl get agent-health-notification-settings

To get a particular agent-health-notification-settings use <NAME_OR_UID>

spyctl get agent-health-notification-settings -o json

Step 5: Delete an Agent Health Notification Setting

To stop receiving agent health notification, use:

spyctl delete agent-health-notification-settings <NAME_OR_UID>

For example:

spyctl delete agent-health-notification-settings "Agent Health-Alerts"
Installation Guide
Spyctl Initial Configuration
Spyderbat Notifications Overview
Notification Targets Management