参考 Loki HTTP 接口 |Grafana Loki 文档
状态接口
这些 HTTP 端点由所有组件公开,并返回组件的状态:
GET /ready
GET /log_level
GET /metrics
GET /config
GET /services
GET /loki/api/v1/status/buildinfo
$ curl 127.0.0.1:3100/ready
ready$ curl 127.0.0.1:3100/log_level
{"message":"Current log level is info"}$ curl 127.0.0.1:3100/services
querier => Running
ruler => Running
ring => Running
store => Running
compactor => Running
analytics => Running
query-frontend => Running
server => Running
memberlist-kv => Running
cache-generation-loader => Running
query-frontend-tripperware => Running
distributor => Running
query-scheduler => Running
ingester-querier => Running
query-scheduler-ring => Running
ingester => Running$ curl 127.0.0.1:3100/loki/api/v1/status/buildinfo
{"version":"2.9.7","revision":"efc4d2f009","branch":"HEAD","buildUser":"root@707324a28e25","buildDate":"2024-04-10T09:07:00Z","goVersion":""}
http://192.168.140.71:3100/metrics
http://192.168.140.71:3100/config
http://192.168.140.71:3100/memberlist