sensu-plugins-stale-results 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +4 -2
- data/bin/check-stale-results.rb +6 -5
- data/lib/sensu-plugins-stale-results/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a47be745fb1d44f1359d9367cc740ef0ff0bd89
|
4
|
+
data.tar.gz: 1c67176577c8a6271acd70cb0582cc6ba8f0f48a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f844a0e4fdeeee34df14e02f139fe8355b3bc0afd2818375ba8259390855d048ed2f17fc60425e76c11d9d5e5f884998300a56eeb965b24fe759c6664b4bb1ad
|
7
|
+
data.tar.gz: 2b3b27ce73fec72767c8424600a66279fb63189b8968a15f41402ca918c5854f04f00fef1535efccab4341a638097e018fdb3c1afe67f4d6a588e11ae989b64c
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Sensu plugin for monitoring Sensu stale check results
|
2
2
|
|
3
3
|
A sensu plugin to monitor sensu stale check results. You can then implement an handler that purges
|
4
|
-
the results after X
|
4
|
+
the results after X days using the [sensu-handlers-purge-stale-results](http://github.com/m4ce/sensu-handlers-purge-stale-results) handler.
|
5
5
|
|
6
6
|
## Usage
|
7
7
|
|
@@ -10,10 +10,12 @@ The plugin accepts the following command line options:
|
|
10
10
|
```
|
11
11
|
Usage: check-stale-results.rb (options)
|
12
12
|
-c, --crit <COUNT> Critical if number of stale check results exceeds COUNT
|
13
|
-
-s, --stale <
|
13
|
+
-s, --stale <TIME> Elapsed time to consider a check result result (default: 1d)
|
14
14
|
-v, --verbose Be verbose
|
15
15
|
-w, --warn <COUNT> Warn if number of stale check results exceeds COUNT (default: 1)
|
16
16
|
```
|
17
17
|
|
18
|
+
the --stale command line option accepts elapsed times formatted as documented in https://github.com/hpoydar/chronic_duration.
|
19
|
+
|
18
20
|
## Author
|
19
21
|
Matteo Cerutti - <matteo.cerutti@hotmail.co.uk>
|
data/bin/check-stale-results.rb
CHANGED
@@ -9,16 +9,17 @@ require 'net/http'
|
|
9
9
|
require 'json'
|
10
10
|
require 'sensu-plugin/utils'
|
11
11
|
require 'sensu-plugin/check/cli'
|
12
|
+
require 'chronic_duration'
|
12
13
|
|
13
14
|
class CheckStaleResults < Sensu::Plugin::Check::CLI
|
14
15
|
include Sensu::Plugin::Utils
|
15
16
|
|
16
17
|
option :stale,
|
17
|
-
:description => "
|
18
|
-
:short => "-s <
|
19
|
-
:long => "--stale <
|
20
|
-
:proc => proc(
|
21
|
-
:default =>
|
18
|
+
:description => "Elapsed time to consider a check result result (default: 1d)",
|
19
|
+
:short => "-s <TIME>",
|
20
|
+
:long => "--stale <TIME>",
|
21
|
+
:proc => proc { |s| ChronicDuration.parse(s) },
|
22
|
+
:default => ChronicDuration.parse('1d')
|
22
23
|
|
23
24
|
option :verbose,
|
24
25
|
:description => "Be verbose",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-stale-results
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matteo Cerutti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: chronic_duration
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.10.6
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.10.6
|
27
41
|
description: This plugin provides facilities for monitoring stale sensu check results
|
28
42
|
email: "<matteo.cerutti@hotmail.co.uk>"
|
29
43
|
executables:
|