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

Loki storage migration and data rotation

My current set-up: I have an aws ec2 instance for monitoring services which runs dockerized grafana(grafana:8.3.4) and loki(loki:2.5.0). Logs from multiple other services running on other ec2 instances are being sent to this loki instance by…
adityabhuvanraj
  • 25
  • 1
  • 13
1
vote
0 answers

push log file in promtail to loki

I have a promtail service running on a server sending .json formatted files to Loki/Grafana. The json files are updated every few mins, but in a way that it appears Loki is not acknowledging the changes and loading them. The files themselves are…
ben
  • 199
  • 4
1
vote
1 answer

Helm Loki Stack additional promtail config

I install loki and prometheus using helm. However, I would like to replace the logs in one place. I have used: helm show values grafana/loki-stack > loki-stack-values.yml to output the values and came to the following result: loki: enabled: true …
Jeff
  • 11
  • 2
1
vote
0 answers

How to manage label cardinality for elements not found in log text in loki

I have jobs in my system being logged into files, where each distinct job output is logged into a different file, named after the job's id. Most of the actions in the system are executed through these jobs so I'm expecting a high number of them. My…
Nitzan
  • 1,669
  • 3
  • 19
  • 33
1
vote
1 answer

Loki behind https ingress configuration with helm

Is there any way to configure promtail to send logs to loki via https-ingress? promtail ---> https-ingress ---> loki I used this helm chart promtail and configured loki url as http://gateway.loki.monitoring.example.com:80/loki/api/v1/push. After I…
Veerendra K
  • 2,145
  • 7
  • 32
  • 61
1
vote
2 answers

Drop log lines to Loki using multiple conditions with Promtail

I want to drop lines in Promtail using an AND condition from two different JSON fields. I have JSON log lines like this. {"timestamp":"2022-03-26T15:40:41+00:00","remote_addr":"1.2.3.4","remote_user":"","request":"GET / HTTP/1.1","status":…
duffn
  • 3,690
  • 8
  • 33
  • 68
1
vote
0 answers

Logs in Grafana after some time are missed

I use Loki with promtail in Docker Swarm to get the logs from containers on 3 hosts. Promtail is in global mode. After deploying a stack file, logs from all running services are in Grafana, but after some time (several days) some part of container…
mmynich
  • 11
  • 2
1
vote
1 answer

PromTail JSON Scrape Special Character

For a PromTail scrape config, I am using a JSON stage. I have a JSON log that looks like this: { "@l": "info", "foo": "bar" } I am looking to use the JSON stage to extract the @l property into the map. I tried this: - json: expressions: …
Gabe
  • 49,577
  • 28
  • 142
  • 181
1
vote
0 answers

Problems writing log to a shared docker volume

I have not been able to connect the containers of my app and promtail via volumes so that promtail can read it. I have an app that creates log files (by log4j2 in java ) to a folder with the extension appXX.log, when I share volumes my app is not…
Illidan
  • 149
  • 1
  • 8
1
vote
1 answer

Best client for loki-grafana with docker applications in all OS

I am implementing the loki-grafana log management system and I have several questions. First of all I want to put you in the context of my environment: Applications in java which log to different files / daemons They are in docker linux…
Illidan
  • 149
  • 1
  • 8
1
vote
1 answer

Kubernetes promtail sidecar: how to get labels from the parent pod metadata

I have some kubernetes applications that log to files rather than stdout/stderr, and I collect them with Promtail sidecars. But since the sidecars execute with "localhost" target, I don't have a kubernetes_sd_config that will apply pod metadata to…
user274892
  • 11
  • 2
1
vote
3 answers

Sorting logs (from Loki) on Grafana

Scenario: The logs are in following format: I have a requirement to sort the logs based on the SequenceID at Grafana. Background: I am using promtail to ship logs where I create labels for SequenceID and…
H S Raju
  • 380
  • 3
  • 12
1
vote
1 answer

Kubernetes: How to setup Promtail as a sidecar in order to read custom log paths

Does anyone know how to configure Promtail to watch and tail custom log paths in a Kubernetes pod? I have a deployment that creates customized log files in a directory like so /var/log/myapp. I found some documentation here that says to deploy…
FestiveHydra235
  • 473
  • 1
  • 7
  • 23
1
vote
1 answer

Helm chart ignoring config file or given key value

I am not sure if the issue is related to promtail (helm chart used) or to helm itself. I want to update the default host value for loki chart to a local host used on kubernetes, so I tried with this: helm upgrade --install --namespace loki promtail…
lapinkoira
  • 8,320
  • 9
  • 51
  • 94
1
vote
0 answers

Grafana Loki Timestamp, LogQL Query issues

I’m new to my PLG, and facing some issues with the monitoring, please suggest on this. my log format is like below - which has utc time as timestamp time duration ip username method message ex: 2021-09-27T06:39:42.1756Z 200 00:00.001 1.1.17.110…
JK EV
  • 11
  • 3