azure-loganalytics-datacollector-api 0.1.4 → 0.1.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
  SHA256:
3
- metadata.gz: f69486484bc9d5e52f6ecaf48c049ff178f85594a1ff83a9c1922db1a30666bc
4
- data.tar.gz: c4b1c23ccc77e0273b1447ae5464279270f05ca3f96d2f0e8d2d9e516d198758
3
+ metadata.gz: 130505bbd3cda48ee4330fba0c5fe76814a6414d20676a7691734cd38c7a7714
4
+ data.tar.gz: ff86325bc1df19f3c505efcb27c194684a9f2e2111149b2a1428ecfe044ea891
5
5
  SHA512:
6
- metadata.gz: 1e5dd0c8db1d44a861d2506200d7f93b668ac3d8d8a444bea73bed0e464166aa4c194f123a7482e007ed4a67da01ce5aea60933aa95cd667b04a32bdcba3591e
7
- data.tar.gz: 72d70760c358307f6b1fb8520bdb30d42e30217174c35875d236dad9799245b9aff7f4b5708a6d329a5c49adc8c73063aeec989a27afa44104c0de8986c2147e
6
+ metadata.gz: 7c6998cb89da3454ab39605c4c801d96880beee4e80a2630d66d84ae8a5c5d2675b741f49cc5d61cc7ef0730582b3a67dfdc2f123c93959f01e0d4dddf9e87b4
7
+ data.tar.gz: 679d59d0c792db18c0be081f0baf450245d41ac70dc8c2778de52d9d58bbbdd22a32ef03e07f488fd034a3be85de384b6adde2df410eba23debd7d70bcde1d2f
@@ -1,5 +1,8 @@
1
+ ## 0.1.5
2
+ * Add endpoint parameter with the default value for Azure public - [PR#5](https://github.com/yokawasa/azure-log-analytics-data-collector/pull/5)
3
+
1
4
  ## 0.1.4
2
- * Add `set_proxy` method to client - [issue#2](https://github.com/yokawasa/azure-log-analytics-data-collector/issues/2)
5
+ * Add `set_proxy` method to client - [issue#3](https://github.com/yokawasa/azure-log-analytics-data-collector/issues/3)
3
6
 
4
7
  ## 0.1.2
5
8
  * fixedup bug - [issue #1](https://github.com/yokawasa/azure-log-analytics-data-collector/issues/1)
@@ -8,7 +8,7 @@ module Azure
8
8
 
9
9
  class Client
10
10
 
11
- def initialize (customer_id, shared_key)
11
+ def initialize (customer_id, shared_key,endpoint ='ods.opinsights.azure.com')
12
12
  require 'rest-client'
13
13
  require 'json'
14
14
  require 'openssl'
@@ -17,6 +17,7 @@ module Azure
17
17
 
18
18
  @customer_id = customer_id
19
19
  @shared_key = shared_key
20
+ @endpoint = endpoint
20
21
  end
21
22
 
22
23
  def post_data(log_type, json_records, record_timestamp ='')
@@ -24,8 +25,8 @@ module Azure
24
25
  raise ConfigError, 'log_type must be only alpha characters' if not is_alpha(log_type)
25
26
  raise ConfigError, 'no json_records' if json_records.empty?
26
27
  body = json_records.to_json
27
- uri = sprintf("https://%s.ods.opinsights.azure.com/api/logs?api-version=%s",
28
- @customer_id, API_VERSION)
28
+ uri = sprintf("https://%s.%s/api/logs?api-version=%s",
29
+ @customer_id, @endpoint, API_VERSION)
29
30
  date = rfc1123date()
30
31
  sig = signature(date, body.bytesize)
31
32
 
@@ -1,7 +1,7 @@
1
1
  module Azure
2
2
  module Loganalytics
3
3
  module Datacollectorapi
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure-loganalytics-datacollector-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoichi Kawasaki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-12 00:00:00.000000000 Z
11
+ date: 2019-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client