fix influxdb backup
This commit is contained in:
parent
476c7da467
commit
ecfb6f812b
@ -71,7 +71,8 @@ write_data(Measurement, Tags, FieldsList, Timestamp) when is_binary(Measurement)
|
||||
end, NFieldsList),
|
||||
Precision = influx_client:get_precision(Timestamp),
|
||||
|
||||
poolboy:transaction(influx_pool, fun(Pid) -> influx_client:write(Pid, ?DEFAULT_BUCKET, ?DEFAULT_ORG, Precision, Points) end);
|
||||
poolboy:transaction(influx_pool, fun(Pid) -> influx_client:write(Pid, ?DEFAULT_BUCKET, ?DEFAULT_ORG, Precision, Points) end),
|
||||
poolboy:transaction(influx_pool_backup, fun(Pid) -> influx_client:write(Pid, ?DEFAULT_BUCKET, ?DEFAULT_ORG, Precision, Points) end);
|
||||
false ->
|
||||
ok
|
||||
end.
|
||||
|
||||
@ -87,6 +87,16 @@
|
||||
{port, 8086},
|
||||
{token, <<"IUQ04qecTie7LSuX1EDFBeqspClOdoRBfmXDQxhoEjiJFeW8M-Ui66t981YvviI5qOBpf_ZLgJlBx7nid2lyJQ==">>}
|
||||
]
|
||||
},
|
||||
|
||||
%% 备份库
|
||||
{influx_pool_backup,
|
||||
[{size, 100}, {max_overflow, 200}, {worker_module, influx_client}],
|
||||
[
|
||||
{host, "39.98.184.67"},
|
||||
{port, 8086},
|
||||
{token, <<"IUQ04qecTie7LSuX1EDFBeqspClOdoRBfmXDQxhoEjiJFeW8M-Ui66t981YvviI5qOBpf_ZLgJlBx7nid2lyJQ==">>}
|
||||
]
|
||||
}
|
||||
|
||||
]}
|
||||
|
||||
@ -76,6 +76,16 @@
|
||||
{port, 8086},
|
||||
{token, <<"A-ZRjqMK_7NR45lXXEiR7AEtYCd1ETzq9Z61FTMQLb5O4-1hSf8sCrjdPB84e__xsrItKHL3qjJALgbYN-H_VQ==">>}
|
||||
]
|
||||
},
|
||||
|
||||
%% influxdb备份库
|
||||
{influx_pool_backup,
|
||||
[{size, 100}, {max_overflow, 200}, {worker_module, influx_client}],
|
||||
[
|
||||
{host, "172.19.0.4"},
|
||||
{port, 8086},
|
||||
{token, <<"A-ZRjqMK_7NR45lXXEiR7AEtYCd1ETzq9Z61FTMQLb5O4-1hSf8sCrjdPB84e__xsrItKHL3qjJALgbYN-H_VQ==">>}
|
||||
]
|
||||
}
|
||||
|
||||
]}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user