首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何调试Telegraf?

如何调试Telegraf?
EN

Stack Overflow用户
提问于 2020-06-02 01:19:53
回答 1查看 11.3K关注 0票数 6

我正在尝试让telegraf与influxdb一起工作,但我遇到了麻烦。我在telegraf配置文件中添加了以下代码块:

代码语言:javascript
复制
[[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"

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

EN

回答 1

Stack Overflow用户

发布于 2020-06-03 19:46:30

代码语言:javascript
复制
[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.
票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62137497

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档