sensu-plugins-beanstalk 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/bin/metrics-beanstalkd-tubes.rb +10 -0
- data/lib/sensu-plugins-beanstalk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e01a54a1e7214db903ce022b8fecc79a0f890e9
|
4
|
+
data.tar.gz: e8c17e3d7bc5d6d960e54f8dd1663363c6fd79c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a6b8670534588ed98e1b3760c7c3d2b940c6c50d7489b0acbc9be8c68aa9df567af09e872c449e6bda2cd29105c4f61efa1a4b8570b80c9a31a563358850a01
|
7
|
+
data.tar.gz: 5191aa870c690135060604201efb19c167f9d7f11b7923845d4093c3f5b01cf179b5432e9809a07ec9662bf0702ac4ab79087eeea4eb773184ea23768fb0bd78
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [1.1.0] - 2017-08-15
|
9
|
+
### Added
|
10
|
+
- Option to get the age of a item in the tubes. add age to the --stats (@derkgort)
|
11
|
+
|
8
12
|
## [1.0.0] - 2017-07-14
|
9
13
|
### Added
|
10
14
|
- metrics-beanstalkd-tubes, get metrics from individual tubes
|
@@ -33,7 +37,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
33
37
|
### Added
|
34
38
|
- initial release
|
35
39
|
|
36
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-beanstalk/compare/1.
|
40
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-beanstalk/compare/1.1.0...HEAD
|
41
|
+
[1.1.0]: https://github.com/sensu-plugins/sensu-plugins-beanstalk/compare/1.0.0...1.1.0
|
37
42
|
[1.0.0]: https://github.com/sensu-plugins/sensu-plugins-beanstalk/compare/0.0.4...1.0.0
|
38
43
|
[0.0.4]: https://github.com/sensu-plugins/sensu-plugins-beanstalk/compare/0.0.3...0.0.4
|
39
44
|
[0.0.3]: https://github.com/sensu-plugins/sensu-plugins-beanstalk/compare/0.0.2...0.0.3
|
@@ -73,6 +73,15 @@ class BeanstalkdMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
73
73
|
|
74
74
|
INGORED_KEYS = ['name'].freeze
|
75
75
|
|
76
|
+
def tube_age(tube)
|
77
|
+
job = tube.peek(:ready)
|
78
|
+
if !job.nil?
|
79
|
+
job.stats.age
|
80
|
+
else
|
81
|
+
0
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
76
85
|
def output_stats(tube)
|
77
86
|
stats = tube.stats
|
78
87
|
stats.keys.sort.each do |key|
|
@@ -80,6 +89,7 @@ class BeanstalkdMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
80
89
|
next if INGORED_KEYS.include?(key)
|
81
90
|
output "#{config[:scheme]}.#{tube.name}.#{key}", stats[key]
|
82
91
|
end
|
92
|
+
output "#{config[:scheme]}.#{tube.name}.age", tube_age(tube) if matches_filter?(:stats, 'age')
|
83
93
|
end
|
84
94
|
|
85
95
|
def tubes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-beanstalk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu-Plugins and contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|