Sensu Bonsai Asset Go Test goreleaser

Sensu Squadcast Handler

The Sensu Go Squadcast handler is a Sensu Event Handler that sends event data to a Squadcast endpoint. Refer Squadcast documentation for more details.

Configuration

Asset registration

Run the following command to add the asset sensu-squadcast-handler.

sensuctl asset add SquadcastHub/sensu-squadcast-handler

Handler definition

Example Sensu Go handler definition:

squadcast-handler.yaml

type: Handler
api_version: core/v2
metadata:
  name: squadcast
  namespace: default
spec:
  command: sensu-squadcast-handler
  env_vars:
  - SENSU_SQUADCAST_APIURL=<Squadcast Alert Source Url>
  runtime_assets:
  - SquadcastHub/sensu-squadcast-handler
  filters:
  - is_incident
  timeout: 10
  type: pipe

Run the following to create the handler:

sensuctl create -f squadcast-handler.yaml

Example Sensu Go check definition:

api_version: core/v2
type: CheckConfig
metadata:
  namespace: default
  name: health-check
spec:
  command: check-http -u http://localhost:8080/health
  subscriptions:
  - test
  publish: true
  interval: 10
  handlers:
  - squadcast

Usage examples

Help:

The Sensu Go Squadcast handler sends Sensu events to Squadcast


Usage:
  sensu-squadcast-handler [flags]


Flags:
  -a, --api-url string         The URL for the Squadcast API
  -h, --help                   help for sensu-squadcast-handler
  -e, --entity-id string       The template to use for the Entity ID (default "{{.Entity.Name}}/{{.Check.Name}}")
  -s, --state-message string   The template to use for the state message (default "{{.Entity.Name}}:{{.Check.Name}}:{{.Check.Output}}")