当我为它提供socket_listener输入配置时,Telegraf进程意外终止

时间:2018-12-10 10:43:54

标签: windows telegraf

我需要定义Telegraf监听器。我使用了一些小的调整的示例配置:

[[inputs.socket_listener]]
  ## URL to listen on
  service_address = "tcp://:8094"
  # service_address = "tcp://127.0.0.1:http"
  # service_address = "tcp4://:8094"
  # service_address = "tcp6://:8094"
  # service_address = "tcp6://[2001:db8::1]:8094"
  # service_address = "udp://:8094"
  # service_address = "udp4://:8094"
  # service_address = "udp6://:8094"
  # service_address = "unix:///tmp/telegraf.sock"
  # service_address = "unixgram:///tmp/telegraf.sock"

  ## Maximum number of concurrent connections.
  ## Only applies to stream sockets (e.g. TCP).
  ## 0 (default) is unlimited.
  max_connections = 1024

  ## Read timeout.
  ## Only applies to stream sockets (e.g. TCP).
  ## 0 (default) is unlimited.
  read_timeout = "30s"

  ## Optional TLS configuration.
  ## Only applies to stream sockets (e.g. TCP).
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key  = "/etc/telegraf/key.pem"
  ## Enables client authentication if set.
  # tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"]

  ## Maximum socket buffer size (in bytes when no unit specified).
  ## For stream sockets, once the buffer fills up, the sender will start backing up.
  ## For datagram sockets, once the buffer fills up, metrics will start dropping.
  ## Defaults to the OS default.
  # read_buffer_size = "64KiB"

  ## Period between keep alive probes.
  ## Only applies to TCP sockets.
  ## 0 disables keep alive probes.
  ## Defaults to the OS configuration.
  keep_alive_period = 0

  ## Data format to consume.
  ## Each data format has its own unique set of configuration options, read
  ## more about them here:
  ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
  data_format = "json"
  json_string_fields = ["EventReceivedTime", "SourceModuleName", "s_computername", "uri"]
  json_name_key = "time_taken"
  json_time_key = "EventTime"
  json_time_format = "2018-12-10 09:20:10"

当我使用net start telegraf启动telegraf时,出现错误,并且没有任何内容写入日志文件。我的配置有什么问题?

C:\telegraf\telegraf>net start telegraf
The Telegraf Data Collector Service service is starting.
The Telegraf Data Collector Service service could not be started.

A system error has occurred.

System error 1067 has occurred.

The process terminated unexpectedly.

0 个答案:

没有答案