Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/faceair/VictoriaLogs
Loki On VictoriaMetrics
https://github.com/faceair/VictoriaLogs
grafana logging loki prometheus victoriametrics
Last synced: 3 months ago
JSON representation
Loki On VictoriaMetrics
- Host: GitHub
- URL: https://github.com/faceair/VictoriaLogs
- Owner: faceair
- License: apache-2.0
- Archived: true
- Created: 2020-10-07T17:42:07.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-09-08T16:49:52.000Z (about 3 years ago)
- Last Synced: 2024-07-27T03:35:34.717Z (3 months ago)
- Topics: grafana, logging, loki, prometheus, victoriametrics
- Language: Go
- Homepage:
- Size: 29.6 MB
- Stars: 64
- Watchers: 7
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Loki On VictoriaMetrics
This project experimentally supports the [loki](https://grafana.com/docs/loki/latest/overview/) protocol on the VictoriaMetrics Cluster, and the performance may be better than original loki.
More discussion can be found at [VictoriaMetrics#816](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/816#issuecomment-705538059)
## Supported
* LogQL, extends MetricsQL to support [filter expressions](https://grafana.com/docs/loki/latest/logql/#filter-expression) 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//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 127.0.0.1:8401
$ bin/vminsert -storageNode 127.0.0.1:8400 -importerListenAddr 127.0.0.1:2003
```Set loki datasource endpoint as `http://127.0.0.1:8481/select/0/`, If you call it manually, the full URL is `http://127.0.0.1:8481/select/0/loki/api/v1/query_range`.
Test insert logs with tcp:
```
$ nc 127.0.0.1 2003
loki{component="parser",level="WARN"} "app log line"
```If you want to call push api to insert data, use `http://127.0.0.1:8480/insert/0/loki/api/v1/push`.
For more details, please refer to [VictoriaMetrics Cluster](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/cluster)
## Screenshot
![loki-query-range](./docs/loki-query-range.png)
![loki-live-tail](./docs/loki-live-tail.png)