【发布时间】:2023-07-25 22:49:01
【问题描述】:
我已经设置了一个 Graphite 服务器,我正在尝试将我的 Java 指标打印到 Graphite UI 中。 Graphite 已启动并正在运行,因为我可以在 localhost 中看到它的 Web UI。我使用下面的代码将我的指标结果重定向到石墨控制台。
Graphite graphite = new Graphite(new InetSocketAddress("http://localhost", 80));
GraphiteReporter reporter = GraphiteReporter.forRegistry(this.metricRegistry)
.convertRatesTo(TimeUnit.SECONDS)
.convertDurationsTo(TimeUnit.MILLISECONDS)
.filter(MetricFilter.ALL)
.build(graphite);
reporter.start(1, TimeUnit.MINUTES);
但网络用户界面上没有显示任何内容。我在这里做错了什么?我需要为石墨指定任何其他配置吗?安装石墨后,我没有添加任何配置。任何帮助将不胜感激。
【问题讨论】:
标签: java jmx metrics graphite codahale-metrics