fluent-plugin-azure-loganalytics 0.4.2 → 0.5.0
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 +4 -4
- data/ChangeLog.md +4 -0
- data/README.md +3 -0
- data/VERSION +1 -1
- data/examples/fluent_2.conf +1 -0
- data/fluent-plugin-azure-loganalytics.gemspec +1 -1
- data/lib/fluent/plugin/out_azure-loganalytics.rb +3 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c9095b0314ef02f761c5dc0251db3adc97d767e95989fb52c01579d1ba0c862
|
4
|
+
data.tar.gz: 1f0a64828d9d6b699d8d7b26e57a3e20fcc2a3dc1716c5e81949e88a026f66d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5beb42798957400b90a474140c07da6ba29eb40ad93b8a4741d6c80b6eb9c53c1010c0581599337954617172f60a2b2a7fc67de380d1283274211da7602d3521
|
7
|
+
data.tar.gz: ca6fc19bc5bf43e6d7f8c3f13a3a29566afa02379d3705f47b4b27d973852bd054ca291d7e6b09d02e06cd0f805dc07fb22ba57bd617d04a9fc38bc6c440f845
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 0.5.0
|
2
|
+
|
3
|
+
* Support setting the [x-ms-AzureResourceId](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/data-collector-api#request-headers) Header - [issue #17](https://github.com/yokawasa/fluent-plugin-azure-loganalytics/issues/17)
|
4
|
+
|
1
5
|
## 0.4.2
|
2
6
|
* fix CVE-2020-8130 - [issue #13](https://github.com/yokawasa/fluent-plugin-azure-loganalytics/issues/13)
|
3
7
|
|
data/README.md
CHANGED
@@ -58,6 +58,8 @@ Once you have the workspace, get Workspace ID and Shared Key (either Primary Key
|
|
58
58
|
* **log\_type (required)** - The name of the event type that is being submitted to Log Analytics. log_type only supports alpha characters
|
59
59
|
* **endpoint (optional)** - Default:'ods.opinsights.azure.com'. The service endpoint. You may want to use this param in case of sovereign cloud that has a different endpoint from the public cloud
|
60
60
|
* **time\_generated\_field (optional)** - Default:''(empty string) The name of the time generated field. Be carefule that the value of field should strictly follow the ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). See also [this](https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-data-collector-api#create-a-request) for more details
|
61
|
+
* **azure\_resource\_id (optional)** - Default:''(empty string) The resource ID of the Azure resource the data should be associated with. This populates the [_ResourceId](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/log-standard-properties#_resourceid) property and allows the data to be included in [resource-context](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/design-logs-deployment#access-mode) queries in Azure Log Analytics (Azure Monitor). If this field isn't specified, the data will not be included in resource-context queries. The format should be like /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. Please see [this](https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-resource#resourceid) for more detail on the resource ID format.
|
62
|
+
|
61
63
|
* **add\_time\_field (optional)** - Default:true. This option allows to insert a time field to record
|
62
64
|
* **time\_field\_name (optional)** - Default:time. This is required only when add_time_field is true
|
63
65
|
* **localtime (optional)** - Default:false. Time record is inserted with UTC (Coordinated Universal Time) by default. This option allows to use local time if you set localtime true. This is valid only when add_time_field is true
|
@@ -105,6 +107,7 @@ fluent-plugin-azure-loganalytics adds **time** and **tag** attributes by default
|
|
105
107
|
customer_id 818f7bbc-8034-4cc3-b97d-f068dd4cd658
|
106
108
|
shared_key ppC5500KzCcDsOKwM1yWUvZydCuC3m+ds/2xci0byeQr1G3E0Jkygn1N0Rxx/yVBUrDE2ok3vf4ksCzvBmQXHw==(dummy)
|
107
109
|
log_type ApacheAccessLog
|
110
|
+
azure_resource_id /subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/otherResourceGroup/providers/Microsoft.Storage/storageAccounts/examplestorage
|
108
111
|
add_time_field true
|
109
112
|
time_field_name mytime
|
110
113
|
time_format %s
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.5.0
|
data/examples/fluent_2.conf
CHANGED
@@ -11,6 +11,7 @@
|
|
11
11
|
customer_id CUSTOMER_ID # Customer ID aka WorkspaceID String
|
12
12
|
shared_key KEY_STRING # The primary or the secondary Connected Sources client authentication key
|
13
13
|
log_type EVENT_TYPE_NAME # The name of the event type. ex) ApacheAccessLog
|
14
|
+
azure_resource_id RESOURCE_ID # format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
14
15
|
add_time_field true
|
15
16
|
time_field_name mytime
|
16
17
|
time_format %s
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.add_dependency "fluentd", [">= 0.14.15", "< 2"]
|
21
21
|
gem.add_dependency "rest-client"
|
22
22
|
gem.add_dependency "yajl-ruby"
|
23
|
-
gem.add_dependency "azure-loganalytics-datacollector-api", [">= 0.
|
23
|
+
gem.add_dependency "azure-loganalytics-datacollector-api", [">= 0.2.0"]
|
24
24
|
gem.add_development_dependency "rake", ">= 12.3.3"
|
25
25
|
gem.add_development_dependency "test-unit"
|
26
26
|
end
|
@@ -22,6 +22,8 @@ module Fluent::Plugin
|
|
22
22
|
:desc => "The name of the event type that is being submitted to Log Analytics. log_type only alpha characters"
|
23
23
|
config_param :time_generated_field, :string, :default => '',
|
24
24
|
:desc => "The name of the time generated field. Be carefule that the value of field should strictly follow the ISO 8601 format (YYYY-MM-DDThh:mm:ssZ)"
|
25
|
+
config_param :azure_resource_id, :string, :default => '',
|
26
|
+
:desc => "Resource ID of the Azure resource the data should be associated with. This populates the _ResourceId property and allows the data to be included in resource-context queries in Azure Log Analytics (Azure Monitor). If this field isn't specified, the data will not be included in resource-context queries. The format should be like /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
25
27
|
config_param :add_time_field, :bool, :default => true,
|
26
28
|
:desc => "This option allows to insert a time field to record"
|
27
29
|
config_param :time_field_name, :string, :default => "time",
|
@@ -93,7 +95,7 @@ module Fluent::Plugin
|
|
93
95
|
records.push(record)
|
94
96
|
}
|
95
97
|
begin
|
96
|
-
res = @client.post_data(@log_type, records, @time_generated_field)
|
98
|
+
res = @client.post_data(@log_type, records, @time_generated_field, @azure_resource_id)
|
97
99
|
if not Azure::Loganalytics::Datacollectorapi::Client.is_success(res)
|
98
100
|
log.fatal "DataCollector API request failure: error code: " +
|
99
101
|
"#{res.code}, data=>" + Yajl.dump(records)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-azure-loganalytics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoichi Kawasaki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -64,14 +64,14 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - ">="
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: 0.
|
67
|
+
version: 0.2.0
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 0.
|
74
|
+
version: 0.2.0
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: rake
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
|
-
rubygems_version: 3.
|
147
|
+
rubygems_version: 3.1.3
|
148
148
|
signing_key:
|
149
149
|
specification_version: 4
|
150
150
|
summary: Azure Log Analytics output plugin for Fluentd
|