rnagios 0.0.2 → 0.0.3
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/README.md +2 -1
- data/lib/rnagios/plugin.rb +5 -2
- 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: d218dc592c0635556cca6e6a8d01d86410271812
|
4
|
+
data.tar.gz: 574cce6c678b58ac64343d840b39f5b078fe759a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ffc116c769c597c7575285eaf65bbe0223f1b38625d97ff48557621019155652c6359260bd15e8298a756a13e3f2d53b5fcc8dc4a83017cc512a8e62a61bdf8
|
7
|
+
data.tar.gz: 83427ebbbebd7db2ce4054764660707f614a685aa847022dfc4406992e57bb79351967cf57fa7daa5c7f3669314e36e0ede5d83918ee9a0aa60269fe319ef63d
|
data/README.md
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
rnagios
|
2
2
|
=======
|
3
|
+
[](http://badge.fury.io/rb/rnagios)
|
3
4
|
|
4
5
|
Ruby gem to make creating Nagios plugins easier
|
5
6
|
|
6
7
|
There are two types of checks you can perform that Nagios will process:
|
7
8
|
active and NSCA checks. Active checks are run on the Nagios
|
8
9
|
monitoring host and actively check services. NSCA checks are run
|
9
|
-
by remote hosts and their output is sent back to the
|
10
|
+
by remote hosts and their output is sent back to the host
|
10
11
|
for processing by the NSCA daemon. Active checks are "actively" run
|
11
12
|
by Nagios; NSCA checks are "passively" run by other servers.
|
12
13
|
|
data/lib/rnagios/plugin.rb
CHANGED
@@ -271,13 +271,16 @@ private
|
|
271
271
|
# NSCA check results are different from active check results
|
272
272
|
# [<timestamp>] PROCESS_SERVICE_CHECK_RESULT;<host_name>;<svc_description>;<return_code>;<plugin_output>
|
273
273
|
def format_passive_service_check(status)
|
274
|
-
'[' + Time.now.to_i.to_s + '] PROCESS_SERVICE_CHECK_RESULT;' + @host + ';' + @name + ';' + status.passive_code.to_s + ';' + status.message
|
274
|
+
#'[' + Time.now.to_i.to_s + '] PROCESS_SERVICE_CHECK_RESULT;' + @host + ';' + @name + ';' + status.passive_code.to_s + ';' + status.message
|
275
|
+
#"[#{Time.now.to_i}] PROCESS_SERVICE_CHECK_RESULT;#{@host};#{@name};#{status.passive_code};#{status.message}"
|
276
|
+
"#{@host}\t#{@name}\t#{status.passive_code}\t#{status.message}"
|
275
277
|
end
|
276
278
|
|
277
279
|
# NSCA check results are different from active check results
|
278
280
|
# [<timestamp>] PROCESS_HOST_CHECK_RESULT;<host_name>;<host_status>;<plugin_output>
|
279
281
|
def format_passive_host_check(status)
|
280
|
-
'[' + Time.now.to_i.to_s + '] PROCESS_HOST_CHECK_RESULT;' + @host + ';' + status.passive_code.to_s + ';' + status.message
|
282
|
+
#'[' + Time.now.to_i.to_s + '] PROCESS_HOST_CHECK_RESULT;' + @host + ';' + status.passive_code.to_s + ';' + status.message
|
283
|
+
"#{@host}\t#{status.passive_code.to_s}\t#{status.message}"
|
281
284
|
end
|
282
285
|
|
283
286
|
def valid?(status)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roger A. Rubio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Make your own plugins in Ruby for Nagios to run on the Nagios server
|
14
14
|
or as NSCA plugins on remote servers.
|