Skip to content
Sensu Go GoAlert Handler
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.
cmd/sensu-goalert-handler
.bonsai.yml
.gitignore
.goreleaser.yml
.travis.yml
CODE_OF_CONDUCT.md
Gopkg.lock
Gopkg.toml
LICENSE.md
README.md
event_example.json
go.mod
go.sum

README.md

Sensu Go GoAlert Handler

Bonsai Asset Badge TravisCI Build Status

Sensu Go event handler that will create and close alerts in GoAlert.

Configuration

Asset Registration

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

sensuctl asset add target/sensu-go-goalert:0.0.6

If you're using an earlier version of sensuctl, you can find the asset on the Bonsai Asset Index.

Examples

Example Sensu Go handler definition (named goalert-handler.json):

{
  "type": "Handler",
  "api_version": "core/v2",
  "metadata": {
    "name": "goalert",
    "namespace": "default"
  },
  "spec": {
    "type": "pipe",
    "command": "sensu-go-goalert",
    "env_vars": ["GOALERT_URL=ENTER_GENERIC_INTEGRATION_KEY_URL_HERE"],
    "filters": [
      "is_incident",
      "not_silenced"
      ],
    "handlers": [],
    "runtime_assets": ["target/sensu-go-goalert"],
    "timeout": 15
  }
}

sensuctl create -f goalert-handler.json

Example Sensu Go check definition:

{
  "api_version": "core/v2",
  "type": "CheckConfig",
  "metadata": {
    "namespace": "default",
    "name": "example-health"
  },
  "spec": {
    "command": "curl -s http://localhost:3030/health",
    "subscriptions": ["example"],
    "publish": true,
    "interval": 10,
    "handlers": ["goalert"]
  }
}

Installation

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

Run
go get github.com/target/sensu-go-goalert/...
to install the sensu-goalert-handler binary into your GOPATH automatically.

Or, run
go build ./cmd/sensu-goalert-handler
to build the sensu-goalert-handler binary into the current directory.

You can’t perform that action at this time.