Loki的API介面

厚礼蝎發表於2024-07-18

參考 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

相關文章