awsbix 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/awsbix/api.rb +14 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af625bd36e6a9ec9c71a8bfd73eec8ae9215a203
|
4
|
+
data.tar.gz: d7d2bba45d0f77bd29727116ad8c3552762410dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b22f69a4a6f474d83326d5b70601526840b0584d2f11f45e9bd0377d9dec35a53dd49d4036dd34b17752252678dc52fdd50d89a455b8402dee6d73244e38d09d
|
7
|
+
data.tar.gz: 60b527a875b6809dfaa1497ffd9cc695f7ade9f41583101778215e22300c9fe332b7c909589d8eb84fa557e566901c78ce24f7f5f03f9d375fa9cd115c47df10
|
data/lib/awsbix/api.rb
CHANGED
@@ -21,11 +21,21 @@ class Awsbix
|
|
21
21
|
require 'zabbixapi'
|
22
22
|
|
23
23
|
def zbx_connect()
|
24
|
-
if
|
24
|
+
# if an http auth credential pair are set in the config use them
|
25
|
+
if self.get_conf('zbx_http_user') and self.get_conf('zbx_http_password') and self.get_conf('zbx_username') and self.get_conf('zbx_password') and self.get_conf('zbx_url') then
|
25
26
|
@zbx = ZabbixApi.connect(
|
26
|
-
:url
|
27
|
-
:user
|
28
|
-
:password
|
27
|
+
:url => self.get_conf('zbx_url'),
|
28
|
+
:user => self.get_conf('zbx_username'),
|
29
|
+
:password => self.get_conf('zbx_password'),
|
30
|
+
:http_user => self.get_conf('zbx_http_user'),
|
31
|
+
:http_password => self.get_conf('zbx_http_password')
|
32
|
+
)
|
33
|
+
# fall back to no http auth
|
34
|
+
elsif self.get_conf('zbx_username') and self.get_conf('zbx_password') and self.get_conf('zbx_url') then
|
35
|
+
@zbx = ZabbixApi.connect(
|
36
|
+
:url => self.get_conf('zbx_url'),
|
37
|
+
:user => self.get_conf('zbx_username'),
|
38
|
+
:password => self.get_conf('zbx_password')
|
29
39
|
)
|
30
40
|
else
|
31
41
|
raise ErrorZabbixAuthentication
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awsbix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Llewellyn-Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -57,7 +57,7 @@ files:
|
|
57
57
|
- lib/awsbix/error.rb
|
58
58
|
homepage: https://github.com/brahman81/awsbix
|
59
59
|
licenses:
|
60
|
-
-
|
60
|
+
- GPL-3.0
|
61
61
|
metadata: {}
|
62
62
|
post_install_message:
|
63
63
|
rdoc_options: []
|