No commit activity in last 3 years
No release in over 3 years
UM ARCTS Sensu statuspage plugins
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

~> 1.7
~> 0.10
~> 10.0
~> 3.2
~> 3.1
~> 0.40.0
~> 0.8

Runtime

= 0.13.5
 Project Readme

umarcts-sensu-plugins-statuspage

Functionality

This is a fork of the original plugin from https://github.com/sensu-plugins/sensu-plugins-statuspage. Rather than having individual machines report into StatusPage, we wanted Sensu check aggregates to be the main generator of information into StatusPage. This took only a small reworking of the original code.

Instead of creating StatusPage incidents from information like @event['client']['name'] + '/' + @event['check']['name'], the handler will now look for a custom check attribute (@event['check']['custom']['incident_name']) in the event data and title the StatusPage incident name after that (for ease of understanding).

Also The Redphone functionality required by this plugin has now been baked in. One no longer has to clone the Redphone repo, build, and install from scratch. Also, proxy address and port have been added to this handler as well as the dependent Redphone bits.

handler-statuspage

Creates an issue on StatusPage.io and (optionally) updates a component status.

metrics-statuspageio

Sends graphite-style metrics to statuspage.io, for displaying public metrics. Note, this forks and is not meant for high-throughput. Rather, it is meant for high-value, low-throughput metrics for display on status page.

Files

  • bin/umarcts-handler-statuspage
  • bin/umarcts-metrics-statuspageio

Usage

handler-statuspage

{
  "statuspage": {
    "api_key": "YOURAPIKEY",
    "page_id": "YOURPAGEID"
  }
}

For use of a basic proxy, use "proxy_address" and "proxy_port":

{
  "statuspage": {
    "api_key": "YOURAPIKEY",
    "page_id": "YOURPAGEID",
    "proxy_port": "YOURPROXY",
    "proxy_address": "YOURPROXYADDRESS"
  }
}

metrics-statuspageio

{
    "metrics-statuspageio": {
        "api_key": "my_api_key",
        "page_id": "my_page_id",
        "metrics": {
            "some.metric.identifier": "my_metric_id",
            "another.metric.identifier": "another_metric_id"
        }
    }
}

Installation

Installation and Setup

Notes

To update a component add a "component_id": "IDHERE" attribute to the corresponding check definition

Example:

{
  "checks": {
    "check_sshd": {
      "handlers": ["statuspage"],
      "component_id": "IDHERE",
      "command": "/etc/sensu/plugins/check-procs.rb -p sshd -C 1 ",
      "interval": 60,
      "subscribers": [ "default" ]
    }
  }
}

To choose your own component or incident statuses instead of the defaults add the statuspage_<component/incident>_<status> in the check definition.

Example:

{
  "checks": {
    "check_sshd": {
      "handlers": ["statuspage"],
      "component_id": "IDHERE",
      "statuspage_component_warning": "degraded_performance",
      "statuspage_component_critical": "partial_outage",
      "statuspage_incident_warning": "ignore",
      "statuspage_incident_critical": "identified",
      "command": "/etc/sensu/plugins/check-procs.rb -p sshd -C 1 ",
      "interval": 60,
      "subscribers": [ "default" ]
    }
  }
}

To choose the name of your incident that will be reported to StatusPage, simply add a custom attribute (e.g. "custom": { "incident_name": "What you want the incident to be called" },) like this in your check definition:

Example:

{
  "checks": {
    "check_keepalive_aggregate": {
      "command": "check-aggregate.rb -c AGGREGATENAME -C 66 -W 33 -a http://127.0.0.1:4567 -u USER -p PASSWORD",
      "handle": true,
      "interval": 30,
      "occurrences": 5,
      "handlers": [ "statuspage" ],
      "component_id": "IDHERE",
      "custom": {
        "incident_name": "Compute Nodes"
      },
      "refresh": 3600,
      "standalone": true
    }
  }
}   

The handler is specifically looking for the above to be defined. If it's not, then incident_key won't be defined in the handler and this will cause errors and improper functionality

The ability to add a message to the event has also been implemented here by way of another custom attribute called "description" (e.g. "custom": { "description": "What you want automatically communicated about the incident" },)

Example:

{
  "checks": {
    "check_keepalive_aggregate": {
      "command": "check-aggregate.rb -c AGGREGATENAME -C 66 -W 33 -a http://127.0.0.1:4567 -u USER -p PASSWORD",
      "handle": true,
      "interval": 30,
      "occurrences": 5,
      "handlers": [ "statuspage" ],
      "component_id": "IDHERE",
      "custom": {
        "incident_name": "Compute Nodes",
        "description": "Something happened with the compute nodes! We're investigating"
      },
      "refresh": 3600,
      "standalone": true
    }
  }
}