# Telegraf - Influx v1 output

**URL:** <https://www.wago.community/t/telegraf-influx-v1-output/310>\
**Category:** Hardware and Linux\
**Tags:** docker, influxdb\
**Created:** [November 21, 2022, 10:17am UTC](https://www.wago.community/t/telegraf-influx-v1-output/310 "2022-11-21T10:17:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![WagoGrim](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagogrim/32/60_2.png) [@WagoGrim](https://www.wago.community/u/WagoGrim)\
**Post date:** [November 21, 2022, 10:17am UTC](https://www.wago.community/t/telegraf-influx-v1-output/310/1 "2022-11-21T10:17:49Z")

</div>

I’m parsing Modbus/RTU data to Influx v1 in Telegraf but only want to log some of the values (the rest of them I want to stream). Does anyone know how to configure it ? Looking through the .conf file I found nothing spesific.

---

<div class="post-metadata">

**Author:** ![quenorha](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/quenorha/32/429_2.png) [@quenorha](https://www.wago.community/u/quenorha)\
**Post date:** [November 21, 2022, 10:54am UTC](https://www.wago.community/t/telegraf-influx-v1-output/310/2 "2022-11-21T10:54:29Z")

</div>

Are you talking about the telegraf modbus input plugin ? [telegraf/plugins/inputs/modbus at master · influxdata/telegraf · GitHub](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/modbus)  
I have already use it to get PRO 2 PSU data using Modbus/TCP.  
I’m not sure to understand your question ?

---

<div class="post-metadata">

**Author:** ![WagoGrim](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagogrim/32/60_2.png) [@WagoGrim](https://www.wago.community/u/WagoGrim)\
**Post date:** [November 21, 2022, 11:08am UTC](https://www.wago.community/t/telegraf-influx-v1-output/310/3 "2022-11-21T11:08:02Z")

</div>

Yes and the RTU configuration. Default setup of this and the Influx DB you get all the modbus datapoints to Influx but I only want a few of these modbus input points logged. The others I want to configure with another Telegraf output. So the question was simply how to make a selection of what Telegraf inputs to transfer to what Telegraf outputs.

---

<div class="post-metadata">

**Author:** ![hoprodgarage](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/hoprodgarage/32/147_2.png) [@hoprodgarage](https://www.wago.community/u/hoprodgarage)\
**Post date:** [November 21, 2022, 11:44am UTC](https://www.wago.community/t/telegraf-influx-v1-output/310/4 "2022-11-21T11:44:10Z")

</div>

Could a filter like namepass do the trick?

> **[Configuring Telegraf | Telegraf 1.21 Documentation](https://docs.influxdata.com/telegraf/v1.12/administration/configuration/#measurement-filtering)**
>
> Overview of the Telegraf configuration file, enabling plugins, and setting environment variables.

---

<div class="post-metadata">

**Author:** ![quenorha](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/quenorha/32/429_2.png) [@quenorha](https://www.wago.community/u/quenorha)\
**Post date:** [November 21, 2022, 12:49pm UTC](https://www.wago.community/t/telegraf-influx-v1-output/310/5 "2022-11-21T12:49:53Z")

</div>

Ok I understand. Have you tried using “namepass” option of output plugin ?

> <https://github.com/influxdata/telegraf/issues/809#issuecomment-193824686>
>
> It would be very useful to be able to output exec inputs to different Influxdb d…atabases with differing retention policies and precisions. e.g.
> 
> \`\`\`
> \[\[inputs.exec\]\]
> command = "/usr/local/bin/my5minutescript.sh"
> interval = "5m"  
> data\_format = "influx"
> influx\_db = "database1"
> influx\_retention = "default"
> influx\_precision = "s"
> 
> \[\[inputs.exec\]\]
> command = "/usr/local/bin/my5secondcript.sh"
> interval = "5s"
> data\_format = "influx"
> influx\_db = "database2"
> influx\_retention = "5days"
> influx\_precision = "ns"
> \`\`\`

It looks you can filter data for specific output based on name defined in input plugin. I guess you have to double the configuration for the modbus part.  
I’ve never try it, though.

---

<div class="post-metadata">

**Author:** ![quenorha](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/quenorha/32/429_2.png) [@quenorha](https://www.wago.community/u/quenorha)\
**Post date:** [November 21, 2022, 12:50pm UTC](https://www.wago.community/t/telegraf-influx-v1-output/310/6 "2022-11-21T12:50:46Z")

</div>

I answered too late 🙂

---

<div class="post-metadata">

**Author:** ![hoprodgarage](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/hoprodgarage/32/147_2.png) [@hoprodgarage](https://www.wago.community/u/hoprodgarage)\
**Post date:** [November 21, 2022, 1:02pm UTC](https://www.wago.community/t/telegraf-influx-v1-output/310/7 "2022-11-21T13:02:55Z")

</div>

You’re so slow! 😃

.

---

<div class="post-metadata">

**Author:** ![WagoGrim](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagogrim/32/60_2.png) [@WagoGrim](https://www.wago.community/u/WagoGrim)\
**Post date:** [November 21, 2022, 2:21pm UTC](https://www.wago.community/t/telegraf-influx-v1-output/310/8 "2022-11-21T14:21:36Z")

</div>

Yes perfect. I’m going to try it out!
