0

I want to run a python script every 60 seconds and send output across to Influxdb. The python script is embedded and called from a windows batch file.

While the batch file and python script are running fine, I am unable to run it through TELEGRAF

Here is my input and output snapshot from telegraf config file

# Output
# Metrics
[[outputs.influxdb]]
  urls = ["http://localhost:8086"] # required
  database = "test_db" # required

# Input
# Metrics
[[inputs.exec]]
  # Shell/commands array
  commands = ["C:\\Users\\P\\Desktop\\metrics.cmd"]
  data_format = "influx"
  interval = "60s"

I have a stock Influxdb & Telegraf version. I did not install any plugins.

Am I missing something?

Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
Prathamesh
  • 65
  • 2
  • 10

1 Answers1

0

Refer to

https://groups.google.com/forum/#!topic/influxdb/3MsoI59wsw0

The path to .bat should be absolute, not relative. Missing the leading slash.

Prathamesh
  • 65
  • 2
  • 10