最后更新于5年前
这有帮助吗?
希望通过抓取或轮询单个应用程序实例来获得度量数据。Spring Boot在/actuator/prometheus上提供了一个执行器端点,可以用适当的格式显示。
/actuator/prometheus
注 缺省情况下端点不可用,必须公开端点,请参阅公开端点以获得更多详细信息。
下面是一个要添加到prometheus.yml中的scrape_config示例:
prometheus.yml
scrape_config
scrape_configs: - job_name: 'spring' metrics_path: '/actuator/prometheus' static_configs: - targets: ['HOST:PORT']