sensu-plugins-uptime-checks 0.0.3 → 0.0.4

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: 96ee2f34fc8acc21884631379a989092334144b2
4
- data.tar.gz: 18cd929bed723be277cb0997522e02be144e1349
3
+ metadata.gz: 8fb40e7efa69ef5e1311296d155edd3f6630b43c
4
+ data.tar.gz: 9806afc18ac320243249ebeda7fe7aec5ca273f3
5
5
  SHA512:
6
- metadata.gz: 80a6eb973ecfb959963c2e25c52416ce05c132f9d64f2a3f2e481c825c373475409c342acf96cc176fde44208baede54668cdca1e58ec18bdf817ec2e5ed31a7
7
- data.tar.gz: c917b08d75c8a96b86394a0547f402d96588e47d02e766838f126978ae208e62575b6cd6d1c553d638cf7debb6a741cb010a80d112fa6fc10929e35a51d613cd
6
+ metadata.gz: 6c90d10a6e1a6ad0a09b0c56679c4c6ebb400e5c623a8050ed7e2cf9aebcdb8b9dc551623ff77a8d58863f3ab2a9a39668c8a81fcc5ce1731d4264935442d431
7
+ data.tar.gz: fabe2b95909a2bcd16cf49fc319064b70a05c260711ed929264702e4c6ef80b983a64e8b437b906a225637e906e7efa7be12b5af0759f89b0bc0af12b2c54b7a
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- �L��E����(�7=[����>�D0��]{H������q�OI��d��\,�QM  ��JTl����v��7��8�-ge�?�(��p8��W���J+���� r���R�
2
- %���]"t�^��J��$�ޡ���}��.�D*���j&�|��Z�*G-��c�MV��2皬�#�b��J; @Aw��6m�먴j���8���4�<�Z73rv\I�`���2k��冟b\Ȃ��0F�)���6)
1
+ ij�]�!E�Q,�?�j�|��s��d�B�K�B�KkE�br� ��3��$q9g"���ƿO�<�3:���0�D��
2
+ 'ϴ�TZb1DT��쥃I�>��T}�nέ;@'�2������68 ]vT�6-�܃޿V-��F� 99/E'�.�n��L3�K�T��`�T��%����M-�DzS�,�DRL�5ֳ���As�#U������ &�������Es��(�mI�`9�[�ٲ�y�f��lg�J#���� �
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -5,12 +5,15 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
5
5
 
6
6
  ## Unreleased][unreleased]
7
7
 
8
+ ## [0.0.4] - 2015-12-14
9
+ ### Changed
10
+ - change ruby wrapper to standalone script
11
+
8
12
  ## [0.0.3] - 2015-07-14
9
13
  ### Changed
10
14
  - updated sensu-plugin gem to 1.2.0
11
15
 
12
16
  ## [0.0.2] - 2015-06-03
13
-
14
17
  ### Fixed
15
18
  - added binstubs
16
19
 
@@ -18,7 +21,6 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
18
21
  - removed cruft from /lib
19
22
 
20
23
  ## 0.0.1 - 2015-05-21
21
-
22
24
  ### Added
23
25
  - initial release
24
26
 
data/README.md CHANGED
@@ -16,6 +16,6 @@
16
16
 
17
17
  ## Installation
18
18
 
19
- [Installation and Setup](https://github.com/sensu-plugins/documentation/blob/master/user_docs/installation_instructions.md)
19
+ [Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
20
20
 
21
21
  ## Notes
@@ -14,6 +14,11 @@
14
14
  #
15
15
  # Released under the same terms as Sensu (the MIT license); see LICENSE
16
16
  # for details.
17
+ #
18
+ # NOTE:
19
+ # This script is deprecated and will be probably remove in the future.
20
+ # Please use metrics-uptime.rb instead.
21
+
17
22
 
18
23
  import logging
19
24
  import logging.handlers
@@ -0,0 +1,50 @@
1
+ #! /usr/bin/env ruby
2
+ # encoding: UTF-8
3
+ #
4
+ # metrics-uptime
5
+ #
6
+ # DESCRIPTION:
7
+ # provide uptime metric
8
+ #
9
+ # OUTPUT:
10
+ # metric data
11
+ #
12
+ # PLATFORMS:
13
+ # Linux
14
+ #
15
+ # DEPENDENCIES:
16
+ # gem: sensu-plugin
17
+ # gem: socket
18
+ #
19
+ # USAGE:
20
+ #
21
+ # NOTES:
22
+ #
23
+ # LICENSE:
24
+ # Released under the same terms as Sensu (the MIT license); see LICENSE
25
+ # for details.
26
+
27
+ require 'sensu-plugin/metric/cli'
28
+ require 'socket'
29
+
30
+ #
31
+ # Metric Uptime
32
+ #
33
+ class Uptime < Sensu::Plugin::Metric::CLI::Graphite
34
+ option :scheme,
35
+ description: 'Metric naming scheme, text to prepend to metric',
36
+ short: '-s SCHEME',
37
+ long: '--scheme SCHEME',
38
+ default: "#{Socket.gethostname}.uptime"
39
+
40
+ # Main function
41
+ def run
42
+ lines = File.readlines('/proc/uptime', 'r')
43
+ metrics = %w(uptime idletime)
44
+ stats = lines[0].strip.split(/\s+/)
45
+
46
+ metrics.size.times { |i| output "#{config[:scheme]}.#{metrics[i]}", stats[i] }
47
+
48
+ ok
49
+ end
50
+ end
@@ -2,7 +2,7 @@ module SensuPluginsUptimeChecks
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 3
5
+ PATCH = 4
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-uptime-checks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu Plugins and contributors
@@ -30,7 +30,7 @@ cert_chain:
30
30
  8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
31
31
  HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
32
32
  -----END CERTIFICATE-----
33
- date: 2015-07-14 00:00:00.000000000 Z
33
+ date: 2015-12-14 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: sensu-plugin
@@ -66,14 +66,14 @@ dependencies:
66
66
  requirements:
67
67
  - - '='
68
68
  - !ruby/object:Gem::Version
69
- version: '0.30'
69
+ version: 0.32.1
70
70
  type: :development
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - '='
75
75
  - !ruby/object:Gem::Version
76
- version: '0.30'
76
+ version: 0.32.1
77
77
  - !ruby/object:Gem::Dependency
78
78
  name: rspec
79
79
  requirement: !ruby/object:Gem::Requirement
@@ -172,9 +172,12 @@ dependencies:
172
172
  - - "~>"
173
173
  - !ruby/object:Gem::Version
174
174
  version: '0.10'
175
- description: Sensu plugins for uptime-checks
175
+ description: |-
176
+ This plugin provides native uptime instrumentation
177
+ for metrics collection, including: uptime and idletime metrics
176
178
  email: "<sensu-users@googlegroups.com>"
177
179
  executables:
180
+ - metrics-uptime.rb
178
181
  - metrics-uptime.py
179
182
  extensions: []
180
183
  extra_rdoc_files: []
@@ -183,6 +186,7 @@ files:
183
186
  - LICENSE
184
187
  - README.md
185
188
  - bin/metrics-uptime.py
189
+ - bin/metrics-uptime.rb
186
190
  - lib/sensu-plugins-uptime-checks.rb
187
191
  - lib/sensu-plugins-uptime-checks/version.rb
188
192
  homepage: https://github.com/sensu-plugins/sensu-plugins-uptime-checks
@@ -211,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
215
  version: '0'
212
216
  requirements: []
213
217
  rubyforge_project:
214
- rubygems_version: 2.4.6
218
+ rubygems_version: 2.4.8
215
219
  signing_key:
216
220
  specification_version: 4
217
221
  summary: Sensu plugins for uptime-checks
metadata.gz.sig CHANGED
Binary file