sensu-plugins-ipmi-sensors 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
- data/CHANGELOG.md +4 -0
- data/bin/check-ipmi-sensors.rb +14 -3
- data/lib/sensu-plugins-ipmi-sensors/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c16dec04c69ae60bbae84f8cb16869f509055b1
|
4
|
+
data.tar.gz: 790faade136f24c646f282f1ef1905b29c32db18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7915b81d41567ca2f0835ff8a52b4d7cbee19f5704185d5bf1f2a9b5080822e146d936c8005a5f97c05fccb0b43111c2fccbf6c463f3af5b02bdd23e46e27a90
|
7
|
+
data.tar.gz: 0d976d788d4ba834392fff5242115ab93383fb6d87c547bd622231242138d48697a1f7430d620be5660ead435047caee60d9fc3bdfc20e420dd54c03f01f09b6
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
3
3
|
|
4
4
|
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
|
5
5
|
|
6
|
+
## [0.0.4] - 2016-01-14
|
7
|
+
### Added
|
8
|
+
- Added --dryrun and fixed --warn
|
9
|
+
|
6
10
|
## [0.0.3] - 2016-01-14
|
7
11
|
### Added
|
8
12
|
- Added --handlers command line option
|
data/bin/check-ipmi-sensors.rb
CHANGED
@@ -75,7 +75,14 @@ class CheckIPMISensors < Sensu::Plugin::Check::CLI
|
|
75
75
|
:description => "Warn instead of throwing a critical failure",
|
76
76
|
:short => "-w",
|
77
77
|
:long => "--warn",
|
78
|
-
:boolean =>
|
78
|
+
:boolean => true,
|
79
|
+
:default => false
|
80
|
+
|
81
|
+
option :dryrun,
|
82
|
+
:description => "Do not send events to sensu client socket",
|
83
|
+
:long => "--dryrun",
|
84
|
+
:boolean => true,
|
85
|
+
:default => false
|
79
86
|
|
80
87
|
def initialize()
|
81
88
|
super
|
@@ -83,8 +90,12 @@ class CheckIPMISensors < Sensu::Plugin::Check::CLI
|
|
83
90
|
end
|
84
91
|
|
85
92
|
def send_client_socket(data)
|
86
|
-
|
87
|
-
|
93
|
+
if config[:dryrun]
|
94
|
+
puts data.inspect
|
95
|
+
else
|
96
|
+
sock = UDPSocket.new
|
97
|
+
sock.send(data + "\n", 0, "127.0.0.1", 3030)
|
98
|
+
end
|
88
99
|
end
|
89
100
|
|
90
101
|
def send_ok(check_name, msg)
|