【VictoriaLogs 运营数据】日志发送从 elasticsearch 格式转为 jsonline 格式后,流量下降 36%
作者:张富春(ahfuzhang),转载时请注明作者和引用链接,谢谢!

如图:使用了 vector 把日志发送给 victorialogs 节点,从 elasticsearch 格式修改为 jsonline 格式后,网络峰值流量从 514 mb 下降到 378 mb,降幅为 36%.
vector 中 jsonline 的配置大致如下:
[sinks.jsonline_http]
type = "http"
inputs = ["parse"]
uri = "http://host.docker.internal:9428/insert/jsonline?_time_field=_time&_msg_field=_msg&_stream_fields=http_request_path&ignore_fields=&decolorize_fields=&AccountID=0&ProjectID=0&debug=false&extra_fields="
method = "post"
encoding.codec = "json"
request.retry_attempts = 0
request.compression = "zstd"
framing.method = "newline_delimited"

浙公网安备 33010602011771号