仪表盘设置了1s自动刷新,但是Grafana默认的刷新时间最低是5s,我们需要修改下Grafana的配置文件
grafana.ini配置文件:
[dashboards]
# Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1
# 要保留的仪表板版本号(每个仪表板)。 默认值:20,最小值:1
;versions_to_keep = 20
# Minimum dashboard refresh interval. When set, this will restrict users to set the refresh interval of a dashboard lower than given interval. Per default this is 5 seconds.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
# 最小仪表板刷新间隔。 设置后,这将限制用户将仪表板的刷新间隔设置为低于给定间隔。 默认情况下为 5 秒。
# 区间字符串是一个可能有符号的十进制数序列,后跟一个单位后缀(ms, s, m, h, d),例如 30s 或 1m。
min_refresh_interval = 1s
#更多配置内容说明参考:https://www.cnblogs.com/A121/p/16913255.html
重启服务后,再在仪表盘中设置1s自动刷新就可以了