awsbix 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/awsbix/api.rb +14 -4
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc1caca23d77bdc4951be5218e77a717c76bfe55
4
- data.tar.gz: ea5acdf3444d5145c2cf648f43bf93fbbed3f24c
3
+ metadata.gz: af625bd36e6a9ec9c71a8bfd73eec8ae9215a203
4
+ data.tar.gz: d7d2bba45d0f77bd29727116ad8c3552762410dd
5
5
  SHA512:
6
- metadata.gz: 1fb9e03b11027680dbdfc3bf2c90146e9b75cf9437bc20aaab6b68752db4ed469ff85fc7f9f65e11eb3028ce08375a1974dc4b36f23dc03aaf52ee2769de0903
7
- data.tar.gz: f15719e109b373f80783f7c8ccfb236a7eec6c7100b8a7137a0a95b6e4635a2ba923dcf704628299a582f8fd1a6cd6c4a46926d2a17b6a5bd981f46e16cb2da1
6
+ metadata.gz: b22f69a4a6f474d83326d5b70601526840b0584d2f11f45e9bd0377d9dec35a53dd49d4036dd34b17752252678dc52fdd50d89a455b8402dee6d73244e38d09d
7
+ data.tar.gz: 60b527a875b6809dfaa1497ffd9cc695f7ade9f41583101778215e22300c9fe332b7c909589d8eb84fa557e566901c78ce24f7f5f03f9d375fa9cd115c47df10
@@ -21,11 +21,21 @@ class Awsbix
21
21
  require 'zabbixapi'
22
22
 
23
23
  def zbx_connect()
24
- if self.get_conf('zbx_username') and self.get_conf('zbx_password') and self.get_conf('zbx_url') then
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 => self.get_conf('zbx_url'),
27
- :user => self.get_conf('zbx_username'),
28
- :password => self.get_conf('zbx_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.7
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-01-10 00:00:00.000000000 Z
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
- - GPLv3
60
+ - GPL-3.0
61
61
  metadata: {}
62
62
  post_install_message:
63
63
  rdoc_options: []