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 +4 -4
- data/CHANGELOG.md +7 -2
- data/bin/metrics-dovecot.rb +10 -5
- data/lib/sensu-plugins-dovecot/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: ef6acf07af7363da253b0bc1cbd4f17ba6f1fc69
|
4
|
+
data.tar.gz: e1d3610829e718981344934195fdef6c6a8c58ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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/
|
17
|
-
[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
|
data/bin/metrics-dovecot.rb
CHANGED
@@ -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
|
53
|
-
values = sock.gets.chomp.split
|
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 =
|
62
|
+
timestamp = metrics.delete('last_update').to_i
|
58
63
|
|
59
|
-
# output everything
|
60
|
-
|
64
|
+
# output everything
|
65
|
+
metrics.each do |key, value|
|
61
66
|
output "#{config[:scheme]}.#{key}", value, timestamp
|
62
67
|
end
|
63
68
|
|
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.
|
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-
|
11
|
+
date: 2017-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|