rnagios 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -1
  3. data/lib/rnagios/plugin.rb +5 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a09351bb7a33a1ab784e272bd7c71ba1f2cc5fc
4
- data.tar.gz: 9bd3ce37fb55f3ee4d231f91f005cdce892421bd
3
+ metadata.gz: d218dc592c0635556cca6e6a8d01d86410271812
4
+ data.tar.gz: 574cce6c678b58ac64343d840b39f5b078fe759a
5
5
  SHA512:
6
- metadata.gz: cc9c97c6e0652cb42c70d56f04f4008e2b2fc28cc4e1c203ad655d8fb56dd33f8f464fc7786cf94f1da20fb4faab655baa5367432d264485d739dc9184695686
7
- data.tar.gz: 6b31c6eb4793d9d66c5b411f6ce3aa2a2bdb775d87c8b8dda98e2c74797a257bc75e5ca054319a4388c2f22aed6d3b9b4d09acc9014117e80e0a9b3cea7d4471
6
+ metadata.gz: 6ffc116c769c597c7575285eaf65bbe0223f1b38625d97ff48557621019155652c6359260bd15e8298a756a13e3f2d53b5fcc8dc4a83017cc512a8e62a61bdf8
7
+ data.tar.gz: 83427ebbbebd7db2ce4054764660707f614a685aa847022dfc4406992e57bb79351967cf57fa7daa5c7f3669314e36e0ede5d83918ee9a0aa60269fe319ef63d
data/README.md CHANGED
@@ -1,12 +1,13 @@
1
1
  rnagios
2
2
  =======
3
+ [![Gem Version](https://badge.fury.io/rb/rnagios.png)](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 ` host
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
 
@@ -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.2
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-02-28 00:00:00.000000000 Z
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.