sensu-plugins / sensu-plugins-statuspage

Sensu plugins for Statuspage
http://sensu-plugins.io
MIT License
4 stars 7 forks source link

Sensu-Plugins-statuspage

Build Status Gem Version Code Climate Test Coverage Dependency Status

Functionality

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.

check-statuspage-status

Check the status rollup of a statuspage instance

Files

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"
        }
    }
}

check-statuspage-status

Use -u to set the url to your statuspage instance.

Installation

Installation and Setup

Notes

As of this writing Redphone has not added StatusPage.io support to v0.0.6 You must manually build and install the gem:

git clone https://github.com/portertech/redphone.git
cd redphone
gem build redphone.gemspec  OR  /opt/sensu/embedded/bin/gem build redphone.gemspec
gem install redphone-0.0.6.gem  OR  /opt/sensu/embedded/bin/gem install redphone-0.0.6.gem

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" ]
    }
  }
}