Now that we have seen what metrics are exposed and how we can define our own, let's have a look at how we can collect them in a time series database (TSDB). For this purpose, we use Prometheus, a CNCF (https://www.cncf.io/) project that has gained widespread adoption in the cloud-native world.
You can download Prometheus from https://prometheus.io or on macOS via brew install prometheus.
Once Prometheus is downloaded, we need a configuration file that defines which targets to scrape and can then start the server. For our purposes, we will use the following simple file:
.Prometheus configuration for a Thorntail Server, prom.ymlscrape_configs:# Configuration to poll from Thorntail- job_name: 'thorntail' ...