使用telegraf作为jenkins的statistic-gatherer插件的输入

时间:2019-07-09 07:06:10

标签: jenkins telegraf

我正在使用telegraf通过统计收集器插件将jenkins事件发布到elasticsearch。如何在此插件中使用telegraf网址?

根据詹金斯所说,telegraf的网址应采用http://ci.mycompany.com/api/queues的形式。但是,我的网址是http://ci.mycompany.com/telegraf,它不起作用。交叉检查詹金斯日志。它甚至没有试图推动指标。我试图在telegraf.conf文件中将端点从/ telegraf更改为/ telegraf / queues,但是它给出了404(有意义)。

这是我的telegraf.conf文件

[global_tags]
 server = "test" # will tag all metrics with dc=us-east-1
 # rack = "1a"
 # user = "$USER"

[agent]
  interval = "5s"
  round_interval = true
  metric_batch_size = 100
  metric_buffer_limit = 10000
  collection_jitter = "0s"
  flush_interval = "10s"
  flush_jitter = "0s"
  precision = ""
  debug = true
 quiet = false
 logfile = ""
 #hostname = ""
 omit_hostname = true

[[inputs.http_listener_v2]]
  service_address = ":80"
  path = "/telegraf"
  read_timeout = "10s"
  methods = ["POST", "PUT"]
  write_timeout = "10s"
  max_body_size = "10MB"
  data_format = "json"


[[outputs.elasticsearch]]
   urls = [ "http://elasticsearch:9200" ] # required.
   timeout = "25s"
   enable_sniffer = false
   health_check_interval = "30s"
   index_name = "telegraf-%Y.%m.%d"
   manage_template = true
   template_name = "telegraf"

如何从Telegraf实现以下目标 http://ci.mycompany.com/telegraf/queues

或 詹金斯应将指标发布到以下地址 http://ci.mycompany.com/telegraf

0 个答案:

没有答案