riemann-nut 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +4 -0
- data/CHANGELOG.md +14 -0
- data/Rakefile +1 -0
- data/lib/riemann/tools/nut/version.rb +1 -1
- data/lib/riemann/tools/nut.rb +4 -2
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8d999a380da9285d3c39a59292c682402d97915dbb1a306a1bc84184131356d
|
4
|
+
data.tar.gz: 3d82e598d164b145d184bacd822b9a6322215d39f2cb4cd9a0e3e82d7fcf13db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10d8b47a8b3ee1bb77474e33002589c7e63e1b4fce440e0b4ee660f67f2b0c48a86c984d5c94473013fc16dcd3eb983cc74c9537af1e2a836fa0a135ad297d97
|
7
|
+
data.tar.gz: 6a6ef233519ae9aa635094ddb17fa6dde70420eea80a5cee45b71a592908e6cba779d9caed4a8d96ef80a5697c5a28b91d695967953e4bca2a64c8965572d2b5
|
data/.github/CODEOWNERS
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## [1.0.1](https://github.com/opus-codium/riemann-nut/tree/1.0.1) (2022-08-08)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/opus-codium/riemann-nut/compare/v1.0.0...1.0.1)
|
6
|
+
|
7
|
+
**Fixed bugs:**
|
8
|
+
|
9
|
+
- Do not report an alarm if none is set [\#2](https://github.com/opus-codium/riemann-nut/pull/2) ([smortex](https://github.com/smortex))
|
10
|
+
- Report charge when no threshold is set [\#1](https://github.com/opus-codium/riemann-nut/pull/1) ([smortex](https://github.com/smortex))
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
data/Rakefile
CHANGED
data/lib/riemann/tools/nut.rb
CHANGED
@@ -58,9 +58,9 @@ module Riemann
|
|
58
58
|
opts[:ups].each do |ups|
|
59
59
|
service = "#{ups} battery charge"
|
60
60
|
battery_charge = Integer(upsc[ups]['battery.charge'])
|
61
|
-
battery_state = if battery_charge <
|
61
|
+
battery_state = if battery_charge < upsc[ups]['battery.charge.low'].to_i
|
62
62
|
'critical'
|
63
|
-
elsif battery_charge <
|
63
|
+
elsif battery_charge < upsc[ups]['battery.charge.warning'].to_i
|
64
64
|
'warning'
|
65
65
|
else
|
66
66
|
'ok'
|
@@ -120,6 +120,8 @@ module Riemann
|
|
120
120
|
|
121
121
|
def report_ups_alarm
|
122
122
|
opts[:ups].each do |ups|
|
123
|
+
next unless upsc[ups]['ups.alarm']
|
124
|
+
|
123
125
|
report(
|
124
126
|
service: "#{ups} ups alarm",
|
125
127
|
state: 'critical',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: riemann-nut
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Romain Tartière
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: riemann-tools
|
@@ -116,10 +116,12 @@ executables:
|
|
116
116
|
extensions: []
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
|
+
- ".github/CODEOWNERS"
|
119
120
|
- ".github/workflows/ci.yml"
|
120
121
|
- ".gitignore"
|
121
122
|
- ".rspec"
|
122
123
|
- ".rubocop.yml"
|
124
|
+
- CHANGELOG.md
|
123
125
|
- Gemfile
|
124
126
|
- README.md
|
125
127
|
- Rakefile
|
@@ -150,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
152
|
- !ruby/object:Gem::Version
|
151
153
|
version: '0'
|
152
154
|
requirements: []
|
153
|
-
rubygems_version: 3.3.
|
155
|
+
rubygems_version: 3.3.19
|
154
156
|
signing_key:
|
155
157
|
specification_version: 4
|
156
158
|
summary: Submits nut information to riemann
|