gpt4 book ai didi

influxdb - 电报中的间隔与flush_interval

转载 作者:行者123 更新时间:2023-12-03 22:10:27 27 4
gpt4 key购买 nike

我有一个关注 telegraf配置

[agent]
interval = "5s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "5s"
flush_jitter = "0s"
precision = ""
debug = false
quiet = false
logfile = ""
hostname = "$HOSTNAME"
omit_hostname = false

[[outputs.influxdb]]
urls = ["http://influxdb:8086"]
database = "telegraf"
username = ""
password = ""
retention_policy = ""
write_consistency = "any"
timeout = "5s"

[[inputs.docker]]
endpoint = "unix:///var/run/docker.sock"
container_names = []
timeout = "5s"
perdevice = true
total = false

[[inputs.cpu]]
[[inputs.system]]
[[inputs.influxdb]]
urls = ["http://influxdb:8086/debug/vars"]
[[inputs.syslog]]
# ## Specify an ip or hostname with port - eg., tcp://localhost:6514, tcp://10.0.0.1:6514
# ## Protocol, address and port to host the syslog receiver.
# ## If no host is specified, then localhost is used.
# ## If no port is specified, 6514 is used (RFC5425#section-4.1).
server = "tcp://localhost:6514"

[[inputs.socket_listener]]
# ## URL to listen on
service_address = "udp4://:8094"
data_format = "influx"

我需要尽快将数据转储到我的 influx DB .我知道它与 interval有关。和 flush_interval设置( here is what I've been reading ),但我不知道 interval 之间有什么区别和 flush_interval .有人可以帮助我吗?

最佳答案

我已经要求 Telegraf 的维护者提供这个问题的答案。 Here这是:

You can think of inputs as falling into 2 categories: polling (regular) and event driven (service inputs). The interval is the frequency that polling inputs plugins look for data. Most of the event driven plugins do not use the interval, although the statsd plugin is a notable exception.

All collected data has a timestamp, this means that regardless of how long it takes to send the data, it will have the timestamp of when it was sampled.

The flush_interval is how frequently the outputs write data. This is the longest you will have to wait under normal circumstances for the data to be written. The metric_batch_size setting also comes into play here, if this number of new metrics are collected then the output will immediately flush. In other words, Telegraf will trigger a write when either metric_batch_size new metrics are collected or after flush_interval, whichever comes first.

关于influxdb - 电报中的间隔与flush_interval,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54777868/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com