cloudstack-nagios 0.12.1 → 0.12.2
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/lib/cloudstack-nagios/commands/router.rb +6 -0
- data/lib/cloudstack-nagios/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1aaebfd077fe07297f2b82aadd182f528dcca743
|
|
4
|
+
data.tar.gz: d092712530cf690da7697fb6d125998ba512cc26
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 651c0763f7f55710cd53af3338890ee7ec98d13e52b11a7d5229a235475b78a2be09a15f1cd2cf7a887fd0b612ca6b33c6988021dc22747a54e2311cf2452250
|
|
7
|
+
data.tar.gz: 2dc3ae1550b54559542a3db47d56d881a2934b11d0088c0db8ade778d4004bfcd24a5faa02566c56f772d3f0380101df1a416c707017342bfb6e55b14df1da1a
|
|
@@ -114,12 +114,18 @@ class Router < CloudstackNagios::Base
|
|
|
114
114
|
def conntrack_connections
|
|
115
115
|
begin
|
|
116
116
|
host = systemvm_host
|
|
117
|
+
default_max = 1000000
|
|
117
118
|
netfilter_path = "/proc/sys/net/netfilter/"
|
|
118
119
|
current, max = 0
|
|
119
120
|
on host do |h|
|
|
120
121
|
max = capture("cat #{netfilter_path}nf_conntrack_max").to_i
|
|
121
122
|
current = capture("cat #{netfilter_path}nf_conntrack_count").to_i
|
|
122
123
|
end
|
|
124
|
+
if max < default_max
|
|
125
|
+
on host do |h|
|
|
126
|
+
execute :echo, "#{default_max} > #{netfilter_path}nf_conntrack_max"
|
|
127
|
+
end
|
|
128
|
+
end
|
|
123
129
|
data = check_data(max, current, options[:warning], options[:critical])
|
|
124
130
|
puts "CONNTRACK_CONNECTIONS #{RETURN_CODES[data[0]]} - usage = #{data[1]}% (#{current.round(0)}/#{max.round(0)}) | usage=#{data[1]}% current=#{current.round(0)} max=#{max.round(0)}"
|
|
125
131
|
exit data[0]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cloudstack-nagios
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.12.
|
|
4
|
+
version: 0.12.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nik Wolfgramm
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-05-
|
|
11
|
+
date: 2014-05-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rdoc
|