I am trying to find a way to get Promtail collect logs from a container file system. These logs were not generated using the standard output, which automatically gets discovered by Promtail. They have a different format and are archived in some cold storage.
I came across the suggested solutions in this answer. The only difference is that the logs I am interested in are read from persistent volumes (i.e., the logs are not generated by a running containerized application, rather they come from some archived files residing on a remote data store)
I managed to successfully read the logs via "static_configs" having the path pointing to the /var/log folder. In order to achieve this however, I had to have a second Promtail instance running locally on a pod and get the persistent volumes mounted to this Promtail's /var/log directory.
I was expecting this could have been achieved by running the second Promtail instance as a sidecar without having to mount the volumes directly to its /var/log, and letting the service discovery option via "kubernetes_sd_configs" and the "containers" label find out about the other container's logs.
Are there other possible ways to use Promtail as a sidecar container and get it read the logs files mounted to the other container's /var/log residing on the same pod?