-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathsample.yaml
51 lines (44 loc) · 1.57 KB
/
sample.yaml
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
# The mysql database which you want to sync
mysql:
host: 127.0.0.1
port: 3306
user: foo
password: bar
db: mydb
table: mytable
tables: # support multi-table here, you can set tables instead of table and the first one will be set to master as default
- table1
server_id: 1 # this should be unique
elastic:
host: 127.0.0.1
port: 9200
bulk_size: 200 # the update bulk size when mysqldump, default is 100 if not specified
binlog_bulk_size: 10 # the update bulk size when syncing binlog, default is 1 if not specified
index: article
type: article
# path to your own xml file, if you want to initialize dump from xml file. run with argument --fromfile in command
xml_file:
filename: a.xml
# If you want to map your column, put the column name as the value, and es field name as the key,
# Particularly , if you set _id as follows, it will use myid column as the index doc's id, or ES will generate an id as default
mapping:
_id: myid
es_field_name: mysql_column_name
# You can set ignoring fields here, and these fields will not be post to ES.
ignoring:
- ignoring_field
# The log file's path
logging:
file: mylog.log
# The record file's path, which record the latest synced binlog file and position
binlog_sync:
record_file: binlog.info
# If you want to email notification when error occurs, fill this
email:
from: # the sender's email, uses smtp protocol
host: smtp.example.com
username: [email protected]
password: senderpassword
to: # a list of notification recipients