Giter Club home page Giter Club logo

sensu-vonage-handler's Introduction

Bonsai Asset Badge

Sensu Slack Handler

Overview

The Sensu Vonage Handler is a Sensu Event Handler that sends event data via SMS.

Usage examples

Help:

Usage:
  sensu-vonage-handler [flags]
  sensu-vonage-handler [command]

Available Commands:
  help        Help about any command
  version     Print the version number of this plugin

Flags:
  -k, --api-key string                The Vonage API key
  -s, --api-secret string             The Vonage API secret
  -h, --help                          help for sensu-vonage-handler
  -f, --from string                   The name/number of the sender
  -r, --recipients string             Comma-separated list of recipients

Configuration

Asset registration

Assets are the best way to make use of this handler. 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 sensu/sensu-vonage-handler

If you're using an earlier version of sensuctl, you can download the asset definition from this project's Bonsai Asset Index page.

Handler definition

Create the handler using the following handler definition:

---
api_version: core/v2
type: Handler
metadata:
  namespace: default
  name: vonage
spec:
  type: pipe
  command: sensu-vonage-handler --from Sensu --recipients 4499999999,4488888888
  filters:
  - is_incident
  runtime_assets:
  - sensu/sensu-vonage-handler
  secrets:
  - name: VONAGE_API_KEY
    secret: vonage-api-key
  - name: VONAGE_API_SECRET
    secret: vonage-api-secret
  timeout: 10

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:
  - vonage

Customizing configuration options via checks and entities

All configuration options of this handler can be overridden via the annotations of checks and entities. For example, to customize the recipients for a given entity, you could use the following sensu-agent configuration snippet:

# /etc/sensu/agent.yml example
annotations:
  sensu.io/plugins/vonage/config/recipients: '4477777777'

Proxy Support

This handler supports the use of the environment variables HTTP_PROXY, HTTPS_PROXY, and NO_PROXY (or the lowercase versions thereof). HTTPS_PROXY takes precedence over HTTP_PROXY for https requests. The environment values may be either a complete URL or a "host[:port]", in which case the "http" scheme is assumed.

Installing from source and contributing

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

Compiling

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

go build

To contribute to this plugin, see CONTRIBUTING

sensu-vonage-handler's People

Contributors

boutetnico avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.