fluent-plugin-azure-loganalytics 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +3 -0
- data/README.md +1 -0
- data/VERSION +1 -1
- data/lib/fluent/plugin/out_azure-loganalytics.rb +3 -1
- data/test/plugin/test_azure_loganalytics.rb +5 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 627b14acba519f0bf4383e8a3aa76f33132ce407
|
4
|
+
data.tar.gz: c0f41426523c8418ec5a568d9fd0ed8b1140db64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ba33693b4b0e870846b49dae5f995ea6392c6613d226919317a8e3de7e3a99f817a6de68d1c829a4443210f39cdbf49cc63928fd0ae13850b7af83b1ecf03bf
|
7
|
+
data.tar.gz: f27155187992ec1f4894bbe1ee4e67c9b811d7e5b3451fae6f979df0e3b69e21aca189ad1e2ae17b8001f7fe3379a7db23dc2f93847ce99b93ff37a092ee2e07
|
data/ChangeLog.md
CHANGED
data/README.md
CHANGED
@@ -38,6 +38,7 @@ Once you have the workspace, get Workspace ID and Shared Key (either Primary Key
|
|
38
38
|
* **customer\_id (required)** - Your Operations Management Suite workspace ID
|
39
39
|
* **shared\_key (required)** - The primary or the secondary Connected Sources client authentication key
|
40
40
|
* **log\_type (required)** - The name of the event type that is being submitted to Log Analytics
|
41
|
+
* **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
|
41
42
|
* **add\_time\_field (optional)** - Default:true. This option allows to insert a time field to record
|
42
43
|
* **time\_field\_name (optional)** - Default:time. This is required only when add_time_field is true
|
43
44
|
* **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
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
@@ -17,6 +17,8 @@ module Fluent
|
|
17
17
|
:desc => "The primary or the secondary Connected Sources client authentication key"
|
18
18
|
config_param :log_type, :string,
|
19
19
|
:desc => "The name of the event type that is being submitted to Log Analytics"
|
20
|
+
config_param :time_generated_field, :string, :default => '',
|
21
|
+
: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)"
|
20
22
|
config_param :add_time_field, :bool, :default => true,
|
21
23
|
:desc => "This option allows to insert a time field to record"
|
22
24
|
config_param :time_field_name, :string, :default => "time",
|
@@ -71,7 +73,7 @@ module Fluent
|
|
71
73
|
records.push(record)
|
72
74
|
}
|
73
75
|
begin
|
74
|
-
res = @client.post_data(@log_type, records)
|
76
|
+
res = @client.post_data(@log_type, records, @time_generated_field)
|
75
77
|
if not Azure::Loganalytics::Datacollectorapi::Client.is_success(res)
|
76
78
|
$log.fatal "DataCollector API request failure: error code: "
|
77
79
|
+ "#{res.code}, data=>" + records.to_json
|
@@ -9,6 +9,7 @@ class AzureLogAnalyticsOutputTest < Test::Unit::TestCase
|
|
9
9
|
customer_id <Customer ID aka WorkspaceID String>
|
10
10
|
shared_key <Primary Key String>
|
11
11
|
log_type ApacheAccessLog
|
12
|
+
time_generated_field eventtime
|
12
13
|
add_time_field true
|
13
14
|
localtime true
|
14
15
|
add_tag_field true
|
@@ -57,7 +58,8 @@ class AzureLogAnalyticsOutputTest < Test::Unit::TestCase
|
|
57
58
|
:status => "304",
|
58
59
|
:size => "-",
|
59
60
|
:referer => "-",
|
60
|
-
:agent => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:27.0) Gecko/20100101 Firefox/27.0"
|
61
|
+
:agent => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:27.0) Gecko/20100101 Firefox/27.0",
|
62
|
+
:eventtime => "2016-12-10T09:44:32Z"
|
61
63
|
}, time)
|
62
64
|
|
63
65
|
d.emit(
|
@@ -71,7 +73,8 @@ class AzureLogAnalyticsOutputTest < Test::Unit::TestCase
|
|
71
73
|
:status =>"200",
|
72
74
|
:size => "-",
|
73
75
|
:referer => "-",
|
74
|
-
:agent => "Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0"
|
76
|
+
:agent => "Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0",
|
77
|
+
:eventtime => "2016-12-10T09:45:14Z"
|
75
78
|
}, time)
|
76
79
|
|
77
80
|
data = d.run
|
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.2.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:
|
11
|
+
date: 2017-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|