# Telegraf exec, json and Prometheus

**URL:** <https://community.influxdata.com/t/telegraf-exec-json-and-prometheus/19272>\
**Category:** Welcome & Getting Started\
**Tags:** telegraf, prometheus\
**Created:** [April 6, 2021, 7:35pm UTC](https://community.influxdata.com/t/telegraf-exec-json-and-prometheus/19272 "2021-04-06T19:35:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreirapuru](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@andreirapuru](https://community.influxdata.com/u/andreirapuru)\
**Post date:** [April 6, 2021, 7:35pm UTC](https://community.influxdata.com/t/telegraf-exec-json-and-prometheus/19272/1 "2021-04-06T19:35:44Z")

</div>

Hello there, on my telegraf.conf I have an inputs.exec that runs a script (speed test for the internet connection).

[[inputs.exec]]  
commands = ["/usr/local/bin/speedtest-cli --json"]  
timeout = “1m”  
interval = “60m”  
name\_suffix = “\_speedtest”  
data\_format = “json”

It is working (telegraf is running the script), and if I send the output to a file I get data like this, as expected.  
{“fields”:{“bytes\_received”:85166856,“bytes\_sent”:77045760,“download”:66258521.91383733,“ping”:25.834,“server\_d”:449.25328927251144,“server\_latency”:25.834,“upload”:61521857.66314547},“name”:“exec\_speedtest”,“tags”:{“host”:“raspy”},“timestamp”:1617732926}

However, on Prometheus I dont see any data (I do see the fields exec\_speedtest\_download for example, but not the data.)

Is there a way to send data (json) from a executed scritp directed to Prometheus?
