-
Notifications
You must be signed in to change notification settings - Fork 35
/
sample.syncflux.toml
169 lines (132 loc) · 4.84 KB
/
sample.syncflux.toml
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# -*- toml -*-
# -------GENERAL SECTION ---------
# syncflux could work in several ways,
# not all General config parameters works on all modes.
# modes
# "hamonitor" => enables syncflux as a daemon to sync
# 2 Influx 1.X OSS db and sync data between them
# when needed (does active monitoring )
# "copy" => executes syncflux as a new process to copy data
# between master and slave databases
# "replicashema" => executes syncflux as a new process to create
# the database/s and all its related retention policies
# "fullcopy" => does database/rp replication and after does a data copy
[General]
# ------------------------
# logdir ( only valid on hamonitor action)
# the directory where to place logs
# will place the main log "
#
logdir = "./log"
# ------------------------
# loglevel ( valid only for hamonitor actions )
# set the log level , valid values are:
# fatal,error,warn,info,debug,trace
# on copy/fullcopy actions loglevel is mapped with
# (nothing) = Warning
# -v = Info
# -vv = debug
# -vvv = trace
loglevel = "debug"
# -----------------------------
# sync-mode (only valid on hamonitor action)
# NOTE: rigth now only "onlyslave" (one way sync ) is valied
# (planned sync in two ways in the future)
sync-mode = "onlyslave"
# ---------------------------
# master-db choose one of the configured InfluxDB as a SlaveDB
# this parameter will be override by the command line -master parameter
master-db = "influxdb01"
# ---------------------------
# slave-db choose one of the configured InfluxDB as a SlaveDB
# this parameter will be override by the command line -slave parameter
slave-db = "influxdb02"
# ------------------------------
# check-interval
# the inteval for health cheking for both master and slave databases
check-interval = "10s"
# ------------------------------
# min-sync-interval
# the inteval in which HA monitor will check both are ok and change
# the state of the cluster if not, making all needed recovery actions
min-sync-interval = "20s"
# ---------------------------------------------
# initial-replication
# tells syncflux if needed some type of replication
# on slave database from master database on initialize
# (only valid on hamonitor action)
#
# none: no replication
# schema: database and retention policies will be recreated on the slave database
# data: data for all retention policies will be replicated
# be carefull: this full data copy could take hours,days.
# both: will replicate first the schema and them the full data
initial-replication = "none"
#
# monitor-retry-durtion
#
# syncflux only can begin work when master and slave database are both up,
# if some of them is down synflux will retry infinitely each monitor-retry-duration to work.
monitor-retry-interval = "1m"
#
# data-chuck-duration
#
# duration for each small, read from master -> write to slave, chuck of data
# smaller chunks of data will use less memory on the syncflux process
# and also less resources on both master and slave databases
# greater chunks of data will improve sync speed
data-chuck-duration = "5m"
#
# max-retention-interval
#
# for infinite ( or bigger ) retention policies full replication should begin somewhere in the time
# this parameter set the max retention.
max-retention-interval = "8760h" # 1 year
#
# rw-max-retries
#
# If any of the read ( from master) or write ( to slave ) querys fails ,
# the query will be repeated at leas rw-max-retries
rw-max-retries = 5
# If any of the read ( from master) or write ( to slave ) querys fails ,
# the query will be repeated at leas rw-max-retries and we can force a pause from at least rw-retry-delay
rw-retry-delay = "10s"
# Num paralel workers querying and writting at time on both databases (master & slave)
#
num-workers = 4
# syncflux splits all chunk data to write into multiple writes of max-points-on-single-write
# enables limitation on HTTP BODY REQUEST, avoiding errors like "Request Entity Too Large"
max-points-on-single-write = 20000
# ---- HTTP API SECTION (Only valid on hamonitor action)
# Enables an HTTP API endpoint to check the cluster health
[http]
name = "example-http-influxdb"
bind-addr = "127.0.0.1:4090"
admin-user = "admin"
admin-passwd = "admin"
cookie-id = "mysupercokie"
# ---- INFLUXDB SECTION
# Sets a list of available DB's that can be used
# as master or slaves db's on any of the posible actions
[[influxdb]]
release = "1x"
name = "influxdb01"
location = "http://127.0.0.1:8086/"
admin-user = "admin"
admin-passwd = "admin"
timeout = "10s"
tls-insecure-skip-verify = true
tls-ca = ""
tls-cert = ""
tls-key = ""
[[influxdb]]
release = "1x"
name = "influxdb02"
location = "http://127.0.0.1:8087/"
admin-user = "admin"
admin-passwd = "admin"
timeout = "10s"
tls-insecure-skip-verify = true
tls-ca = ""
tls-cert = ""
tls-key = ""