Skip to content
Webex teams handler for Sensu Go
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
contrib
images
.bonsai.yml
.gitignore
.goreleaser.yml
.travis.yml
CHANGELOG.md
LICENSE
README.md
go.mod
go.sum
main.go
main_test.go
template.go

README.md

Sensu Go webex Handler

Bonsai Asset Badge Build Status Go Report Card GitHub issues GitHub forks GitHub stars GitHub license codecov

The Sensu webex handler is a Sensu Event Handler that sends event data to a configured webex channel. This plugin was mostly copied from the Sensu slack handler and repurposed for Webex Teams.

screenshot

Installation

Download the latest version of the sensu-webex-handler from releases, or create an executable script from this source.

From the local path of the webex-handler repository:

go build -o /usr/local/bin/sensu-webex-handler main.go template.go

Configuration

Example Sensu Go handler definition:

webex-handler.json

{
    "api_version": "core/v2",
    "type": "Handler",
    "metadata": {
        "namespace": "default",
        "name": "webex"
    },
    "spec": {
        "type": "pipe",
        "command": "sensu-webex-handler --api-key abc123 --room-id 'ABCDEFGHIJKLMNOP123' \\",
        "timeout": 30,
        "filters": [
            "is_incident"
        ]
    }
}

sensuctl create -f webex-handler.json

Example Sensu Go check definition:

{
    "api_version": "core/v2",
    "type": "CheckConfig",
    "metadata": {
        "namespace": "default",
        "name": "dummy-app-healthz"
    },
    "spec": {
        "command": "check-http -u http://localhost:8080/healthz",
        "subscriptions":[
            "dummy"
        ],
        "publish": true,
        "interval": 10,
        "handlers": [
            "webex"
        ]
    }
}

Usage examples

Help:

The Sensu Go Webex Teams handler for event forwarding

Usage:
  sensu-webex-teams-handler [flags]

Flags:
  -k, --api-key string   API key for authenticated access
  -a, --api-url string   Webex Teams API (default "api.ciscospark.com")
  -h, --help             help for sensu-webex-teams-handler
  -r, --room-id string   Room or email to send alert to
You can’t perform that action at this time.