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
4
votes
0 answers

Not receiving logs when instance is scaled down with AWS firelens

I'm not receiving logs when some autoscaling event happens and in that time period all the logs are lost. Basically logs related to graceful shutdown. I'm using Elastic Beanstalk with ECS and for my logging stack I'm using Grafana's Loki. So I have…
4
votes
1 answer

promtail: transform the whole log line based on regex

I'm having some challenges with coercing my log lines in a certain format. I'm running one promtail instance on several log files, of which some are logfmt and others are free-form. My objective is to transform the free-form ones to the same logfmt…
ppenguin
  • 155
  • 1
  • 11
4
votes
1 answer

Best way to configure storage retention with Loki + S3

I am using Loki v2.4.2 and have configured S3 as a storage backend for both index and chunk. I want to ensure that all logs older than 90 days are deleted without risk of corruption. The documentation about retention is confusing, and steps are not…
manu4543
  • 508
  • 1
  • 8
  • 15
4
votes
1 answer

Grafana Loki Parsing and Aggregating over Labels - LogQL

I have logs coming from repositories into grafana (loki). I am trying to get the number of repositories (that have the msg="Repository finished") for a given duration of, say 6h" I used these queries but they don't deliver any results sum by…
QBits
  • 121
  • 1
  • 11
4
votes
1 answer

How to search multiple strings in same entry in Loki

Im trying to filter out log entries which matche two strings given. The log entries are not json compatible so it cannot be parsed to json. Example log entry looks like [INFO ] (-Worker-10) com.xx.yy.logging.UserLog Ys5morE1Kd8AkGxysKiNQgAAAsY -…
Dilantha
  • 1,552
  • 2
  • 30
  • 46
4
votes
1 answer

Promtail config to filter out log lines

I have read the docs for promtail and doing pipelines and I cannot make heads nor tails of it. All I want to do is drop log lines that originated from Uptimerobot software we use to determine if our site is up or not. Promtail docs:…
Bodger
  • 1,342
  • 4
  • 16
  • 23
4
votes
3 answers

Grafana :: Cannot login to http://localhost:3000/login

I freshly installed Grafana and I cannot login at http://localhost:3000/login All documentation shows that the default user/password should be admin/admin but I'm locked out. If I go to check into the file C:\Program…
4
votes
2 answers

Loki not alerting Alertmanager

I am new with Loki and have made an alert in Loki but I don't see any notification in the Alertmanager. Loki is working fine (collecting logs), Alertmanager also (getting alerts from other sources), but the logs from loki don't get pushed to…
4
votes
0 answers

Docker containers not logging to loki using loki log driver

I'm trying to use the loki log driver in a docker container on an AWS ec2 host. The config below works fine on my own ubuntu 20.04 machine but not in an ubuntu 16.04 ec2 host. iptables has a loopback rule and the appropriate docker port for loki,…
markhorrocks
  • 1,199
  • 19
  • 82
  • 151
4
votes
2 answers

Configure promtail 2.0 to read the files .log

Since I've updated to promtail 2.0, I'm unable to read the content of a log file in loki. config-promtail.yml server: http_listen_port: 9080 grpc_listen_port: 0 positions: filename: /tmp/positions.yaml clients: - url:…
Gold1989
  • 41
  • 1
  • 4
4
votes
2 answers

Promtail error pipeline stage must only contain one key

When trying to setup Promtail I get the following error: level=error ts=2020-11-27T06:10:30.310583Z caller=main.go:104 msg="error creating promtail" error="failed to make file target manager: pipeline stage must contain only one key" I am running…
AcidHawk
  • 496
  • 7
  • 18
4
votes
1 answer

Adding a label to filer log entries in Loki

I have created simple script to test Grafana Loki. It sends messages over Fluentbit: from fluent import sender messages = [ {'from': 'userA', 'to': 'userB', 'log': 'Hello!'}, {'from': 'userB', 'to': 'userA', 'log': 'Hi!'}, ] for message in…
Roman Newaza
  • 11,405
  • 11
  • 58
  • 89
3
votes
1 answer

Adding traceId from header to logs sent to Loki server in Golang

I have a function called LokiLogs which sends logs to the Loki server. I want to add a traceId to the logs that gets passed as a header X-Trace-ID in every API call. Here's the code I have so far: type StdoutLogger struct { io.Writer } func (l…
Hari Prasanth
  • 88
  • 1
  • 9
3
votes
1 answer

Decrypting Docker Container Names in Grafana with Loki and Promtail

My task is to configure Docker log monitoring for around 70 containers. Consolidating all logs into a single panel is not ideal, especially during stress tests and monitoring Docker applications. I want to be able to select a Docker container…
worrum
  • 90
  • 1
  • 13
3
votes
1 answer

How to sum certain values from Grafana-Loki logs?

I have this log line: Successfully encrypted 189322 bytes for upload req_id=MediaUpload Successfully encrypted 189322 bytes for upload req_id=MediaUpload Successfully encrypted 492346 bytes for upload req_id=MediaUpload There's a way to sum the…
Kaleby Cadorin
  • 179
  • 2
  • 13
1 2
3
34 35