我正在尝试使用ganglia监控我的dropwizard web服务。我在本地机器上运行了gmond和gmetad。我可以在ganglia-web上查看基本指标(eg.cpu、内存使用情况)。
根据this的说法,我还在我的服务中添加了ganglia reporter。但在我的ganglia-web上什么都没有。
private static final MetricRegistry metrics = new MetricRegistry();
private final Timer ingest = metrics.timer("MyApp");
try {
final GMetric ganglia = new GMetric("localhost", 8649, GMetric.UDPAddressingMode.MULTICAST, 1);
final GangliaReporter gangliaReporter = GangliaReporter.forRegistry(metrics)
.convertRatesTo(TimeUnit.SECONDS)
.convertDurationsTo(TimeUnit.MILLISECONDS)
.build(ganglia);
gangliaReporter.start(1, TimeUnit.MINUTES);
} catch (Exception e) {
LOGGER.error("Can not initiate GangliaReporter",e);
}发布于 2016-08-03 21:23:43
在我看来,您输入了一个正常的网络地址,但告诉GMetric需要一个多播地址。下面是我使用的(和有效的):
GMetric ganglia = new GMetric("192.168.0.40", 8649, UDPAddressingMode.UNICAST, 1);如果这对您没有帮助,请显示您的gmond.conf (udp通道配置)
https://stackoverflow.com/questions/34081330
复制相似问题