ruby-nagios 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 859789fe1877fe4c12ae24c2a4db2dfd9c30ced5
4
- data.tar.gz: dde3f86aadcbb9999127103159b02258f2cc640e
3
+ metadata.gz: fadbde442bd2089d2492ced4cf817cebfe6a8e7b
4
+ data.tar.gz: f7d066df4dba6353ce8bc84c2e2a009f0a47a551
5
5
  SHA512:
6
- metadata.gz: cd669d2ced72333cfcbeb5a9c6ec422a9e305712218c9b463e57f41eb5df6134e66fd0d9a3abd41a760a91c22f712d6d9bf0dae1ad479e0d74a974f9e807d651
7
- data.tar.gz: eaa4967b9a25d5ebae15cc80537a027ecd3a2b4174f91d40cb2895c0ec9a653241ab15e45300f74ecac0af0a73e20ffbf1a4f33d845ff609fbd3ce90bd07d801
6
+ metadata.gz: 68a63d0d619d4c08114b1dc70325539a4266c5b18b18d84d3261311ac42b88220b2fbb9c0c64faae8cade6382b3fdcdc66ac077acaf39dd2b924ae6e7da68ab5
7
+ data.tar.gz: 1bbdb03aefddd6b36274d55f900f3306e2934ad5aa3647494130c25b1f9f96d7c90601133891159764b857785037d75be44b8ef138a01e48866a12639ef0d042
@@ -83,6 +83,10 @@ def main(args)
83
83
  progname = File.basename($0)
84
84
  settings = Settings.new
85
85
  settings.nagios_cfg = "/etc/nagios3/nagios.cfg" # debian/ubuntu default
86
+ # if nagios.cfg doesn't exist, look for icinga.cfg
87
+ if !File.exist?(settings.nagios_cfg)
88
+ settings.nagios_cfg = "/etc/icinga/icinga.cfg" # debian/ubuntu default
89
+ end
86
90
 
87
91
  opts = OptionParser.new do |opts|
88
92
  opts.banner = "Usage: #{progname} [options]"
@@ -22,7 +22,7 @@ module Nagios
22
22
 
23
23
  @status, handler, blocklines = {'hosts' => {}}, '', []
24
24
 
25
- File.readlines(path, :encoding => 'iso-8859-1').each do |line|
25
+ File.readlines(path).each do |line|
26
26
 
27
27
  # start of new sections
28
28
  if line =~ /(\w+) \{/
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'ruby-nagios'
3
- s.version = "0.4.0"
3
+ s.version = "0.5.0"
4
4
  s.author = 'R.I.Pienaar'
5
5
  s.email = 'rip@devco.net'
6
6
  s.homepage = 'http://devco.net/'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-nagios
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - R.I.Pienaar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-17 00:00:00.000000000 Z
11
+ date: 2017-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake