Influxdb 如何调试Telegraf?

Influxdb 如何调试Telegraf?,influxdb,telegraf,Influxdb,Telegraf,我正试图让telegraf与XDB合作,但我遇到了麻烦。我在telegraf配置文件中添加了以下块: [[inputs.win_perf_counters.object]] # Process metrics, in this case for IIS only ObjectName = "Process" Instances = ["W3SVC"] Counters = ["% Processor Time","Handle Count","Private Bytes","Thread Cou

我正试图让telegraf与XDB合作,但我遇到了麻烦。我在telegraf配置文件中添加了以下块:

[[inputs.win_perf_counters.object]]
# Process metrics, in this case for IIS only
ObjectName = "Process"
Instances = ["W3SVC"]
Counters = ["% Processor Time","Handle Count","Private Bytes","Thread Count","Virtual Bytes","Working Set"]
Measurement = "win_proc"

然而,当我搜索我的数据库时,我从来没有看到那个测量值。我知道进程正在运行,所以它应该输出一些东西。问题是,即使我打开了日志记录,也没有日志文件。事件查看器中也没有任何内容。除了下载源代码并在本地调试器中运行程序外,我不知道如何继续。有人有什么想法吗?

原来我的日志文件字符串格式不对。我现在有它的日志,但日志是无用的。关于为什么没有将win_proc测量写入db,仍然没有错误或解释。它只是一行接一行的“以y毫秒发送X测量”
[agent]
  ## Default data collection interval for all inputs
  interval = "10s"
  ## Log at debug level.
  debug = true
  ## Log only error level messages.
  quiet = false

  ## Log target controls the destination for logs and can be one of "file",
  ## "stderr" or, on Windows, "eventlog".  When set to "file", the output file
  ## is determined by the "logfile" setting.
  # logtarget = "file"

  ## Name of the file to be logged to when using the "file" logtarget.  If set to
  ## the empty string then logs are written to stderr.
  # logfile = ""

You can specify debug = true in the agent config to print the debug logs. If you don't specify any log file, the logs will be printed on terminal.