# Telegraf inputs.exec plugin

**URL:** https://community.influxdata.com/t/telegraf-inputs-exec-plugin/23112
**Category:** Telegraf
**Tags:** influxdb, telegraf
**Created:** [December 24, 2021, 8:08pm UTC](https://community.influxdata.com/t/telegraf-inputs-exec-plugin/23112 "2021-12-24T20:08:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![menvol3](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/menvol3/32/9078_2.png) [@menvol3](https://community.influxdata.com/u/menvol3)
#### Post date: [December 24, 2021, 8:08pm UTC](https://community.influxdata.com/t/telegraf-inputs-exec-plugin/23112/1 "2021-12-24T20:08:31Z")

</div>

Hi there,  
Can someone help me with the Telegraf inputs.exec plugin ?  
Currently I’m facing an issue with running bash commands that check the kernel version.  
Here is my commands

```auto
commands = ["/bin/bash -c \"version_check=$(uname -a | awk '{print $3}') && echo \"tag=tag\" kernel_version=\"${version_check}\"\""]
data_format = "influx"

```

And I’m always receiving this error in log

> [inputs.exec] Error in plugin: metric parse error: expected field at 1:16: “tag=tag kernel\_version=5.10.63-v7l+”

---

<div class="post-metadata">

### Author: ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)
#### Post date: [December 24, 2021, 10:11pm UTC](https://community.influxdata.com/t/telegraf-inputs-exec-plugin/23112/2 "2021-12-24T22:11:11Z")

</div>

Hello @menvol3,  
Welcome! Your output has to be in line protocol:

> **[Line protocol | InfluxDB OSS 2.6 Documentation](https://docs.influxdata.com/influxdb/v2.0/reference/syntax/line-protocol/#field-set)**
>
> InfluxDB uses line protocol to write data points. It is a text-based format that provides the measurement, tag set, field set, and timestamp of a data point.

I find using the --test flag helpful when debugging telegraf because it’ll send your attempts to STDOUT so you can read your “line protocol” and more easily see what’s missing.

So far it looks like your line protocol is missing:

- a measurement (unless you want your measurement to be tag with a measurement value of tag which is confusing)
- a more useful tag or no tag
- quotes surrounding the field value “5.10.63-v7l+”
