Select Supported Platforms

Select Supported Architectures

Select Tier

Github Name


v1.1.0 · public · Published over 4 years ago

README
Asset Definition
Release Notes
Release Assets

Sensu Go Alerta Handler

Bonsai Asset Badge TravisCI Build Status

Forward Sensu events to Alerta.

Installation

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

From the local path of the sensu-alerta-handler repository:

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

Configuration

Example Sensu Go handler definition:

alerta-handler.json

{
    "api_version": "core/v2",
    "type": "Handler",
    "metadata": {
        "namespace": "default",
        "name": "alerta"
    },
    "spec": {
        "type": "pipe",
        "command": "sensu-alerta-handler --endpoint-url https://alerta.example.com/api",
        "env_vars": [
            "ALERTA_API_KEY=G25k9JR2yoZIcHROQGS477nk_Riw4CIghFC6j9NE"
        ],

        "timeout": 30,
        "filters": [
            "is_incident"
        ]
    }
}

Create the handler resource:

$ sensuctl create -f alerta-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": [
            "alerta"
        ]
    }
}

Usage Examples

Help:

The Sensu Go Alerta handler for event forwarding

Usage:
  sensu-alerta-handler [flags]

Flags:
  -K, --api-key string        API key for authenticated access
      --endpoint-url string   API endpoint URL (default "http://localhost:8080")
  -E, --environment string    Environment eg. Production, Development (default "Entity Namespace")
  -h, --help                  help for sensu-alerta-handler

Contributing

See https://github.com/sensu/sensu-go/blob/master/CONTRIBUTING.md

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: