Questions tagged [promtail]

Promtail is an agent which ships the contents of local logs to a private Grafana Loki instance or Grafana Cloud. Use with grafana-loki tag.

See documentation

145 questions
0
votes
0 answers

Using Promtail to sum log line values - Pipeline Stages - Metrics

Given a log lines such as: [Some info] myproject - number of values: 50 [Some info] myproject - number of values: 100 [Some info] myproject - number of values: 20 I am looking to add these values up and display them in Grafana. i.e. given a 10m…
solarflare
  • 880
  • 2
  • 8
  • 23
0
votes
0 answers

Promtail doesn't sync log file with local

I'm trying to setup grafana, promtail, loki in locally using docker-compose Logs from file is been uploaded only one time when I start the promtail. After adding new lines nothing happens and i need to restart to make it works. Does anyone know how…
0
votes
0 answers

How to replace last found character in Promtail

I'm trying to parse some logs with Promtail but I've got a problem with the timestamp. Promtail expects a dot (.) like a separator for milliseconds but my logs use colons (:). Let me explain it with examples: Expected timestamp format: 2/1/06…
telle
  • 609
  • 2
  • 6
  • 18
0
votes
1 answer

Add ZeroWidthChar in Quarkus logs

I want to configure a multi-line processor using PLG stack (Promtail, Loki & Grafana) with Quarkus services. I am following this link to do so, but I am unable to inject the zero-width-character in my quarkus-app/application.properties file: it…
iabughosh
  • 481
  • 5
  • 19
0
votes
1 answer

Process json logs with Grafana/loki

I have set up Grafana, Prometheus and loki (2.6.1) as follows on my kubernetes (1.21) cluster: helm upgrade --install promtail grafana/promtail -n monitoring -f monitoring/promtail.yaml helm upgrade --install prom…
GlinesMome
  • 1,549
  • 1
  • 22
  • 35
0
votes
1 answer

Promtail force lowercase on log_level: "error" from (?P(error|Error|ERROR))

I'm trying to create two labels(/values) to filter my logs on: warning and error. For graphing and logline panels. I'm thinking log_level: warning or log_level: error. However, log_error: and log_warning: would also work. But with the code below,…
GerardJP
  • 985
  • 2
  • 9
  • 20
0
votes
0 answers

Grafana Loki communication error 503 Service Unavailable

I spent three days to find out where the problem is but without any success. The scenario is quite simple, I tried to deploy stack with grafana, grafana loki, promtail, kafka. I tried it with this docker-compose.yml: version: "3.7" networks: …
Peter S.
  • 470
  • 1
  • 7
  • 17
0
votes
1 answer

ansible playbook role to install promtail

I keep getting this error when i want to run my ansible playbook to install promtail on my instances. #This is my playbook hosts: all roles: role: patrickjahns.promtail vars: promtail_config_scrape_configs: - job_name: system static_configs: -…
0
votes
2 answers

Filtering through scraping with Grafana Loki

i am trying to get logs from a single namespace through promtail and scrape_configs, but i am not getting results. I am installing in k8s with helm install loki grafana/loki-stack -n loki-test -f ~/loki-stack-values.yml and the contents of my…
happymatei
  • 113
  • 1
  • 12
0
votes
0 answers

How to add custom labels in Promtail

I want to add a custom/ new label in Loki Grafana. I basically added "log_level" parameter to server section in the ConfigMap. But the log_level label is not showing on Loki Grafana. Additionally do I need to add elsewhere?
Container-Man
  • 434
  • 1
  • 6
  • 17
0
votes
1 answer

Regex, Grafana Loki, Promtail: Parsing a timestamp from logs using regex

I want to parse a timestamp from logs to be used by loki as the timestamp. Im a total noob when it comes to regex. The log file is from "endlessh" which is essentially a tarpit/honeypit for ssh attackers. It looks like this: 2022-04-03…
Luc
  • 57
  • 1
  • 8
0
votes
1 answer

Promtail: how to trim not JSON part from log

I have multiline log that consists correct json part (one or more lines), and after it - stack trace. Is it possile to parse first part of the log as json, and for stack-trace make new label ("stackTrace" for example) and put there all the lines…
0
votes
3 answers

combine value of two lables in promtail config

How to add the values of multiple labels and assign them to another label in promtail config? scrape_configs: - job_name: journal journal: max_age: 12h relabel_configs: - source_labels: ['__journal__machine_id'] …
Vencat
  • 1,272
  • 11
  • 36
0
votes
1 answer

Regex for promtail config

I've been struggling to get a regex string working. It's being used for Promtail to parse labels from my logs. The problem I'm having is it's not working with positive lookahead (because I think promtail is written in go?) Anyway the logs are web…
wymangr
  • 189
  • 3
  • 16
0
votes
1 answer

How to force open a file in linux as a normal user

"/etc/docker/daemon.json" "/etc/docker/daemon.json" E212: Can't open file for writing I’m currently trying to set up a Loki server, Promtail, and Grafana as docker images I installed all the plugins needed however when I tried editing the docker…
1 2 3
9
10