This page describes the steps to install setup a Prometheus monitoring server in your MediationZone deployment. The following instructions detail how to set up the JMX exporter on your Platform, enabling Prometheus to scrape metrics from the Platformto obtain metrics data from your deployment.
Prerequisites
The following must be completed before setting up Prometheus:
Download and install the version latest LTS release of Prometheus compatible with your bare metal setup. You can download Prometheus for your operating system from Download | Prometheus.
Note |
---|
Note! For more information on persistence, refer to Prometheus’s official documentation. There are several alternatives available. |
Configuring JMX Exporter for Platform
Downloading Prometheus
...
Extract the binaries. Please refer to Prometheus docs for details.
Setup with example Prometheus configuration file
Go to the extracted Prometheus directory
Code Block cd prometheus-*
Create a yaml file named
prometheus_mz.yaml
as follows.Code Block # my global config global: scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. # scrape_timeout is set to the global default (10s). # A scrape configuration containing exactly one endpoint to scrape: # Here it's Prometheus itself. scrape_configs: # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config. #- job_name: 'prometheus' # # metrics_path defaults to '/metrics' # # scheme defaults to 'http'. # static_configs: # - targets: ['localhost:9090'] - job_name: 'mz' static_configs: - targets: ['localhost:8888'] # port defined in the topo STR config labels: pico: 'platform' - targets: ['localhost:9090'] # port defined in the topo STR config labels: pico: 'ec1'
Configuring JMX exporter for Platform
...
server
To enable Prometheus to scrape metrics from your Platform, you need to configure the JMX exporter. This The JMX exporter will expose and export all the metrics from your Platform, allowing Prometheus server to collect them.
...
You will need to install Helm3 first before installing Prometheus following the examples listed below. If you already have helm installed from when you installed , then you can skip this step.
Configuring JMX exporter for Platform
You can enable the JMX exporter for your Platform. If you want Prometheus to scrape the metrics from Platform, you should configure the JMX exporter, as it exposes and exports all the metrics in your Platform for the Prometheus server to pick up.
...