Select Supported Platforms

Select Supported Architectures

Select Tier

Github Name


grant-singleton-nz/sensu-simple-google-chat-handler

v0.1.0 · public · Published 29 days ago

README
Asset Definition
Release Notes
Release Assets

Sensu Google Chat Handler

Sensu Bonsai Asset
Go Test
goreleaser

Table of Contents

Overview

The Sensu Google Chat Handler is a Sensu Handler that sends notifications to a
Google Chat space via webhooks. Messages include a link to the event in the Sensu dashboard
and organize messages by entity in Google Chat threads.

Files

  • main.go: The main Go file that implements the handler functionality
  • go.mod: Dependency management file for Go modules
  • .goreleaser.yml: Configuration for building and releasing the handler via GoReleaser
  • .github/workflows/: GitHub Actions workflow files for testing and releasing the handler

Usage examples

Help output

The Sensu Google Chat Handler is a Sensu Handler that sends alert notifications to Google Chat

Usage:
  sensu-simple-google-chat-handler [flags]
  sensu-simple-google-chat-handler [command]

Available Commands:
  help        Help about any command
  version     Print the version number of this plugin

Flags:
  -d, --dashboard string   URL prefix to dashboard with namespace
  -h, --help               help for sensu-simple-google-chat-handler
  -w, --webhook string     The webhook URL to post the message to

Use "sensu-simple-google-chat-handler [command] --help" for more information about a command.

Configuration

Asset registration

Sensu Assets are the best way to make use of this plugin. If you're not using an asset, please
consider doing so! You can use the following command to add the asset:

sensuctl asset add grant-singleton-nz/sensu-simple-google-chat-handler

You can also find the asset on the Bonsai Asset Index.

Handler definition

---
type: Handler
api_version: core/v2
metadata:
  name: google-chat
  namespace: default
spec:
  command: sensu-simple-google-chat-handler --webhook $GOOGLE_CHAT_WEBHOOK --dashboard $SENSU_DASHBOARD
  type: pipe
  runtime_assets:
    - grant-singleton-nz/sensu-simple-google-chat-handler
  secrets:
    - name: GOOGLE_CHAT_WEBHOOK
      secret: google-chat-webhook
  env_vars:
    - SENSU_DASHBOARD=https://sensu.example.com

Environment variables

Argument Environment Variable Default Required Description
--webhook GOOGLE_CHAT_WEBHOOK true The webhook URL to post the message to
--dashboard SENSU_DASHBOARD true URL prefix to dashboard with namespace

Installation from source

Download

Download the latest version of the sensu-simple-google-chat-handler from releases,
or create an executable from this source.

For Linux systems with go installed:

go install github.com/grant-singleton-nz/sensu-simple-google-chat-handler@latest

Contributing

For more information about contributing to this plugin, see Contributing.

Are you sure you want to report this asset?

Please describe the reason for reporting this asset. Our moderators will be notified and will disable the asset if it is found to be inappropriate.

×

You must be signed in to report this asset.

Sign In with Github

Download

×

Either download the source code:

Download Source

Or download the asset definition: