sensu-plugins-openbsd 1.0.6 → 1.0.7
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 +5 -5
- data/bin/check-bgpd.rb +4 -3
- data/lib/sensu-plugins-openbsd/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: dae0ec3b1152b3c44d55805ecfe05347b38e6cde
|
|
4
|
+
data.tar.gz: 81bfeb1537e8b3a3056384d58468fb1030cadf24
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3b7ffce7b900ea45939b6b213524c7603fa3d5b8ee1bb7ee5336e0db6e373586b0d837223c125d122941ef2b2219ff5e0b45521c983d6083eb3e1bfcdad23490
|
|
7
|
+
data.tar.gz: c7d07f3aee8eb99fbac82d9a3b49f6f870785fdb6accc1e465d7a05bfefd674f61c1d99dd591cab24a6c7c9052ca6fc021a635ed036a733d214824a5b1aeb2d2
|
data/bin/check-bgpd.rb
CHANGED
|
@@ -37,17 +37,18 @@ class CheckOpenBGPd < Sensu::Plugin::Check::CLI
|
|
|
37
37
|
|
|
38
38
|
total_peers = num_peers + num_issue_peers
|
|
39
39
|
peers_success_ratio = ((num_peers.to_f / total_peers.to_f) * 100).truncate(2)
|
|
40
|
+
peers_failed = 100 - peers_success_ratio
|
|
40
41
|
|
|
41
42
|
message = "OpenBGPd running with #{total_peers} peers, "
|
|
42
|
-
message << "#{
|
|
43
|
+
message << "#{peers_failed}% (#{num_issue_peers}) in a connecting or errored state, "
|
|
43
44
|
message << "#{num_fib_routes}. Knows FIB routes and #{num_rib_routes} RIB routes."
|
|
44
45
|
rescue StandardError => e
|
|
45
46
|
unknown "OpenBGPd command Failed: #{e}"
|
|
46
47
|
end
|
|
47
48
|
|
|
48
49
|
critical message if num_peers.zero?
|
|
49
|
-
critical message if
|
|
50
|
-
warning message if
|
|
50
|
+
critical message if peers_failed >= config[:crit].to_f
|
|
51
|
+
warning message if peers_failed >= config[:warn].to_f
|
|
51
52
|
ok message
|
|
52
53
|
end
|
|
53
54
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sensu-plugins-openbsd
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sensu-Plugins and contributors
|
|
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
209
209
|
version: '0'
|
|
210
210
|
requirements: []
|
|
211
211
|
rubyforge_project:
|
|
212
|
-
rubygems_version: 2.
|
|
212
|
+
rubygems_version: 2.5.2.3
|
|
213
213
|
signing_key:
|
|
214
214
|
specification_version: 4
|
|
215
215
|
summary: Sensu plugins for OpenBSD
|