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
2
votes
1 answer

Use variables on grafana loki queries (LogQL)

I have succesfully installed Loki on a server and Promtail on multiple hosts of my datacenter. Each host runs a different number of tomcats, like tomcat10, tomcat11...tomcat20. So on promtail, my job gets a label with the hostname and __path__ is…
user2087103
  • 141
  • 2
  • 13
2
votes
1 answer

Promtail labels

I'm having trouble adding labels into Grafana, but this issue is only in one node. I have already 3 Promtails with labels working properly, I tried the same example on this machine which belongs to the same cluster and also has connectivity to Loki…
Bedjase
  • 79
  • 3
  • 8
1
vote
0 answers

Promtail label config

I am new to Promtail. I want to filter log lines with labeling using regex. These are my log lines: [DEBUG]: Starting the application [PROCESS]: Trying a division [WARNING]: dividing by zero(0) might cause an error [ERROR]: Caught an exception:…
NIGHTSCROLLER
  • 89
  • 1
  • 5
1
vote
0 answers

promtail how to discover kubernetes cluster name

I installed promtail with helm chart helm install promtail -f values.yaml grafana/promtail I want add one extra scrape_configs in values.yaml config: clients: - url: https://loki-test.net/api/prom/push scrape_configs: - job_name:…
1
vote
1 answer

Promtail/ Loki - Empty results, no matching label

Im trying to send the following logs to loki using promtail, here is an example of the log line 2023-04-13 09:09:49,762 | 2a81c3e799f446c5800c954c38a67c8c | INFO | test | {'foo':'bar'} My promtail config is as follows: server: http_listen_port:…
swaran
  • 85
  • 6
1
vote
1 answer

Podman unable to read config file

I was as told that podman mimics docker. I am trying to ship some logs via promtail to grafana loki. When I run podman, the config is not getting picked up like I expect. The documentation for getting started with podman was helpful,…
1
vote
0 answers

K8s events logs not shown in Grafana Loki via promtail

I have followed the blog at https://grafana.com/blog/2020/07/21/loki-tutorial-how-to-send-logs-from-eks-with-promtail-to-get-full-visibility-in-grafana/ in order to sent my kubernetes events logs to grafana loki but when I explore…
1
vote
0 answers

Kubernetes and logs from localhost with promtail

I have kubernetes installed on a viral machine. I have put grafana,loki and promtail with helm charts on it.I want to take logs from /var/log/syslog on the virtual machine. I tried extraScrapeConfigs: | - job_name: syslog syslog: …
1
vote
1 answer

Collecting Docker events logs with Promtail

How can I get logs from docker events to Promtail? I'm using Docker to run a set of containers on my server, and I would like to collect and centralize their logs using Promtail. Specifically, I would like to capture logs from the docker events(logs…
Bart
  • 259
  • 2
  • 4
  • 17
1
vote
1 answer

How to write an IF in LogQL query?

In Grafana I added an Exclude parameter to the Dashboard. If the Exclude field is empty, I would want it to do nothing, otherwise exclude lines that contain the regex in Exclude field. I would want to write something like: {label="this"} ( if…
KamilCuk
  • 120,984
  • 8
  • 59
  • 111
1
vote
0 answers

Log query to get a value from a log message and get the average

I have some log messages in my Loki: 2023-02-13 12:20:08.675 INFO 30937 --- [lettuce-epollEventLoop-5-1] c.g.poc.Filter.AuthenticationFilter : [ requestId : 904c1292-66, AuthFilterTime : 15 ms ] 2023-02-13 12:16:32.100 INFO 30937 ---…
1
vote
1 answer

How to parse multiline json in Promtail

I am using log4js to log data to a file in my app. I want to display some of this data in my Grafana dashboard and for that I am using Promtail to read logs from the file, pre-process it and send it to Loki. In Loki, I want to filter the data based…
Max Zavodniuk
  • 79
  • 1
  • 7
1
vote
1 answer

loki-stack helm chart not able to disable kube-system logs

I am using loki-stack helm chart I am doing following configuration to disable kube-system namespace logs in promtail so that loki doesnt use it promtail: enabled: true # # Enable Promtail service monitoring # serviceMonitor: # enabled:…
shreysway
  • 11
  • 2
1
vote
0 answers

Promtail deployment config on EC2: error in DescribeInstances

I'm just configuring promtail and testing it out on my EC2 instance, running this ./promtail-linux-amd64 -config.file=./ec2-promtail.yaml --dry-run I get the following error
goldilocks
  • 161
  • 1
  • 12
1
vote
1 answer

How to add custom labels in Promtail Config

I need to Extract logs data and append as a new label, below is the sample log example: Sample Log Message: 2022-12-21T11:48:00,001 [schedulerFactor_Worker-4, , ] INFO [,,] [userAgent=] [system=,component=,object=] [,] []…
Sneha Singh
  • 21
  • 1
  • 4
1 2
3
9 10