Victorialogs – Loki On VictoriaMetrics

This project experimentally supports the loki protocol on the VictoriaMetrics Cluster, and the performance may be better than original loki.

More discussion can be found at VictoriaMetrics#816


  • LogQL, extends MetricsQL to support filter expressions and full PromQL & MetricsQL support for querying metrics.
  • Major HTTP API
    • /loki/api/v1/query
    • /loki/api/v1/query_range
    • /loki/api/v1/label & /loki/api/v1/labels
    • /loki/api/v1/label/<name>/values
    • /loki/api/v1/tail (websocket)
    • /loki/api/v1/push
  • Additional support for prometheus-style data writing via tcp, like loki{component="parser",level="WARN"} "app log line"

How to build & run

$ make all
$ bin/vmstorage
$ bin/vmselect -storageNode
$ bin/vminsert -storageNode -importerListenAddr

Set loki datasource endpoint as, If you call it manually, the full URL is

Test insert logs with tcp:

$ nc 2003
loki{component="parser",level="WARN"} "app log line"

If you want to call push api to insert data, use

For more details, please refer to VictoriaMetrics Cluster




Read more here: Source link