# Using Prometheus remote\_write to send metrics to Elastic cloud

**URL:** <https://discuss.elastic.co/t/using-prometheus-remote-write-to-send-metrics-to-elastic-cloud/317014>\
**Category:** Elasticsearch\
**Created:** [October 19, 2022, 2:06pm UTC](https://discuss.elastic.co/t/using-prometheus-remote-write-to-send-metrics-to-elastic-cloud/317014 "2022-10-19T14:06:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maduranga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maduranga/32/109172_2.png) [@Maduranga](https://discuss.elastic.co/u/Maduranga)\
**Post date:** [October 19, 2022, 2:06pm UTC](https://discuss.elastic.co/t/using-prometheus-remote-write-to-send-metrics-to-elastic-cloud/317014/1 "2022-10-19T14:06:51Z")

</div>

Hello,

I have a Prometheus server which is sending currently sending metrics to Grafana using `remote_write`.  
I would like to use our Elastic cloud Kibana to get the Prometheus metrics.  
Would like advice on how to authenticate and the URL for the `remote_write`.  
What should be the URL and the authentication method for the Elastic cloud?

Thank you,  
Maduranga

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [October 19, 2022, 4:48pm UTC](https://discuss.elastic.co/t/using-prometheus-remote-write-to-send-metrics-to-elastic-cloud/317014/2 "2022-10-19T16:48:21Z")

</div>

Perhaps take a look at this

> **[Prometheus remote\_write metricset | Metricbeat Reference \[8.4\] | Elastic](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-metricset-prometheus-remote_write.html)**

---

<div class="post-metadata">

**Author:** ![Maduranga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maduranga/32/109172_2.png) [@Maduranga](https://discuss.elastic.co/u/Maduranga)\
**Post date:** [October 19, 2022, 8:35pm UTC](https://discuss.elastic.co/t/using-prometheus-remote-write-to-send-metrics-to-elastic-cloud/317014/3 "2022-10-19T20:35:16Z")

</div>

Thank you @stephenb  
I checked that document but it doesn't mention what credentials we should set when connecting to Elastic cloud.

Thank you,  
Maduranga

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [October 19, 2022, 8:38pm UTC](https://discuss.elastic.co/t/using-prometheus-remote-write-to-send-metrics-to-elastic-cloud/317014/4 "2022-10-19T20:38:57Z")

</div>

> [@Maduranga](#):
>
> Thank you @stephenb  
> I checked that document but it doesn't mention what credentials we should set when connecting to Elastic cloud.
> 
> Thank you,  
> Maduranga

That is an module...

The elastic cloud credential go in the metricbeat output section not the module sections

> **[Configure the output for Elasticsearch Service on Elastic Cloud | Metricbeat...](https://www.elastic.co/guide/en/beats/metricbeat/current/configure-cloud-id.html)**

In genereal metricbeat has

- General Settings
- Inputs or Modules \<--- The prometheus moduls
- Outputs \<--- Elastic Search Service Settings

---

<div class="post-metadata">

**Author:** ![Maduranga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maduranga/32/109172_2.png) [@Maduranga](https://discuss.elastic.co/u/Maduranga)\
**Post date:** [October 20, 2022, 12:20am UTC](https://discuss.elastic.co/t/using-prometheus-remote-write-to-send-metrics-to-elastic-cloud/317014/5 "2022-10-20T00:20:16Z")

</div>

Thank you again @stephenb  
I am little confused.  
I am trying to send the Prometheus metrics from Prometheus server to the Elastic cloud using `prometheus.yml` files remote\_write.  
The architecture in here: [Prometheus Monitoring | Elastic](https://www.elastic.co/what-is/prometheus-monitoring)  
So there will be no metricbeat module in the Prometheus server.

I suppose the the URL for `remote_write` is the Elastic search endpoint URL, but I am not sure how to use the `cloud.id` and `cloud.auth`.

Regards,  
Maduranga

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [October 20, 2022, 3:19am UTC](https://discuss.elastic.co/t/using-prometheus-remote-write-to-send-metrics-to-elastic-cloud/317014/6 "2022-10-20T03:19:42Z")

</div>

Yes if you look at page you reference you must run metricbeat somewhere ... where you want to run it is up to you?

The Data Flow as shown is

`Your App -> Prometheus Exporter -> Prometheus Server (Remote Write) -> Metricbeat With Prometheus Module (Install where you want) -> Elasticsearch Service on Elastic Cloud`

You need to install and run Metricbeat to read the `remote_write` and then Ship the data y ... You could install it on the same server that the prometheus server or on just another server somewhere else

This picture shows Self Managed Elastic Search ... For Elastic Cloud you need to install metricbeat on you own VM Somewhere... I would put it on or near the prometheus server

 ![Screen Shot 2022-10-19 at 8.14.37 PM](https://us1.discourse-cdn.com/elastic/original/3X/b/f/bf4bcb8ecccec5f1da29904e6913f87c38400022.png)

---

<div class="post-metadata">

**Author:** ![Maduranga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maduranga/32/109172_2.png) [@Maduranga](https://discuss.elastic.co/u/Maduranga)\
**Post date:** [October 25, 2022, 1:48am UTC](https://discuss.elastic.co/t/using-prometheus-remote-write-to-send-metrics-to-elastic-cloud/317014/7 "2022-10-25T01:48:41Z")

</div>

Thank you @stephenb  
I get it now. I am using a Fleet agent with Prometheus enabled.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 22, 2022, 1:49am UTC](https://discuss.elastic.co/t/using-prometheus-remote-write-to-send-metrics-to-elastic-cloud/317014/8 "2022-11-22T01:49:12Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
