-
Notifications
You must be signed in to change notification settings - Fork 0
/
fluent.conf.example
78 lines (66 loc) · 2.26 KB
/
fluent.conf.example
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<system>
log_level trace
log_event_verbose true
</system>
<source>
#doc: http://docs.fluentd.org/articles/in_http
@type http
port 9880 #your_config_here #http_port
#setup https - required by Canvas
#get free cert from letsencrypt with certbot
#https://www.digitalocean.com/community/tutorials/how-to-use-certbot-standalone-mode-to-retrieve-let-s-encrypt-ssl-certificates-on-ubuntu-16-04
<transport tls>
cert_path /path/fullchain.pem #your_config_here #ssl_cert
private_key_path /path/privkey.pem #your_config_here #ssl_cert
</transport>
</source>
<source>
@type monitor_agent
port 24220
</source>
<source>
@type debug_agent
port 24230
</source>
#rewrite tag for filters
#doc: https://github.com/fluent/fluent-plugin-rewrite-tag-filter
@include config/canvas_tagrewriterules.conf
#record_transformer is a filter plug-in that allows transforming, deleting, and adding events
#With the enable_ruby option, an arbitrary Ruby expression can be used inside #${...}
<filter canvas.**> #get canvas metadata
@type record_transformer
enable_ruby
<record>
@include config/filter/metadata/canvas_metadata.conf
</record>
</filter>
#record_transformer filters to extract data from live events
@include config/filter/*.conf
#output data to SQL
<match canvas.**>
#doc: https://github.com/fluent/fluent-plugin-sql
@type sql
host 127.0.0.1 #your_config_here #database_config
port 5432 #your_config_here #database_config
database your_database_name #your_config_here #database_config
adapter postgresql #your_config_here #database_config mysql2 or postgresql or etc
username your_database_username #your_config_here #database_config
password your_database_password #your_config_here #database_config
schema_search_path your_db_schema #your_config_here #database_config
pool 10
# socket path_to_socket
remove_tag_prefix canvas.
<buffer>
flush_mode immediate
</buffer>
<table>
table none
column_mapping none:none
# The default table is required.
</table>
@include config/output/*.conf
</match>
<match **>
# http://docs.fluentd.org/articles/out_stdout
@type stdout
</match>