我正在尝试使用 nc 命令将自定义指标发送到石墨导出器,但未成功。以下是步骤:
我使用 url 在我的 redhat 机器上获取石墨导出器: https ://github.com/prometheus/graphite_exporter/releases/download/v0.7.1/graphite_exporter-0.7.1.linux-amd64.tar.gz
解压缩 tar 并使用命令在后台执行:
./graphite_exporter &
现在石墨导出器监听端口:
网络统计-ntpl
tcp6 0 0 :::9108 :::* LISTEN 92554/./graphite_ex
tcp6 0 0 :::9109 :::* LISTEN 92554/./graphite_ex
我正在关注这篇文章(http://graphiteapp.org/quick-start-guides/feeding-metrics.html)来执行以下命令并提到输出:
echo "foo.bar 1 `date +%s`" | nc -vz localhost 9108 Ncat: Version 7.50 ( https://nmap.org/ncat ) Ncat: Connected to 127.0.0.1:9108. Ncat: 0 bytes sent, 0 bytes received in 0.01 seconds.
我可以在端口 9108 上远程登录:
telnet localhost 9108 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. ^] telnet> quit Connection closed.
我不确定将指标推送到石墨出口商我做错了什么,非常感谢任何帮助。