my_nagios 0.0.15 → 0.0.16

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: 69de582704e1d1281a717ac8c297cb41d1c229be
4
- data.tar.gz: 8f47dcce1b50d80cc04013d6628ca42b66826cbf
3
+ metadata.gz: 460e7ab9ffb2dcdb54b1c12572a2ac0fe7042096
4
+ data.tar.gz: c3c426776c243e80012972b2d47921eba71c91ea
5
5
  SHA512:
6
- metadata.gz: 733dd9e8261faf8f757108048e174a7c2d878e6498cb5d296e45888654232f677869a83febcf89019641a70b6da69a055cc32d60507f526052303e9a9ff87715
7
- data.tar.gz: a05b85d8b88a3f31c98a022acbc6638657bfd59cecba86578fee68a7d1ac0d79e758ca244314dc91d697600e6bf70f6025b5911f7e2b0ea0a78a81c0fe93bdba
6
+ metadata.gz: d4f2b8e3b373b21abbd414aad019215d49a9d63523accef850e5761b1b641d510424fbee356332c776d4af5212a3780a72dec4b45b699cff8d80da248853b9c7
7
+ data.tar.gz: fb8e9480829b640c460aae36cfc1daccae4d608d7aa7f3bf086b948155093edc5242fbec6665699ec390b5f8a59e1dc4440e3f7b4af0570894056d7cdbd0d995
@@ -9,6 +9,8 @@ module MyNagios
9
9
 
10
10
  attr_accessor :additional_command_result
11
11
 
12
+ INFO_STATES = ['AuthenticationFailed message', 'No such file or directory']
13
+
12
14
  def run!
13
15
  begin
14
16
  self.update(state: :running)
@@ -51,7 +53,7 @@ module MyNagios
51
53
  def determinate_status_by_response(response)
52
54
  return :critical if not regexp.blank? and response =~ /#{regexp}/
53
55
  return :critical if not response.scan('CRITICAL').blank?
54
- return :info if response.nil? or not response.scan('No such file or directory').blank?
56
+ return :info if response.nil? or MyNagios::INFO_STATES.any? { |msg| response.include?(msg) }
55
57
  :success
56
58
  end
57
59
 
@@ -1,3 +1,3 @@
1
1
  module MyNagios
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.16"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my_nagios
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitaly Omelchenko