Changing the url used by the PrometheusEndpoint in the Spring Boot integration

511 views
Skip to first unread message

ma...@sailes.co.uk

unread,
Apr 21, 2017, 9:45:50 AM4/21/17
to Prometheus Users
In my application, I'm using the following annotations.

@EnablePrometheusEndpoint
@EnableSpringBootMetricsCollector


By default using the Spring Boot integration exposes metrics on /prometheus

Is it possible to change this? 

Personally I would like to expose this on /metrics

Thanks,

MS
Message has been deleted

udaral...@gmail.com

unread,
May 25, 2017, 6:23:13 AM5/25/17
to Prometheus Users, ma...@sailes.co.uk
HI,

Have below properties in application.properties file.

#change prometheus endpoint to metrics
endpoints.prometheus.id=metrics

#change actuator endpoint to springmetrics
endpoints.metrics.id=springmetrics

endpoints.metrics.sensitive=false
endpoints.metrics.enabled=true

Now /metrics will show prometheus stats and /springmetrics will show actuator stats
Reply all
Reply to author
Forward
0 new messages