sensu-plugins / sensu-plugins-sensu

This plugin provides monitoring and metrics for Sensu.
http://sensu-plugins.io
MIT License
12 stars 35 forks source link
auto-remediation metrics sensu-handler sensu-plugins sensu-plugins-sensu

Sensu-Plugins-sensu

Build Status Gem Version Code Climate Test Coverage Community Slack

Functionality

Files

Usage

check-stale-results.rb

A sensu plugin to monitor sensu stale check results. You can then implement an handler that purges the results after X days using the handlers-purge-stale-results handler.

The plugin accepts the following command line options:

Usage: check-stale-results.rb (options)
    -c, --crit <COUNT>               Critical if number of stale check results exceeds COUNT
    -s, --stale <TIME>               Elapsed time to consider a check result result (default: 1d)
    -v, --verbose                    Be verbose
    -w, --warn <COUNT>               Warn if number of stale check results exceeds COUNT (default: 1)

the --stale command line option accepts elapsed times formatted as documented in https://github.com/hpoydar/chronic_duration.

The handler accepts the following command line options:

handler-purge-stale-results.rb

A sensu handler to purge stale check results. This handler can be invoked from a check that uses the the check-stale-results plugin.

Usage: handler-purge-stale-results.rb (options)
        --mail-recipient <ADDRESS>   Mail recipient (required)
        --mail-sender <ADDRESS>      Mail sender (default: sensu@localhost)
        --mail-server <HOST>         Mail server (default: localhost)
    -s, --stale <TIME>               Elapsed time after which a stale check result will be deleted (default: 7d)

the --stale command line option accepts elapsed times formatted as documented in https://github.com/hpoydar/chronic_duration.

Installation

Installation and Setup

Notes