google / slo-generator

SLO Generator computes SLIs, SLOs, Error Budgets and Burn Rates from supported backends, then exports an SLO report to supported targets.
Apache License 2.0
478 stars 76 forks source link

[New backend] Grafana Loki #121

Open dgzlopes opened 3 years ago

dgzlopes commented 3 years ago

Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus.

I propose the addition of Grafana Loki as a backend. Loki query language (LogQL) supports creating metrics out of logs.

ocervell commented 3 years ago

Hi @dgzlopes ! We add backends when multiple users request it, in order to not increase dependencies more than we have to. You can always create a custom backend and use it with slo-generator (see docs on how to here).

dgzlopes commented 3 years ago

Thanks for the quick response @ocervell. I'll try to implement it as a custom backend!

fourstepper commented 2 years ago

I don't usually comment for a +1, but I want to express that I would like to see this in the exporter as well

odam06 commented 5 months ago

Hello,

This issue is old and you probably already found it but you don't need to create a new backend for loki. You can use the prometheus backend in order to connect to loki, it's almost the same API.