Prometheus can show you standard metrics from your hosts and your cluster, such as CPU, memory and disk usage. However, it becomes more useful if you also instrument your code with the Prometheus client libraries, to expose application-specific metrics that you care about. For example if you have a queue in your application you might care about queue depth. This is known as “whiteboxy” monitoring.

Prometheus contains a number of client libraries that you can use to do this. You must choose the Prometheus client library that your application is written in. And using the client libraries you can define and expose internal metrics via an HTTP endpoint on your application’s instance.

Follow the instructions in the Prometheus documentation for more information on how to instrument your code.

Further Reading