nagiosplugin 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +7 -1
- data/lib/nagiosplugin/version.rb +1 -1
- metadata +12 -12
data/README.md
CHANGED
@@ -10,8 +10,10 @@ NagiosPlugin is a simple framework for writing [Nagios](http://www.nagios.org/)
|
|
10
10
|
|
11
11
|
Create your executable plugin (which will be called by nagios), `require "nagiosplugin"` and subclass from `NagiosPlugin::Plugin`.
|
12
12
|
You must define the methods `critical?` and `warning?` which determine the plugin status during a check based on their boolean return value (`ok?` returns true by default but can be overwritten).
|
13
|
+
|
13
14
|
The optional method `measure` will be called *first* on every check to take samples.
|
14
|
-
Additional plugin output can be
|
15
|
+
Additional plugin output after the service name and status can be printed by defining `output` with some fancy content.
|
16
|
+
|
15
17
|
Run `check!` on your *class* to ensure a proper plugin output (= stdout & exit status).
|
16
18
|
|
17
19
|
Here's a simple example plugin named `check_u2d`:
|
@@ -32,6 +34,10 @@ class UnicornToDwarfRatio < NagiosPlugin::Plugin
|
|
32
34
|
def warning?
|
33
35
|
@unicorns == @dwarves
|
34
36
|
end
|
37
|
+
|
38
|
+
def output
|
39
|
+
"#{unicorns.to_f/@dwarves.to_f} unicorns/dwarves"
|
40
|
+
end
|
35
41
|
end
|
36
42
|
|
37
43
|
UnicornToDwarfRatio.check!
|
data/lib/nagiosplugin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nagiosplugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-12-31 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &70208300095840 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70208300095840
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: cucumber
|
27
|
-
requirement: &
|
27
|
+
requirement: &70208300095100 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70208300095100
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: aruba
|
38
|
-
requirement: &
|
38
|
+
requirement: &70208300094540 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70208300094540
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: guard-cucumber
|
49
|
-
requirement: &
|
49
|
+
requirement: &70208300093900 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70208300093900
|
58
58
|
description: Yet another framework for writing Nagios Plugins
|
59
59
|
email:
|
60
60
|
- bjoernalbers@googlemail.com
|
@@ -90,7 +90,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
90
90
|
version: '0'
|
91
91
|
segments:
|
92
92
|
- 0
|
93
|
-
hash:
|
93
|
+
hash: 3492650550251720727
|
94
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|
@@ -99,13 +99,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
version: '0'
|
100
100
|
segments:
|
101
101
|
- 0
|
102
|
-
hash:
|
102
|
+
hash: 3492650550251720727
|
103
103
|
requirements: []
|
104
104
|
rubyforge_project:
|
105
105
|
rubygems_version: 1.8.10
|
106
106
|
signing_key:
|
107
107
|
specification_version: 3
|
108
|
-
summary: nagiosplugin-0.0.
|
108
|
+
summary: nagiosplugin-0.0.5
|
109
109
|
test_files:
|
110
110
|
- features/plugin_output.feature
|
111
111
|
- features/steps/dev_steps.rb
|