此示例演示如何将所有查询记录到名为 /prometheus/query.log 的文件中。我们假定 /prometheus 是数据目录,且 Prometheus 对此目录具有写权限 This example demonstrates how to log all the queries to a file called /prometheus/query.log. We will assume that /prometheus is the data directory and that Prometheus has write access to it.
# HELP prometheus_engine_query_log_enabled State of the query log.
# TYPE prometheus_engine_query_log_enabled gauge
prometheus_engine_query_log_enabled 0
# HELP prometheus_engine_query_log_failures_total The number of query log failures.
# TYPE prometheus_engine_query_log_failures_total counter
prometheus_engine_query_log_failures_total 0