Hi Stuart,

Thanks for all the help on this. I have created a Grafana cloud account and
their documentation states that it is possible to send the metrics from one
Prometheus server to the Prometheus instance on Grafana cloud:
https://grafana.com/docs/grafana-cloud/metrics/prometheus/

remote_write:- url: https://prometheus-us-central1.grafana.net/api/prom/push
  basic_auth:
    username: <Your Metrics instance ID>
    password: <Your Grafana.com API Key>


I thought that this can be duplicated for my on-premise set up. I am
assuming that it is the Pushgateway to which the metrics are pushed from
the source Prometheus server to destination Prometheus server. Any ideas on
this?

Regards,
Saurabh

On Thu, Feb 25, 2021 at 3:25 AM Stuart Clark <[email protected]>
wrote:

> On 24/02/2021 20:37, Saurabh Vartak wrote:
> > Hello all,
> >
> > I am trying push the metrics from the Prometheus installed on mu
> > Kubernetes cluster to another centralized Prometheus server.
> >
> > In my Kubernetes cluster I have configured the remote_write section
> > for the config map used by Prometheus on my Kubernetes cluster
> >
> >   prometheus.yml: |
> >     global:
> >       evaluation_interval: 1m
> >       scrape_interval: 1m
> >       scrape_timeout: 10s
> >     remote_write:
> >     - url: http://mypromserver:9091/metrics/job/aksjob/instance/aks1
> >
> >
> > In my centralized Prometheus server, I have the below configuration in
> > the Prometheus.yaml file:
> >
> > global:
> >   scrape_interval: 10s
> >
> > scrape_configs:
> >   - job_name: 'prometheus_metrics'
> >     scrape_interval: 5s
> >     static_configs:
> >       - targets: ['localhost:9090']
> >   - job_name: 'node_exporter_metrics'
> >     scrape_interval: 5s
> >     static_configs:
> >       - targets: ['localhost:9100']
> >   - job_name: 'Pushgateway'
> >     scrape_interval: 5s
> >     static_configs:
> >       - targets: ['localhost:9091']
> >
> > Am I doing anything wrong here. I am browsing my portal but I am not
> > able to understand how to query the metrics which have been forwarded
> > from my Kubernetes cluster ... if at all they are being forwarded.
> >
> > Any help would be greatly appreciated here.
>
> Prometheus doesn't support sending metrics to another Prometheus server
> via remote write, other than via an experimental option in the latest
> version (2.25.0).
>
> The normal mechanism would be for the central server to fetch metrics
> via federation, although this is designed for a limited subset of
> aggregate metrics and not a complete copy. Alternatively a system such
> as Thanos could be used as an alternative global metrics store which can
> be accessed by all your Prometheus servers.
>
> --
> Stuart Clark
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAKGwQmCx9dgo4WA5H5FLTDp1RKM6G%3DbLtXtc4XiT35K8XyFM8w%40mail.gmail.com.

Reply via email to