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 +4 -4
- data/app/models/my_nagios/check.rb +3 -1
- data/lib/my_nagios/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 460e7ab9ffb2dcdb54b1c12572a2ac0fe7042096
|
4
|
+
data.tar.gz: c3c426776c243e80012972b2d47921eba71c91ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
56
|
+
return :info if response.nil? or MyNagios::INFO_STATES.any? { |msg| response.include?(msg) }
|
55
57
|
:success
|
56
58
|
end
|
57
59
|
|
data/lib/my_nagios/version.rb
CHANGED