我想每60秒运行一个python脚本并将输出发送到Influxdb . python脚本是嵌入式的,并从Windows批处理文件中调用 .
虽然批处理文件和python脚本运行正常,但我无法通过TELEGRAF运行它
这是我的telegraf配置文件的输入和输出快照
# 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"
我有一个股票Influxdb和Telegraf版本 . 我没有安装任何插件 .
我错过了什么吗?
1 回答
参考
https://groups.google.com/forum/#!topic/influxdb/3MsoI59wsw0
.bat的路径应该是绝对的,而不是相对的 . 缺少前导斜杠 .