# Merge two inputs in one measurement

**URL:** <https://community.influxdata.com/t/merge-two-inputs-in-one-measurement/12661>\
**Category:** Systems\
**Tags:** telegraf\
**Created:** [January 18, 2020, 12:12pm UTC](https://community.influxdata.com/t/merge-two-inputs-in-one-measurement/12661 "2020-01-18T12:12:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xavip](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/xavip/32/4255_2.png) [@xavip](https://community.influxdata.com/u/xavip)\
**Post date:** [January 18, 2020, 12:12pm UTC](https://community.influxdata.com/t/merge-two-inputs-in-one-measurement/12661/1 "2020-01-18T12:12:22Z")

</div>

Hi,

I’m testing telegraf to collect raspberry pi status, and send them to influxdb (I’m a newbie at both)

I can get “cpu” measurement with some fields “usage\_\*”

But in raspberry pi 4 i can get cpu temp reading a file:

```
[[inputs.file]] 
  files = ["/sys/class/thermal/thermal_zone0/temp"]
  name_override = "cpu.temp"
  data_format = "value"
  data_type = "integer"

```

and I can get a new measurement with the name “cpu.temp”

But I want to get temp inside cpu measurement.

If I use name\_override “cpu”, i can get a field “value” in cpu measurement, but is it possible to change the name of the field from “value” to “temp”?

I’ve tested cpu.temp, cpu\_temp, cpu/temp in name\_override without success.

Thanks!

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/daniel/32/142_2.png) [@daniel](https://community.influxdata.com/u/daniel)\
**Post date:** [January 22, 2020, 6:45am UTC](https://community.influxdata.com/t/merge-two-inputs-in-one-measurement/12661/2 "2020-01-22T06:45:32Z")

</div>

The `value` parser doesn’t allow you to set the field name, though this would be a nice addition. One option to work around this would be to use the rename processor. Another way is the `multifile` input which was designed to pulling multi field metrics out of the /proc and /sys directories. It would look something like this (untested):

```auto
[[inputs.multifile]]
  name_override = "cpu"
  base_dir = "/sys/class/thermal/thermal_zone0"

  [[inputs.multifile.file]]
    file = "temp"
    dest = "temp"
    conversion = "int"

```

---

<div class="post-metadata">

**Author:** ![xavip](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/xavip/32/4255_2.png) [@xavip](https://community.influxdata.com/u/xavip)\
**Post date:** [January 22, 2020, 2:38pm UTC](https://community.influxdata.com/t/merge-two-inputs-in-one-measurement/12661/3 "2020-01-22T14:38:16Z")

</div>

Thanks, works perfectly!
