From 1b62a05c4022d15b3105bd31749fd7eb08af8d4a Mon Sep 17 00:00:00 2001 From: Madhura Bhave Date: Thu, 8 Aug 2019 15:09:48 -0700 Subject: [PATCH] Document Prometheus Pushgateway support Closes gh-16853 --- .../asciidoc/production-ready-features.adoc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index 0131c67c7d3..117c4267620 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -1683,6 +1683,24 @@ Here is an example `scrape_config` to add to `prometheus.yml`: - targets: ['HOST:PORT'] ---- +For ephemeral or batch jobs which may not exist long enough to be scraped, +https://github.com/prometheus/pushgateway[Prometheus Pushgateway] support can be used to +expose their metrics to Prometheus. To enable Prometheus Pushgateway support, add the following +dependency to your project: + +[source,xml,indent=0] +---- + + io.prometheus + simpleclient_pushgateway + +---- + +When the Prometheus Pushgateway dependency is present on the classpath, Spring Boot auto-configures +a `PrometheusPushGatewayManager` bean. This manages the pushing of metrics to a Prometheus Pushgateway. +The `PrometheusPushGatewayManager` can be tuned using properties under `management.metrics.export.prometheus.pushgateway`. +For advanced configuration, you can also provide your own `PrometheusPushGatewayManager` bean. + [[production-ready-metrics-export-signalfx]]