sensu-plugins-dovecot 0.2.0 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d78e1924678961c9865845c5a3df698658ca5bb
4
- data.tar.gz: a64f8005c3cfcbf6dca9fdec5859ae3f59de84d0
3
+ metadata.gz: ef6acf07af7363da253b0bc1cbd4f17ba6f1fc69
4
+ data.tar.gz: e1d3610829e718981344934195fdef6c6a8c58ac
5
5
  SHA512:
6
- metadata.gz: 3cfd079099669dd6f01cead439bf607f4108ee462e8fe64de76705251e48a57c6123d28de5a196bf6364607832f69bf79fdd5e0aeb8517c04de91dd3e10d26d2
7
- data.tar.gz: 3ab46b7cd12094fe65f59b61d650ad20cba355adf891ebf780f71dda87b1d1b1e91b144e84ce07149d094b7b09b5d4b567439cb4395066869e0dc38a9fc8f81b
6
+ metadata.gz: e4027d692f885183ee50f5591324633bf66342bd218abafd091059837b951952577af6da055b4a92e1dd337d95c485d4a2562d45ba5ab280e432cde4d50e0d12
7
+ data.tar.gz: 8d61a68adca324fc0cf22d769bae06781918548508b399aaff12f0468c5523e6ed918a0748c2266de6d74141659908101d46a25e44f73592d119717631e6dc9c
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
+ ## 0.3.0 - 2017-04-18
9
+ ### Changed
10
+ - metrics-dovecot.rb: do not depend on dovecot's metrics ordering
11
+
8
12
  ## 0.2.0 - 2017-04-08
9
13
  ### Changed
10
14
  - Remove --type option from metrics-dovecot.rb
@@ -13,5 +17,6 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
13
17
  ### Added
14
18
  - Initial release
15
19
 
16
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-disk-checks/compare/0.2.0...HEAD
17
- [0.2.0]: https://github.com/sensu-plugins/sensu-plugins-disk-checks/compare/0.1.0...0.2.0
20
+ [Unreleased]: https://github.com/ushis/sensu-plugins-dovecot/compare/0.3.0...HEAD
21
+ [0.3.0]: https://github.com/ushis/sensu-plugins-dovecot/compare/0.2.0...0.3.0
22
+ [0.2.0]: https://github.com/ushis/sensu-plugins-dovecot/compare/0.1.0...0.2.0
@@ -49,15 +49,20 @@ class DovecotMetrics < Sensu::Plugin::Metric::CLI::Graphite
49
49
  def run
50
50
  sock = TCPSocket.new(config[:host], config[:port])
51
51
  sock.write("EXPORT\tglobal\n")
52
- header = sock.gets.chomp.split(/\s+/)
53
- values = sock.gets.chomp.split(/\s+/)
52
+ header = sock.gets.chomp.split
53
+ values = sock.gets.chomp.split
54
54
  sock.close
55
55
 
56
+ metrics = header.zip(values).to_h
57
+
58
+ # remove reset_timestamp
59
+ metrics.delete('reset_timestamp')
60
+
56
61
  # set timestamp from last_update
57
- timestamp = values[1].to_i
62
+ timestamp = metrics.delete('last_update').to_i
58
63
 
59
- # output everything except reset_timestamp and last_update
60
- header.zip(values)[2..-1].each do |key, value|
64
+ # output everything
65
+ metrics.each do |key, value|
61
66
  output "#{config[:scheme]}.#{key}", value, timestamp
62
67
  end
63
68
 
@@ -1,7 +1,7 @@
1
1
  module SensuPluginsDovecot
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 2
4
+ MINOR = 3
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-dovecot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.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-04-08 00:00:00.000000000 Z
11
+ date: 2017-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin