# Best way to Send data from influxdb to elastic

**URL:** <https://discuss.elastic.co/t/best-way-to-send-data-from-influxdb-to-elastic/327010>\
**Category:** Elastic Observability\
**Tags:** infrastructure-observability\
**Created:** [March 5, 2023, 3:49pm UTC](https://discuss.elastic.co/t/best-way-to-send-data-from-influxdb-to-elastic/327010 "2023-03-05T15:49:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Indeed2000](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@Indeed2000](https://discuss.elastic.co/u/Indeed2000)\
**Post date:** [March 5, 2023, 3:49pm UTC](https://discuss.elastic.co/t/best-way-to-send-data-from-influxdb-to-elastic/327010/1 "2023-03-05T15:49:51Z")

</div>

Hi  
I have influxdb in production that store metric from different source now question is:

1-How can i send these metric to elastic for realtime analysis?

2-which is better? read data with elastic from influx, or configure influxdb send metric to elastic?

3-is it logical to send these metric from influxdb to elastic? Or i should use elastic agent, or opentelemetry?

Any idea?  
Thanks

---

<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:** [March 5, 2023, 3:52pm UTC](https://discuss.elastic.co/t/best-way-to-send-data-from-influxdb-to-elastic/327010/2 "2023-03-05T15:52:08Z")

</div>

Hi @Indeed2000

In short, I think you'd be better off sending your metrics directly to elasticsearch with the elastic agent or open telemetry rather than sending it to influxdb first and then trying to pull it into elastic, especially if you're interested in near real time.

---

<div class="post-metadata">

**Author:** ![Indeed2000](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@Indeed2000](https://discuss.elastic.co/u/Indeed2000)\
**Post date:** [March 5, 2023, 4:31pm UTC](https://discuss.elastic.co/t/best-way-to-send-data-from-influxdb-to-elastic/327010/3 "2023-03-05T16:31:53Z")

</div>

@stephenb here is my stack:

Jboss,mq,db2,my java app.

all metrics send directly from my app and other services that i mention to influxdb, these service locate in different host.

Now this is current issue, if i want to send metrics directly need to reconfigure all of them, but if i use influxdb data, benfit is all metrics located same place.

And there is no universal agent for all of them.

---

<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:** [March 5, 2023, 4:42pm UTC](https://discuss.elastic.co/t/best-way-to-send-data-from-influxdb-to-elastic/327010/4 "2023-03-05T16:42:44Z")

</div>

Ok so now I am confused... So if #3 is not really an option... If you already have all your metrics in one place, and you like / want it that way...why do you want to send them to elasticsearch.. what are you trying to accomplish?

Yes there are typically not a single agent for everything... But most agents can be pointed at elasticsearch as a metrics store.

Curious about what agents are you using today?

The telegraf agent can point to more than one output.

Elasticsearch does not read data from other systems so you will need to pull data from influxdb and push it to elasticsearch... You will probably need to use an ETL like tool or write some custom code.

Then of course you will be trying to keep 2 data stores in sync.

Looks like influxdb has a REST API you might be able to use logstash with the HTTP input.

So again what are you actually trying to accomplish? Perhaps that will help us guide you better

---

<div class="post-metadata">

**Author:** ![Indeed2000](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@Indeed2000](https://discuss.elastic.co/u/Indeed2000)\
**Post date:** [March 6, 2023, 8:04am UTC](https://discuss.elastic.co/t/best-way-to-send-data-from-influxdb-to-elastic/327010/5 "2023-03-06T08:04:53Z")

</div>

> [@stephenb](#):
>
> Ok so now I am confused... So if #3 is not really an option... If you already have all your metrics in one place, and you like / want it that way...why do you want to send them to elasticsearch.. what are you trying to accomplish?

using elastic machine learning to detect realtime anomaly.

---

<div class="post-metadata">

**Author:** ![Indeed2000](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@Indeed2000](https://discuss.elastic.co/u/Indeed2000)\
**Post date:** [March 6, 2023, 8:05am UTC](https://discuss.elastic.co/t/best-way-to-send-data-from-influxdb-to-elastic/327010/6 "2023-03-06T08:05:52Z")

</div>

> [@stephenb](#):
>
> Curious about what agents are you using today?

send directly metrics from myapp to influx and use telegraf as agent to send system metric.

---

<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:** [March 6, 2023, 2:49pm UTC](https://discuss.elastic.co/t/best-way-to-send-data-from-influxdb-to-elastic/327010/7 "2023-03-06T14:49:36Z")

</div>

Hi @Indeed2000

Ok for anomaly detection / alerting makes sense.

Telegraf can send to more than one output.

Otherwise your choice will be to use some tool to pull the data from influxdb (unless it has a push feature) and push telemetry data into elasticsearch. That will typically involve some polling interval.

Or You could re-architect and put something in the middle like Kafka and then publish the data to both influxdb and Elasticsearch

I think those are your 3 high level choices unless you want to switch over to elasticsearch all together.

---

<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:** [April 3, 2023, 2:50pm UTC](https://discuss.elastic.co/t/best-way-to-send-data-from-influxdb-to-elastic/327010/8 "2023-04-03T14:50:19Z")

</div>

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