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 +4 -4
- checksums.yaml.gz.sig +2 -2
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +4 -2
- data/README.md +1 -1
- data/bin/metrics-uptime.py +5 -0
- data/bin/metrics-uptime.rb +50 -0
- data/lib/sensu-plugins-uptime-checks/version.rb +1 -1
- metadata +10 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8fb40e7efa69ef5e1311296d155edd3f6630b43c
|
|
4
|
+
data.tar.gz: 9806afc18ac320243249ebeda7fe7aec5ca273f3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c90d10a6e1a6ad0a09b0c56679c4c6ebb400e5c623a8050ed7e2cf9aebcdb8b9dc551623ff77a8d58863f3ab2a9a39668c8a81fcc5ce1731d4264935442d431
|
|
7
|
+
data.tar.gz: fabe2b95909a2bcd16cf49fc319064b70a05c260711ed929264702e4c6ef80b983a64e8b437b906a225637e906e7efa7be12b5af0759f89b0bc0af12b2c54b7a
|
checksums.yaml.gz.sig
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
ij�]�!E�Q,�?�j�|��s��d�B�K�B�KkE�br� ��3��$q9�g"���ƿO�<�3:���0�D��
|
|
2
|
+
�'ϴ�TZb1DT��쥃I�>��T}�nέ;@'�2������68 ]v�T�6-�܃ �V-��F�99/E'�.�n��L�3�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
data/bin/metrics-uptime.py
CHANGED
|
@@ -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
|
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.
|
|
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-
|
|
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:
|
|
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:
|
|
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:
|
|
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.
|
|
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
|