sensu-plugins-beanstalk 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1064f7505132c9829ec4536e4d82eeafa543722b
4
- data.tar.gz: ef7ea87d449bc73670a7c8d5a8959e3978ca7503
3
+ metadata.gz: 0e01a54a1e7214db903ce022b8fecc79a0f890e9
4
+ data.tar.gz: e8c17e3d7bc5d6d960e54f8dd1663363c6fd79c9
5
5
  SHA512:
6
- metadata.gz: 916eea21507eb1d3249285b72f439079a6a61f318f43b26ea8bb439a866cbdda86c93c3ca116054b7d34775e75c6d210355b44eb25f060cd662687e69eb81bdc
7
- data.tar.gz: 5d7d5b71bf3fb63261ab53c1f60b741e5977996dbc954d64fb45857a8be1a64b001e106b86edbdb6034d97ad17675914ff278b8ee01ffb1596713d13864f7b0b
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.0.0...HEAD
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
@@ -1,7 +1,7 @@
1
1
  module SensuPluginsBeanstalk
2
2
  module Version
3
3
  MAJOR = 1
4
- MINOR = 0
4
+ MINOR = 1
5
5
  PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
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.0.0
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-07-14 00:00:00.000000000 Z
11
+ date: 2017-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin