Instrumenting Applications
To enable monitoring of:
-
Applications built with Lightbend technology—Lightbend Telemetry, a commercial offering, will automatically set up metrics for you.
-
Other applications—Lightbend Console can monitor other applications that are available for Prometheus to scrape.
Lightbend Telemetry configuration
Lightbend Telemetry will automatically set up metrics for Akka, Lagom, and Play applications. You can use the Lightbend Telemetry documentation as a guide for your project. Specifically, for Lightbend Console, in the application’s application.conf
file:
-
Lightbend Telemetry should be configured to export Prometheus metrics.
-
The host configuration should listen on
0.0.0.0
.
For example:
cinnamon.prometheus {
exporters += http-server
http-server {
host = "0.0.0.0"
port = 9001
}
}
Other services
To enable Lightbend console to monitor applications not built on the Lightbend platform:
-
Export preconfigured metrics using one of the many available Prometheus exporters.
-
For custom metrics, use one of the Prometheus client libraries.