我要制作应用程序监控系统。我正在使用 spring-boot 执行器,我可以制作一些信息,例如指标、健康状况等。请参阅附件。
如您所见,有很多东西,例如内存、堆到计数器和仪表。(sample.actuator.SampleController.hello.* 由 com.codahale.metrics.annotation.Timed 制作)
我想将这些信息发送给石墨进行监控。谷歌说那些代码。
@Configuration
public class MonitoringConfig {
@Autowired
private MetricRegistry metricRegistry;
@Bean
public GraphiteReporter graphiteReporter() {
Graphite graphite = new Graphite(new InetSocketAddress("70.50.8.111",
2003));
GraphiteReporter reporter = GraphiteReporter
.forRegistry(metricRegistry).prefixedWith("boot")
.build(graphite);
reporter.start(1000, TimeUnit.MILLISECONDS);
return reporter;
}
}
但记者只发了计数器和量规。要向记者插入其他信息,我应该怎么做?
请帮忙....