Hi I have deployed the promtail helm chart and I am ingesting logs, but many of my apps are react apps running nginx but my logs are not being parsed properly.
here is an example from Grafana
My Problem is with all the relabeling that takes place in the promtail helm chart how do I identify the containers that i want to apply this nginx config for ?
Thanks
-rob
So my understanding is you have multiple containers running in kubernetes and some of them are nginx containers and you want to apply above parsing only to nginx containers correct?
And you use kubernetes service discovery for scraping the logs via promtail.
So I would recommend two things.
Use relabel_configs to have container label available.
e.g:
I tried this and it worked as expected but it seems to go very much against the basic principles of Loki, which is having a minimal index. The stream count exploded and I only enabled this on one small test Kubernetes cluster…
For me, it looks like changing the Nginx log format will be a better approach.
This is what I have done so far. We use this Nginx ingress controller (I think there are several alternatives). I added this to the ConfigMap to get logfmt logs