Questions tagged [grafana-loki]

Like Prometheus, but for logs.

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

https://github.com/grafana/loki

521 questions
6
votes
3 answers

why my Loki log retention is not working?

"12h" old logs are not deleting even after specifying "retention_period: 12h" due to this I'm facing storage issue because, log are not deleting. please help me with config loki: enabled: true isDefault: true table_manager: …
Vinayak Pawar
  • 93
  • 1
  • 4
6
votes
0 answers

Promtail: Loki Server returned HTTP status 429 Too Many Requests

I'm running Loki for test purposes in Docker and am recently getting following error from the Promtail and Loki containers: level=warn ts=2022-02-18T09:41:39.186511145Z caller=client.go:349 component=client host=loki:3100 msg="error sending batch,…
Selwyn Rogers
  • 101
  • 2
  • 5
6
votes
3 answers

Grafana does not see loki (docker-compose setup)

I am trying to log my application into grafana/loki/promtail using the same docker compose ,and I get the following error when connecting to loki : localhost:3100 -> 404 page not found and when i try to hook it in grafana : URL [http://loki:3100 ]->…
Illidan
  • 149
  • 1
  • 8
6
votes
1 answer

Grafana - Is it possible to use variables in Loki-based dashboard query?

I am working on a Loki-based Dashboard on Grafana. I have one panel for searching text in the Loki trace logs, the current query is like: {job="abc-service"} |~ "searchTrace" |json |line_format "{if .trace_message}} Message: \t{{.trace_message}}…
Ken Tsoi
  • 1,195
  • 1
  • 17
  • 37
6
votes
2 answers

Regexp JSON filtering in LogQL

I'd like to translate Kibana query like to following to LogQL: host:("test1-myservice-*") AND level:ERROR AND NOT logger_name:"com.example.ExampleClass" AND _exists_:stack_trace AND NOT stack_trace:( "interrupted" OR "Read timed out" …
palacsint
  • 28,416
  • 10
  • 82
  • 109
5
votes
1 answer

How configure Recording and Alerting rules with Loki

I am trying to configure Recording rule and according to documentation, it is not clear, how to set it up. I configured rules.yml file in /loki/rules directory. According the doc Recording rules, I implement my own rule: name: MyRules interval:…
dorinand
  • 1,397
  • 1
  • 24
  • 49
5
votes
2 answers

How to filter logs in Grafana-Loki?

I use the last versions of: Prometheus prometheus-cpp library Grafana Loki Promtail in Windows 10. So I just start bin files of these applications. And I get my logfile.log in Grafana panel. There are lines marked [INFO] in the log file. There…
SuperPuper
  • 51
  • 1
  • 1
  • 5
5
votes
2 answers

Loki parse JSON and filter by field

I'm logging a JSON which is being shown as a detected field log in Grafana: Screenshot of detected fields Now I want to filter the logs by level name, but I can't figure out how... I thought something like this would work, but doesn't, no results…
pbns
  • 63
  • 1
  • 1
  • 4
5
votes
2 answers

Is it possible to aggregate Loki logs by day on Grafana?

I have a set of logs like this: {"action": "action_a", "username": "user_1", "ts": "2021-09-10T02:18:14.103Z"} {"action": "action_a", "username": "user_2", "ts": "2021-09-10T02:17:14.103Z"} {"action": "action_a", "username": "user_1", "ts":…
zpr
  • 2,886
  • 1
  • 18
  • 21
5
votes
1 answer

How to analyze loki storage space?

Today the disk space used by Loki has filled up. Is there a dashboard or function in Loki to identify which PODSs generated the most logs? Something besides loki-canary? I have never used this tool and I don't know if it is right for me
Janka
  • 1,908
  • 5
  • 20
  • 41
5
votes
0 answers

Grafana Managed Alerts - How to use Loki label values in alert annotations and labels?

I'm currently building some Grafana managed alerts on Grafana v8.0.3 using Loki as my datasource. I have the following query (A): count_over_time({type="ErrorLogs",fullPipelineName="Test"} [20s]) And I have an expression (B) which triggers the…
5
votes
2 answers

LogQL - label_format conditionally format a label

I have a log stream from where I am extracting a set of fields to be set as either labels or metric values. The stream is not in a standard format so I am extracting the fields with regexp pipeline command, as below. (...) | regexp…
PandaCheLion
  • 446
  • 5
  • 15
5
votes
3 answers

Get original entry value in LogQL line_format

In LogQL line_format template expression, is there a way to access the original log entry (assume the entry is not in JSON or any parseable format and all labels are log labels and not extracted labels). example: ... | line_format "{{.log_label1}},…
JNev
  • 53
  • 1
  • 3
5
votes
2 answers

Why is Loki's Docker Driver Client stopping to log after some time?

I want to send logs of my Docker containers to Grafana Loki. Therefore, I installed Loki's Docker Driver Client and started my containers with it. First I can see logs, but after some time I see no more logs. Installation I installed Loki's Docker…
dur
  • 15,689
  • 25
  • 79
  • 125
5
votes
2 answers

Download Logs from Loki

I have a grafana Loki logs that's in my cluster. I am able to see my logs but as at the moment, the cluster is no longer in use and I would like to delete it but I still have some logs I would like to extract Loki and maybe store it locally on my…
King
  • 1,885
  • 3
  • 27
  • 84
1
2
3
34 35