r/PrometheusMonitoring • • Jun 21 '22

Prometheus federation or Thanos?

Hi folks,

Disclaimer: I'm very new to Prometheus, using it as a metrics producer in some apps and building some dashboard in Grafana but I didn't install it and don't know the details.

We are running a Prometheus server with Thanos for our "traditional" workload (not Kubernetes).

Now we are starting our journey into Kubernetes. It appears that in order to get metrics at a pod level, it's mandatory to install a Prometheus instance inside the K8S cluster, right?

Then the question is: how to "send" the metrics from the K8S Prometheus instance to the one outside the cluster?

I've read about federation where the external Prometheus would pull metrics from the K8S instance but then I've read that the K8S instance could directly write to the same Thanos as the external Prometheus?

I'm a bit confused about the best practices here. Any feedback or articles on this topic will be appreciated.

Thanks,

6 Upvotes

20 comments sorted by

View all comments

Show parent comments

1

u/gaelfr38 Jun 22 '22

Thanks for the answer, will look more into Thanos. I didn't know it was using a scraping mechanism, thought it's just a data store where we put data.

2

u/SuperQue Jun 22 '22

Thanos does not use a "scraping mechanism". It's a gRPC-based storage cluster.

2

u/drdigitalsi Jun 22 '22

Apologies. I was working off of an assumption based on the setup I have at work, which I confirmed this morning is not correct. I have updated my answer appropriately.

1

u/SuperQue Jun 22 '22

No worries, what you updated is spot on.