我正在尝试使用 fluentd 将 mongo 指标发送到 statsd,但我遇到了一些问题。
这是我的conf:
<source>
type serverstatus #https://gist.github.com/chrischang12/943a69b02f3435281557
uri mongodb://user:pass@localhost:27017/admin
stats_interval 2s
</source>
<match serverstatus.**>
type statsd
host udp.mystatsdserver.com
port 8125
</match>
我看到了 mongo 日志,并且 td-agent 正在收集指标,但问题是,显然,td-agent 没有将指标发送到 statsd。通过运行确认它: sudo tcpdump -nn -i any udp and src host <your_ip>
有人解决过这个问题吗?
我的另一个疑问是如何在 conf 中配置“statsdkey”参数?