Skip to content

A Sensu handler plugin for sending notifications via Pushbullet

License

Notifications You must be signed in to change notification settings

rgeniesse/sensu-pushbullet-handler

Repository files navigation

Sensu Go Pushbullet Plugin

TravisCI Build Status Sensu Bonsai Asset

A Sensu Go handler plugin for sending notifications via Pushbullet

Installation

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

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

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

Configuration

NOTE: It is recommended to use state_change_only filter with this handler. If not used, you will get a notification after each check run during a non-0 exit status.

Example Sensu Go definition:

{
    "api_version": "core/v2",
    "type": "Handler",
    "metadata": {
        "namespace": "default",
        "name": "pushbullet"
    },
    "spec": {
        "type": "pipe",
        "command": "sensu-pushbullet-handler",
        "timeout": 10,
        "env_vars": [
            "PUSHBULLET_APP_TOKEN=your_api_key_here",
            "DEVICE=your_device_name_here"
        ],
        "filters": [
            "is_incident",
            "not_silenced",
            "state_change_only"
        ],
        "runtime_assets": [ "sensu-pushbullet-handler" ]
    }
}

Usage Examples

Help:

The Sensu Go handler plugin for pushbullet

Usage:
  sensu-pushbullet-handler [flags]

Flags:
      --alldevices      Bool for sending notifications to all devices
  -d, --device string   A device registered with Pushbullet
  -h, --help            help for sensu-pushbullet-handler
  -t, --token string    Pushbullet API app token, use default from PUSHBULLET_APP_TOKEN env var

Contributing

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