0

Is it possible to setup grafana agent on k8s cluster and then use the central prometheus to pull metrics from it ? From what I see in docs is that grafana agent can push to any system that supports prometheus remote_write api like cortex etc .So can we push to prometheus pushgateway ? If yes can someone point me to an example or direction on how this is to be done .

  • Can you be a bit more explicit about your architecture please ? I'm not sure i got what you have and what you want. From what I understand, you have a "central prometheus" outside k8s and and a Grafana inside k8s. You want to get the metrics from Grafana in prometheus. Is that it ? – Marc ABOUCHACRA Oct 13 '21 at 11:26
  • I have a central prometheus from which I want to scrape another k8s cluster but the owner of that k8s cluster doesnt want o setup and manage prometheus .So I thought of suggesting graphana agent to him .As I was doing the poc I am trying to push data from graphana agent to prometheus and reder alerts usinng alert manager form this prometheus .Just now I was successful in exposing some node exporter metrics on an ingress from the graphana agent .Still trying to figure out the usage of remote write from graphana agent . – user3422981 Oct 13 '21 at 11:59
  • Grafana does not "write" any metrics (except for its own metrics). It's just a dashboarding GUI. The remote write configuration is a prometheus configuration, not grafana. You can find the doc [here](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write) – Marc ABOUCHACRA Oct 13 '21 at 12:05
  • @MarcABOUCHACRA so we cannot pull metrics from grafana agent ?I can pull the node metrics from grafana agent but I cannot pull metrics grafana agent has scraped from static endpoints am I right ?I need to use remote write functionality for it correct ? – user3422981 Nov 09 '21 at 11:04
  • I'm not sure I get what you mean by *"grafana agent"* (are you working with Grafana cloud ?) and *"pull metrics"*. You need to add some clarification maybe by describing your architecture directly in the question. – Marc ABOUCHACRA Nov 09 '21 at 13:14

0 Answers0