https://github.com/johntdyer/sensu-webex-handler
Webex teams handler for Sensu Go
https://github.com/johntdyer/sensu-webex-handler
sensu sensu-go sensu-handler webex webex-teams
Last synced: 7 months ago
JSON representation
Webex teams handler for Sensu Go
- Host: GitHub
- URL: https://github.com/johntdyer/sensu-webex-handler
- Owner: johntdyer
- License: mit
- Created: 2019-01-02T18:47:04.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-03-17T19:56:59.000Z (over 4 years ago)
- Last Synced: 2025-04-10T06:19:48.961Z (7 months ago)
- Topics: sensu, sensu-go, sensu-handler, webex, webex-teams
- Language: Go
- Size: 5.94 MB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Sensu Go webex Handler
[](https://bonsai.sensu.io/assets/johntdyer/sensu-webex-handler)






[](https://codecov.io/gh/johntdyer/sensu-webex-handler)
The Sensu webex handler is a [Sensu Event Handler][1] that sends event data to
a configured webex channel. This plugin was mostly copied from the [Sensu slack handler][2] and repurposed for [Webex Teams][4].

## Installation
Download the latest version of the sensu-webex-handler from [releases][2],
or create an executable script from this source.
From the local path of the webex-handler repository:
```go
go build -o /usr/local/bin/sensu-webex-handler main.go template.go
```
## Configuration
Example Sensu Go handler definition:
webex-handler.json
```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:
```json
{
"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:
```shell
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
```
[1]: https://docs.sensu.io/sensu-go/5.0/reference/handlers/#how-do-sensu-handlers-work
[2]: https://github.com/johntdyer/sensu-webex-handler/releases
[3]: https://github.com/sensu/sensu-slack-handler
[4]: https://developer.webex.com