Consuming metrics with Prometheus
After the server has been configured to publish its metrics, you can configure Prometheus to consume them.
The basic process is to update the server’s prometheus.yml file to add a job element to the scrape_configs section for the server from which the metrics should be retrieved, as in the following example:
- job_name: "ds.example.com:8443"
metrics_path: "/metrics"
scheme: "https"
tls_config:
ca_file: ds.example.com-ca-certificate.pem
static_configs:
- targets: ["ds.example.com:8443"]
See the Prometheus documentation for complete details.