[coordinator]
# The time threshold when a query will be logged as a slow query. This limit can be set to help
# discover slow or resource intensive queries. Setting the value to 0 disables the slow query logging.
# 設(shè)置慢查詢時(shí)間,超過多少視為慢查詢.***核心更改配置****
log-queries-after = "1ns"
[http]
# Determines whether HTTP request logging is enabled.
# 設(shè)置http請(qǐng)求的日志不打印,(線上量比較大)
log-enabled = false
[logging]
# Determines which level of logs will be emitted. The available levels
# are error, warn, info, and debug. Logs that are equal to or above the
# specified level will be emitted. error, warn, info
# 設(shè)置線上日志打印級(jí)別為警告級(jí)別.
level = "warn"
輸出日志示例:
2021-08-17T08:12:52.428499Z warn Detected slow query: SELECT * FROM gps WHERE time > now() - 5m (qid: 17, database: gps, threshold: 1ns) {"log_id": "0W0nUHMG000", "service": "query"}
附1: 配置支持單位

線上influxdb異常,需要定位原因,所以打開了慢查詢?nèi)罩?
log-queries-after = "1ns"
配置成了1ns了,總該隨隨便便一個(gè)查詢就能觸發(fā)吧!
啟動(dòng)驗(yàn)證,結(jié)果沒有觸發(fā).[尷尬]
查看文檔

我就是雙擊influxd.exe執(zhí)行的啊!也是相同目錄咋還不生效呢?
驗(yàn)證發(fā)現(xiàn),需要命令行(cmd)執(zhí)行
influxd -config D:/software/influxdb-1.8.0-1/influxdb.conf
更改完畢,完美本地復(fù)現(xiàn).
浙公網(wǎng)安備 33010602011771號(hào)