Hi all, I have an architectural question.
I am using Prometheus as follows:
In a K8S cluster, running pods with multiple running processes running in a single container. These processes send metrics via a websocket connection to a central process which exposes a /metrics endpoint so that Prometheus scrapes from there the metrics from all processes.
When all process are finished they might send some special metrics just before finishing.
But all when all these process finish, this also makes the pod goes to completed, closing the http server and therefore making Prometheus unable to scrape.
What is the best way to guarantee that the latest metrics sent are scraped?
Would I need to wait that Prometheus scrapes the last metric before pod goes to completed?
I was planning to do that, but then I saw that the interval in the cluster is too big (1 minute + potentially the time to discover the job).
Does anyone has another, more feasible idea? Am I missing something?
Thanks,
Best regards,
Rafael.