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

Promtail : context deadline exceeded

I have deployed loki in a kubernetes cluster "A" and trying to push the logs via promtail from another kubernetes cluster "B" to the loki endpoint (A). Below is the client URL set in promtail…
Kulandesu
  • 53
  • 1
  • 7
2
votes
1 answer

Grafana error - parse error : input size too long (5491 > 5120)

I see the following error in our Grafana dashboard, which uses LOKI as a data source. Sometimes it shows the data, but other times it throws this error. parse error : input size too long (XXX > 5120) When I run the same query in Explorer, it works.…
2
votes
0 answers

What is the behavior of Promtail when it encounters a compressed folder like .tar.gz or .zip

How does promtail read the files inside a compressed (.zip or .tar or .tar.gz) folder? Does it at all monitor the compressed files or not? I have made an environment for promtail to monitor a folder that has three types of folders inside it - .zip…
2
votes
1 answer

Promtail: "error sending batch, will retry" status=500

when starting the promtail client, it gives an error: component=client host=loki:3100 msg="error sending batch, will retry" status=500 error="server returned HTTP status 500 Internal Server Error (500): rpc error: code = ResourceExhausted desc =…
Paul Mayer
  • 51
  • 6
2
votes
0 answers

Unable to read custom logs in promtail

I am new to promtail and struggling to understand location from where it picks logs from each pod. I installed loki stack with promtail below are my default scrape_config scrape_configs: # See also…
2
votes
1 answer

Does JMESPath support something like a spread operator?

Is it possible to convert this JSON: { "message": "Hello!", "contextMap": { "foo": 1, "bar": 2, ...otherInContextMap }, ...someOther } (where keys of contextMap are not known) into the following JSON: { "message": "Hello!", "foo": 1, "bar": 2,…
TN.
  • 18,874
  • 30
  • 99
  • 157
2
votes
0 answers

Get unique fields list in grafana LogQL

My query : ({job="spring-service"} | json | url = "/user/login") I'm trying to get all the unique user id's from logs and not the count. But I couldn't, its easy to get count of the fields.
Revanth G
  • 21
  • 1
  • 3
2
votes
1 answer

Promtail - timestamp parsing (not matching log timestamp and grafana ts)

I've been struggling to get correct format for handling timestamp in promtail config. Format of my log: 2022-08-02 16:46:02.141 content My promtail config: pipeline_stages: - multiline: firstline: '^\d{4}-\d{2}-\d{2}' max_wait_time:…
Jane
  • 63
  • 1
  • 6
2
votes
1 answer

How to install Loki+Promtail to forward K8S pod logs to Grafana Cloud

I am still new to K8S infrastructure but I am trying to convert VM infrastructure to K8S on GCP/GKE and I am stuck at forwarding the logs properly after getting Prometheus metrics forwarded correctly. I am also trying to do this without helm, to…
2
votes
0 answers

how to filter rows in promtail yaml config

I'm a bit new to Grafana so this might be an easy one! I have a simple config-promtail.yaml file loading logs into Loki and everything is working, but I'd like to restrict the log rows passed to Loki to only those lines that include the word…
ben
  • 199
  • 4
2
votes
2 answers

Is there a way to use Loki to query logs from MySQL database?

Ok. We have Promtail to gather text log files and send them to loki. Also I can create MySQL data source to query data from database for visialization purposes. I am curious. Is it possible to configure Loki/Promtail or there is some logging driver…
Eugen Konkov
  • 22,193
  • 17
  • 108
  • 158
2
votes
1 answer

change to promtail yaml config not reflected in grafana/loki

I've made a revision to a /usr/local/bin/config-promtail.yaml file on server a, something like this: - job_name: error_file static_configs: - targets: - localhost labels: job: bridge_errors __path__:…
dark_ben
  • 81
  • 5
2
votes
2 answers

"No logs found" in grafana

I installed Loki, grafana and promtail and all three runing. on http://localhost:9080/targets Ready is True, but the logs are not displayed in Grafana and show in the explore section "No logs found" promtail-local-config-yaml: server: …
Ali
  • 21
  • 1
  • 3
2
votes
1 answer

Restore loki from kubernetes persistent volume

We have deployed loki using helm chart. I have the loki persistent volume. How can I figure out what was the schema config used so that I can retain the logs. Chart loki-2.1.1 Below is the value.yaml auth_enabled: false limits_config: …
barry
  • 31
  • 7
2
votes
1 answer

Promtail Config for Docker Swarm

I am currently trying to set up log monitoring for a docker swarm cluster using promtail, loki and grafana. The forwarding of the logs from promtail to loki and the visualisation in graphana is all working fine. However, with my current promtail…
cioran
  • 69
  • 4
1
2
3
9 10