azure-loganalytics-datacollector-api 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 130505bbd3cda48ee4330fba0c5fe76814a6414d20676a7691734cd38c7a7714
|
|
4
|
+
data.tar.gz: ff86325bc1df19f3c505efcb27c194684a9f2e2111149b2a1428ecfe044ea891
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7c6998cb89da3454ab39605c4c801d96880beee4e80a2630d66d84ae8a5c5d2675b741f49cc5d61cc7ef0730582b3a67dfdc2f123c93959f01e0d4dddf9e87b4
|
|
7
|
+
data.tar.gz: 679d59d0c792db18c0be081f0baf450245d41ac70dc8c2778de52d9d58bbbdd22a32ef03e07f488fd034a3be85de384b6adde2df410eba23debd7d70bcde1d2f
|
data/ChangeLog.md
CHANGED
|
@@ -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#
|
|
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
|
|
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
|
|
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
|
+
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-
|
|
11
|
+
date: 2019-06-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rest-client
|