Skip to content

Commit 0cf2df7

Browse files
author
Yoichi Kawasaki
committed
Added 0.4.0
1 parent b66df66 commit 0cf2df7

File tree

3 files changed

+28
-22
lines changed

3 files changed

+28
-22
lines changed

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.4.0
2+
* Add endpoint parameter for sovereign cloud - [PR#8](https://github.com/yokawasa/fluent-plugin-azure-loganalytics/pull/8)
3+
* Changed dependency for azure-loganalytics-datacollector-api to `>= 0.1.5` - [PR#8](https://github.com/yokawasa/fluent-plugin-azure-loganalytics/pull/8)
4+
15
## 0.3.1
26

37
* Add requirements section - [PR#2](https://github.com/yokawasa/fluent-plugin-azure-loganalytics/pull/2)

README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Once you have the workspace, get Workspace ID and Shared Key (either Primary Key
4343
customer_id CUSTOMER_ID # Customer ID aka WorkspaceID String
4444
shared_key KEY_STRING # The primary or the secondary Connected Sources client authentication key
4545
log_type EVENT_TYPE_NAME # The name of the event type. ex) ApacheAccessLog
46+
endpoint myendpoint
4647
add_time_field true
4748
time_field_name mytime
4849
time_format %s
@@ -55,6 +56,7 @@ Once you have the workspace, get Workspace ID and Shared Key (either Primary Key
5556
* **customer\_id (required)** - Your Operations Management Suite workspace ID
5657
* **shared\_key (required)** - The primary or the secondary Connected Sources client authentication key
5758
* **log\_type (required)** - The name of the event type that is being submitted to Log Analytics. log_type only supports alpha characters
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
5860
* **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
5961
* **add\_time\_field (optional)** - Default:true. This option allows to insert a time field to record
6062
* **time\_field\_name (optional)** - Default:time. This is required only when add_time_field is true
@@ -156,37 +158,37 @@ Suppose your log is formated the way below in the /etc/nginx/conf.d/log.conf:
156158
log_format appcustomlog '"$time_iso8601";"$hostname";$bytes_sent;$request_time;$upstream_response_length;$upstream_response_time;$content_length;"$remote_addr";$status;"$host";"$request";"$http_user_agent"';
157159
```
158160
And this log is activated throught the /etc/nginx/conf.d/virtualhost.conf :
159-
```
160-
server {
161-
...
161+
```
162+
server {
163+
...
162164
access_log /var/log/nginx/access.log appcustomlog;
163165
...
164166
}
165167
```
166168
You can use the following configuration for the source to tail the log file and format it with proper field type.
167169
```
168-
<source>
169-
@type tail
170-
path /var/log/nginx/access.log
171-
pos_file /var/log/td-agent/access.log.pos
172-
tag nginx.accesslog
173-
format csv
174-
delimiter ;
175-
keys time,hostname,bytes_sent,request_time,content_length,remote_addr,status,host,request,http_user_agent
176-
types time:time,hostname:string,bytes_sent:float,request_time:float,content_length:string,remote_addr:string,status:integer,host:string,request:string,http_user_agent:string
177-
time_key time
178-
time_format %FT%T%z
170+
<source>
171+
@type tail
172+
path /var/log/nginx/access.log
173+
pos_file /var/log/td-agent/access.log.pos
174+
tag nginx.accesslog
175+
format csv
176+
delimiter ;
177+
keys time,hostname,bytes_sent,request_time,content_length,remote_addr,status,host,request,http_user_agent
178+
types time:time,hostname:string,bytes_sent:float,request_time:float,content_length:string,remote_addr:string,status:integer,host:string,request:string,http_user_agent:string
179+
time_key time
180+
time_format %FT%T%z
179181
</source>
180182
181-
<match nginx.accesslog>
183+
<match nginx.accesslog>
182184
@type azure-loganalytics
183185
customer_id 818f7bbc-8034-4cc3-b97d-f068dd4cd658
184-
shared_key ppC5500KzCcDsOKwM1yWUvZydCuC3m+ds/2xci0byeQr1G3E0Jkygn1N0Rxx/yVBUrDE2ok3vf4ksCzvBmQXHw==(dummy)
185-
log_type NginxAcessLog
186-
time_generated_field time
187-
time_format %FT%T%z
188-
add_tag_field true
189-
tag_field_name mytag
186+
shared_key ppC5500KzCcDsOKwM1yWUvZydCuC3m+ds/2xci0byeQr1G3E0Jkygn1N0Rxx/yVBUrDE2ok3vf4ksCzvBmQXHw==(dummy)
187+
log_type NginxAcessLog
188+
time_generated_field time
189+
time_format %FT%T%z
190+
add_tag_field true
191+
tag_field_name mytag
190192
</match>
191193
```
192194

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.1
1+
0.4.0

0 commit comments

Comments
 (0)