my_nagios 0.0.4 → 0.0.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65516932c8d438f3830679205966b778d4c9b160
|
4
|
+
data.tar.gz: 3795267e9e979ebeabc96e1b5208eeec83c7b5a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99a3712ed84c1b11b4a61b40d960051911e89dadc8e3fa14068abc0fef67fe6d55d891728ee6d978e11ac0dc36d1bb92f6d0c68524612235153179c9d2d9f6e0
|
7
|
+
data.tar.gz: 4f75995204af1805b65047d6ef8aa176ef67bc98913a11be691e90707283ae383afae5d6375ea4f1843c2dc835862aeddd86104edb8abda9ec67a6d377f5ab40
|
@@ -11,12 +11,12 @@ module MyNagios
|
|
11
11
|
begin
|
12
12
|
self.update(state: :running)
|
13
13
|
|
14
|
-
Net::SSH.start( self.host, self.user, config: true, keys: [self.pem_key] ) do| ssh |
|
14
|
+
Net::SSH.start( self.host, self.user, config: true, keys: [self.pem_key], non_interactive: true ) do| ssh |
|
15
15
|
result = ssh.exec! self.command
|
16
16
|
self.update(status: Check.determinate_status_by_response(result), latest_state: result, latest_updated_at: Time.now)
|
17
17
|
end
|
18
18
|
rescue => e
|
19
|
-
self.update(status: :
|
19
|
+
self.update(status: :info, latest_state: e, latest_updated_at: Time.now)
|
20
20
|
ensure
|
21
21
|
self.update(state: :completed)
|
22
22
|
end
|
@@ -28,7 +28,7 @@ module MyNagios
|
|
28
28
|
begin
|
29
29
|
check_list.update_all(state: :running)
|
30
30
|
|
31
|
-
Net::SSH.start( config['host'], config['user'], config: true, keys: [config['pem_key']] ) do |ssh|
|
31
|
+
Net::SSH.start( config['host'], config['user'], config: true, keys: [config['pem_key']], non_interactive: true ) do |ssh|
|
32
32
|
check_list.each do |check|
|
33
33
|
result = ssh.exec! check.command
|
34
34
|
check.update(status: Check.determinate_status_by_response(result), latest_state: result, latest_updated_at: Time.now)
|
@@ -36,7 +36,7 @@ module MyNagios
|
|
36
36
|
end
|
37
37
|
|
38
38
|
rescue => e
|
39
|
-
check_list.update_all(status: :
|
39
|
+
check_list.update_all(status: :info, latest_state: e, latest_updated_at: Time.now)
|
40
40
|
ensure
|
41
41
|
check_list.update_all(state: :completed)
|
42
42
|
end
|
data/lib/my_nagios/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: my_nagios
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vitaly Omelchenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|