# Sending metrics to InfluxDB

**URL:** <https://discuss.elastic.co/t/sending-metrics-to-influxdb/51591>\
**Category:** Logstash\
**Created:** [June 1, 2016, 4:44pm UTC](https://discuss.elastic.co/t/sending-metrics-to-influxdb/51591 "2016-06-01T16:44:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aodj](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@aodj](https://discuss.elastic.co/u/aodj)\
**Post date:** [June 1, 2016, 4:44pm UTC](https://discuss.elastic.co/t/sending-metrics-to-influxdb/51591/1 "2016-06-01T16:44:53Z")

</div>

I'm attempting to use the `metrics` filter to parse incoming logs, and to dispatch the results to influxdb using the Logstash output for Influx. The `influx` plugin requires a hard coded list of data points to send to InfluxDB, but since I'm extracting values from incoming logs (for example HTTP status codes) I don't know what the field names will be.

Has anyone had any success configuring the influx output to work with metrics of this form? I've tried using `use_event_fields_for_data_points` but this doesn't appear to work properly, since the data is not a string =\> string hash, but rather a string =\> hash:

> `{ "@version" => "1", "@timestamp" => "2016-06-01T16:32:06.390Z", "message" => "ip-10-0-28-93", "200" => { "count" => 2, "rate_1m" => 0.0, "rate_5m" => 0.0, "rate_15m" => 0.0 }, "400" => { "count" => 2, "rate_1m" => 0.0, "rate_5m" => 0.0, "rate_15m" => 0.0 }, "tags" => [[0] "metric" ] }`

The data\_points field in the influx output would need to be in the form of `{"200"=>2, "400"=>2}` (if we use only the count of events and ignore the rate values)

---

<div class="post-metadata">

**Author:** ![elvarb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elvarb/32/44840_2.png) [@elvarb](https://discuss.elastic.co/u/elvarb)\
**Post date:** [August 24, 2016, 3:24pm UTC](https://discuss.elastic.co/t/sending-metrics-to-influxdb/51591/2 "2016-08-24T15:24:48Z")

</div>

Did you find any solution to this?

---

<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:** [July 6, 2017, 4:41am UTC](https://discuss.elastic.co/t/sending-metrics-to-influxdb/51591/3 "2017-07-06T04:41:48Z")

</div>


