windows - 当我为它提供 socket_listener 输入配置时,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"
当我启动 telegraf 时,net start 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.
解决方案
推荐阅读
- r - R - 数据帧到频率表
- echarts - 你如何让 series.markPoint 实际显示一些东西?
- tcp - TCP序列号如何在双向通信/滑动窗口中工作?
- python - Pydantic 严格模式 - 抛弃 Optional
- json - 访问html中的嵌套对象以获取角度
- regex - 使用正则表达式删除特定字符块中的所有内容
- c++ - 用于存储类对象的 C++ 哈希表
- intellij-idea - 带有我插件的 Intellij 代码在 ubuntu 上不起作用
- c# - 我可以不可知地传递表值参数吗?
- python - 对列执行函数,并用新值替换旧值。访问 python (pyodbc 和 pandas)