rnagios 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rnagios/plugin.rb +8 -9
- 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: 1a09351bb7a33a1ab784e272bd7c71ba1f2cc5fc
|
4
|
+
data.tar.gz: 9bd3ce37fb55f3ee4d231f91f005cdce892421bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc9c97c6e0652cb42c70d56f04f4008e2b2fc28cc4e1c203ad655d8fb56dd33f8f464fc7786cf94f1da20fb4faab655baa5367432d264485d739dc9184695686
|
7
|
+
data.tar.gz: 6b31c6eb4793d9d66c5b411f6ce3aa2a2bdb775d87c8b8dda98e2c74797a257bc75e5ca054319a4388c2f22aed6d3b9b4d09acc9014117e80e0a9b3cea7d4471
|
data/lib/rnagios/plugin.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# There are two types of checks you can perform that Nagios will process:
|
2
2
|
# active and NSCA checks. Active checks are run on the Nagios
|
3
3
|
# monitoring host and actively check services. NSCA checks are run
|
4
|
-
# by remote hosts and their output is sent back to the
|
4
|
+
# by remote hosts and their output is sent back to the host
|
5
5
|
# for processing by the NSCA daemon. Active checks are "actively" run
|
6
6
|
# by Nagios; NSCA checks are "passively" run by other servers.
|
7
7
|
#
|
@@ -106,11 +106,10 @@ class Plugin
|
|
106
106
|
end
|
107
107
|
|
108
108
|
# Returns a Status with the message to print to STDOUT
|
109
|
-
# and an exit code to return if running under UNIX/Linux.
|
110
|
-
# the
|
111
|
-
#
|
112
|
-
#
|
113
|
-
# then this method will throw a NagiosError.
|
109
|
+
# and an exit code to return if running under UNIX/Linux. If
|
110
|
+
# the measure method throws an exception or the status object
|
111
|
+
# is not a properly-populated Status object, then this method
|
112
|
+
# will throw a NagiosError.
|
114
113
|
#
|
115
114
|
# This method will run the user-overloaded measure() method. If
|
116
115
|
# measure() should return an uncaught exception, the exception
|
@@ -123,7 +122,7 @@ class Plugin
|
|
123
122
|
#
|
124
123
|
# class MyCheck < Nagios::Plugin
|
125
124
|
# def measure
|
126
|
-
# stat =
|
125
|
+
# stat = ActiveStatus.new
|
127
126
|
# stat.status = <...service check code goes here, returns Nagios::Status::<constant> status...>
|
128
127
|
# stat.message = <...service message state construction goes here...>
|
129
128
|
# # UNIX/Linux exit codes are taken core of for you
|
@@ -136,7 +135,7 @@ class Plugin
|
|
136
135
|
# exit status.exit_code # For UNIX/Linux
|
137
136
|
#
|
138
137
|
# It is up to the developer to handle command-line arguments.
|
139
|
-
# (See the gem
|
138
|
+
# (See the trollop gem for a good example of command-line parameter
|
140
139
|
# hadling.) Nagios plugins usually accept "w" as a warning level and "c"
|
141
140
|
# as a critical level, but it is up to the plugin developer if
|
142
141
|
# these values are used in the measure method.
|
@@ -199,7 +198,7 @@ class Plugin
|
|
199
198
|
# should return a NscaHostStatus or NscaServiceStatus
|
200
199
|
# object.
|
201
200
|
#
|
202
|
-
# The developer
|
201
|
+
# The developer must determine how to best check the
|
203
202
|
# service in question. Below is an example of how measure()
|
204
203
|
# should be structured.
|
205
204
|
#
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rnagios
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roger A. Rubio
|
@@ -26,7 +26,7 @@ files:
|
|
26
26
|
- lib/rnagios/nsca_service_status.rb
|
27
27
|
- lib/rnagios/plugin.rb
|
28
28
|
- lib/rnagios/status.rb
|
29
|
-
homepage:
|
29
|
+
homepage: https://github.com/Snapman/rnagios
|
30
30
|
licenses:
|
31
31
|
- GPL 3.0
|
32
32
|
metadata: {}
|