fluent-plugin-azure-loganalytics 0.4.0 → 0.7.0

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: 22b06d1614e45b6e4bd69d561fd9e1baa607aab324877c55279d68e6f95cdf89
4
- data.tar.gz: 810e6437147632a77ec333e484282c320a75482c889d1cfe59d5e4410eb495e0
3
+ metadata.gz: dcff438369d594cf860850bf68ed2d0562a8b6949533830d3f93583b34841f2f
4
+ data.tar.gz: 80b0e1739deb479ba914125996e6c092dff9142ff382b7ca896faee3f2c2d8d7
5
5
  SHA512:
6
- metadata.gz: b17088b54b49a51b04d15545b7e15c16cef996ec4ac7c1ff2c1739e383a15f3064a11db2d7bc763833ef325790935c89dc11ff85589b56da9f3f700e3a69ade4
7
- data.tar.gz: f80ef8d11245daf1bafa759dbfd26b3b55dbe6649eaa3bf6389c8a5f78a00c2bb76d5499c94051f5b8b5b7b540dd3249d7ec63885df763382faf8b6f85c25422
6
+ metadata.gz: db9fb5a2345fda2cf27c1af765efea4c16b49f6e795c13447c8c7577eca5a304ac73444c0e7de9e79644e48a21843e5fb5105ef76b1cb68f7260de8116d52c7e
7
+ data.tar.gz: 3312bffb982fec74397a6ce3df259b669b63f5c3be3769128dbca6d57a9a3118fb7d340082c8a04efd0340eba54987e275992bf34b6c055ad174006f135b8aef
@@ -1,4 +1,30 @@
1
+ # ChangeLog
2
+
3
+ ## 0.7.0
4
+
5
+ * Change base [azure-loganalytics-datacollector-api](https://github.com/yokawasa/azure-log-analytics-data-collector) to ">= 0.5.0"
6
+ * [azure-log-analytics-data-collector-0.5.0](https://github.com/yokawasa/azure-log-analytics-data-collector/releases/tag/v0.5.0) added check body size not to exceed data limit of 30MB in Azure Monitor Data Collection API
7
+ * relevant issues: [issue #16](https://github.com/yokawasa/fluent-plugin-azure-loganalytics/issues/16)
8
+
9
+ ## 0.6.0
10
+
11
+ * Change base [azure-loganalytics-datacollector-api](https://github.com/yokawasa/azure-log-analytics-data-collector) to ">= 0.4.0"
12
+ * In [azure-log-analytics-data-collector-0.4.0](https://github.com/yokawasa/azure-log-analytics-data-collector/releases/tag/v0.4.0), restclient retries request on the status code 429(Too Many Requests), 500 (Internal Server Error), 503(Service Unavailable)
13
+
14
+ ## 0.5.0
15
+
16
+ * 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)
17
+
18
+ ## 0.4.2
19
+
20
+ * fix CVE-2020-8130 - [issue #13](https://github.com/yokawasa/fluent-plugin-azure-loganalytics/issues/13)
21
+
22
+ ## 0.4.1
23
+
24
+ * Use `yajl` instead of default JSON encoder to fix logging exceptions - [PR#10](https://github.com/yokawasa/fluent-plugin-azure-loganalytics/pull/10)
25
+
1
26
  ## 0.4.0
27
+
2
28
  * Add endpoint parameter for sovereign cloud - [PR#8](https://github.com/yokawasa/fluent-plugin-azure-loganalytics/pull/8)
3
29
  * Changed dependency for azure-loganalytics-datacollector-api to `>= 0.1.5` - [PR#8](https://github.com/yokawasa/fluent-plugin-azure-loganalytics/pull/8)
4
30
 
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.4.0
1
+ 0.7.0
@@ -1,4 +1,4 @@
1
- # How to install td-agent and luent-plugin-azure-loganalytics plugin on RHEL
1
+ # How to install td-agent and fluent-plugin-azure-loganalytics plugin on RHEL
2
2
 
3
3
  This is a quick installation procedure of td-agent and the custom plugin (fluent-plugin-azure-loganalytics) on Red Hat Enterprise Linux (7.4)
4
4
 
@@ -65,4 +65,4 @@ $ sudo /usr/sbin/td-agent-gem install fluent-plugin-azure-loganalytics
65
65
  $ git clone https://github.com/yokawasa/fluent-plugin-azure-loganalytics.git
66
66
  $ cd fluent-plugin-azure-loganalytics
67
67
  $ /opt/td-agent/embedded/bin/rake test
68
- ```
68
+ ```
@@ -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
@@ -11,7 +11,6 @@ Gem::Specification.new do |gem|
11
11
  gem.description = gem.summary
12
12
  gem.homepage = "http://github.com/yokawasa/fluent-plugin-azure-loganalytics"
13
13
  gem.license = "Apache-2.0"
14
- gem.has_rdoc = false
15
14
 
16
15
  gem.files = `git ls-files`.split("\n")
17
16
  gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
@@ -20,8 +19,8 @@ Gem::Specification.new do |gem|
20
19
 
21
20
  gem.add_dependency "fluentd", [">= 0.14.15", "< 2"]
22
21
  gem.add_dependency "rest-client"
23
- gem.add_dependency "azure-loganalytics-datacollector-api", [">= 0.1.5"]
24
- gem.add_development_dependency "bundler", "~> 1.11"
25
- gem.add_development_dependency "rake", "~> 10.0"
22
+ gem.add_dependency "yajl-ruby"
23
+ gem.add_dependency "azure-loganalytics-datacollector-api", [">= 0.5.0"]
24
+ gem.add_development_dependency "rake", ">= 12.3.3"
26
25
  gem.add_development_dependency "test-unit"
27
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,14 +95,14 @@ 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
- log.fatal "DataCollector API request failure: error code: "
99
- + "#{res.code}, data=>" + records.to_json
100
+ log.fatal "DataCollector API request failure: error code: " +
101
+ "#{res.code}, data=>" + Yajl.dump(records)
100
102
  end
101
103
  rescue Exception => ex
102
- log.fatal "Exception occured in posting to DataCollector API: "
103
- + "'#{ex}', data=>" + records.to_json
104
+ log.fatal "Exception occured in posting to DataCollector API: " +
105
+ "'#{ex}', data=>" + Yajl.dump(records)
104
106
  end
105
107
  end
106
108
  end
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.0
4
+ version: 0.7.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: 2019-06-06 00:00:00.000000000 Z
11
+ date: 2020-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -45,47 +45,47 @@ dependencies:
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  - !ruby/object:Gem::Dependency
48
- name: azure-loganalytics-datacollector-api
48
+ name: yajl-ruby
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: 0.1.5
53
+ version: '0'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 0.1.5
60
+ version: '0'
61
61
  - !ruby/object:Gem::Dependency
62
- name: bundler
62
+ name: azure-loganalytics-datacollector-api
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - "~>"
65
+ - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: '1.11'
68
- type: :development
67
+ version: 0.5.0
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: '1.11'
74
+ version: 0.5.0
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rake
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - "~>"
79
+ - - ">="
80
80
  - !ruby/object:Gem::Version
81
- version: '10.0'
81
+ version: 12.3.3
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - "~>"
86
+ - - ">="
87
87
  - !ruby/object:Gem::Version
88
- version: '10.0'
88
+ version: 12.3.3
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: test-unit
91
91
  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.0.3
147
+ rubygems_version: 3.1.4
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: Azure Log Analytics output plugin for Fluentd