I have loki setup in grafana (added as Datasource), it has proper labels and it runs on k8s cluster. the values listed by labels are not shown properly, Eg: Like it shows only half of the values which are assigned to labels…but k8s cluster has all the pods and promtail is configured with loki and it supplies proper logs to loki as well, what is missing here ?
I have 77 services running in my cluster and promtail ships all the logs to loki also, but for some reason loki displays labels such as container, under the container only 30 or so services are found and not more than that. I have logged inside the loki ingester and querier pods as well to check for index storage also. the indexes are present too.
I’ll provide a valid screenshot of my Grafana UI and running pods also
yes @tonyswumac it fits the criteria, I have found why my deployments were not showing up, since the deployments were done prior to implementation of loki in my cluster, some of them were not showing up, after restarting some deployments (services) it finally showed up in my grafana UI.
I have one more problem statement that, everytime I edit my configmap and restart my Loki deployments like distributor, querier and ingester, the logs for services are not showing up in my Grafana, even though I’m storing them in my S3 bucket(indexes are present), after this restart only logs after the restart were showing up and I badly want to know how the retention system truly works here. I will share my config map below as well.
Are you sure your logs are actually stored in S3? Do you see the chunk files there?
You don’t have retention configured, and as such Loki is supposed to keep logs forever. Retention is not your problem if you aren’t see logs after restart.
If these configurations are wrong suggest me a better way to store them in s3, i have made this after referring the docs. But I’m still confused on this part.
Do you see any error message in your querier? If you try to hit your Loki cluster with API (either query or labels API) right after restart what do you get?
Hi @tonyswumac i have tried restarting the querier, which has been deployed as statefulset, during the pod start i don’t see any errors popping up. So how to generate older logs from s3 ? even if the deployments for loki components(like ingester, querier) have been restarted(in some cases ran into pod crashes).
Not sure what you mean here. You should be able to send an API call to Loki querier and specify a time frame for logs from before the containers were restarted.