【问题标题】:telegraf input commands cmdtelegraf 输入命令 cmd
【发布时间】:2017-04-12 16:29:15
【问题描述】:

我想每 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 版本。我没有安装任何插件。

我错过了什么吗?

【问题讨论】:

    标签: influxdb telegraf telegraf-inputs-plugin


    【解决方案1】:

    参考

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

    .bat 的路径应该是绝对的,而不是相对的。缺少前导斜线。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-16
      • 1970-01-01
      • 1970-01-01
      • 2021-10-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多