htmon-icinga 0.3.4 → 0.4.0
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/icinga_conf/commands.conf +7 -0
- data/icinga_conf/hosts.conf +1 -0
- data/icinga_conf/services.conf +11 -1
- data/lib/htmon/icinga/module.rb +1 -0
- data/lib/htmon/icinga/modules/filesystemusage.rb +46 -0
- data/lib/htmon/icinga/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04d2dbefc9866810e87e1d7f7a79158babc863df
|
4
|
+
data.tar.gz: b294af2c773bce51618bdb476463c4b36a9ed8ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c72d6e9e538d0bd8e1a35252b3f2fcc741bcac19802f2f121eb3b2fea3a8090e541a736e04415abbc66a20733fc7e8d7dd68633fd9005e45ca29c04b7d6f266
|
7
|
+
data.tar.gz: 2da7a518b533f7817bce756a21cc361f6a6b9b3c6f3139744403e7e76aac410624c99d7f00050e75cf61c2ccc41ae0a288c4959bd729c77d13a504b2f0cd23e7
|
data/icinga_conf/commands.conf
CHANGED
data/icinga_conf/hosts.conf
CHANGED
data/icinga_conf/services.conf
CHANGED
@@ -17,7 +17,7 @@ apply Service "process " for (process in host.vars.htmon_processes) {
|
|
17
17
|
assign where host.vars.htmon_processes != null
|
18
18
|
}
|
19
19
|
|
20
|
-
apply Service "
|
20
|
+
apply Service "load" {
|
21
21
|
import "generic-service"
|
22
22
|
|
23
23
|
check_command = "htmon-load"
|
@@ -27,3 +27,13 @@ apply Service "htmon_load" {
|
|
27
27
|
assign where host.vars.htmon_hostname && host.vars.htmon_loadwarn
|
28
28
|
}
|
29
29
|
|
30
|
+
apply Service "updates" {
|
31
|
+
import "generic-service"
|
32
|
+
|
33
|
+
check_command = "htmon-update"
|
34
|
+
|
35
|
+
vars.htmon_warn = host.vars.htmon_updatewarn
|
36
|
+
vars.htmon_hostname = host.vars.htmon_hostname
|
37
|
+
assign where host.vars.htmon_hostname && host.vars.htmon_updatewarn
|
38
|
+
}
|
39
|
+
|
data/lib/htmon/icinga/module.rb
CHANGED
@@ -0,0 +1,46 @@
|
|
1
|
+
|
2
|
+
module Htmon
|
3
|
+
module Icinga
|
4
|
+
class Module
|
5
|
+
class Filesystemusage < Module
|
6
|
+
|
7
|
+
Value ||= Struct.new(:name, :usage)
|
8
|
+
|
9
|
+
callback :handle_value do |value, metric|
|
10
|
+
Value.new(metric.split("::").last, value.to_i)
|
11
|
+
end
|
12
|
+
|
13
|
+
callback :on_ok do |value, warn, thresh|
|
14
|
+
if value.usage < (thresh || warn || 85)
|
15
|
+
out = [value.usage, (warn || 85), (thresh || 95)].map do |x|
|
16
|
+
"#{x}%"
|
17
|
+
end.join(';')
|
18
|
+
"Filesystem usage for #{value.name.inspect} (#{value.usage}%) is ok "+
|
19
|
+
"| usage=#{out}"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
callback :on_warn do |value, warn, thresh|
|
24
|
+
if value.usage < (thresh || 95)
|
25
|
+
out = [value.usage, (warn || 85), (thresh || 95)].map do |x|
|
26
|
+
"#{x}%"
|
27
|
+
end.join(';')
|
28
|
+
"Filesystem usage for #{value.name.inspect} (#{value.usage}%) is disturbing "+
|
29
|
+
"| usage=#{out}"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
callback :on_crit do |value, warn, thresh|
|
34
|
+
if value.usage >= (thresh || 95)
|
35
|
+
out = [value.usage, (warn || 85), (thresh || 95)].map do |x|
|
36
|
+
"#{x}%"
|
37
|
+
end.join(';')
|
38
|
+
"Filesystem usage for #{value.name.inspect} (#{value.usage}%) is critical "+
|
39
|
+
"| usage=#{out}"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/lib/htmon/icinga/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: htmon-icinga
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Foerster
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- icinga_conf/services.conf
|
106
106
|
- lib/htmon/icinga.rb
|
107
107
|
- lib/htmon/icinga/module.rb
|
108
|
+
- lib/htmon/icinga/modules/filesystemusage.rb
|
108
109
|
- lib/htmon/icinga/modules/keepalive.rb
|
109
110
|
- lib/htmon/icinga/modules/load.rb
|
110
111
|
- lib/htmon/icinga/modules/packages.rb
|