-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfluentd.conf
46 lines (43 loc) · 1 KB
/
fluentd.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<source>
@type gcloud_pubsub
tag pubsub.publish
project ${GCP_PROJECT_ID}
topic export-logs-to-logicmonitor-test
subscription export-logs-to-logicmonitor-test
max_messages 10000
return_immediately true
pull_interval 1
pull_threads 1
parse_error_action exception
enable_rpc true
rpc_bind 0.0.0.0
rpc_port 24680
<parse>
@type json
</parse>
</source>
<filter pubsub.publish>
@type record_transformer
enable_ruby true
<record>
message ${record["textPayload"]}
mapping ${record.dig("labels", "compute.googleapis.com/resource_name")}
timestamp ${record["timestamp"]}
tag ${tag}
</record>
</filter>
<match pubsub.publish>
@type lm
resource_mapping {"mapping": "system.gcp.resourcename"}
company_name ${LM_COMPANY_NAME}
access_id ${LM_ACCESS_ID}
access_key ${LM_ACCESS_KEY}
log_source "lm-logs-gcp"
version_id "0.0.1"
<buffer>
@type memory
flush_interval 1s
chunk_limit_size 5m
</buffer>
debug true
</match>