All docs This doc
Skip to end of metadata
Go to start of metadata

Prometheus is an open source toolkit that can monitor systems and produce useful information such as graphs and alerts. It collects statistical data exposed over an HTTP endpoint in the form of multi dimensional time series data, which can be then be visualized and queried. For more information about Prometheus, see Prometheus Documentation.


The HTTP endpoint exposing the metric data is a service exposed by an internal API, bundled as an OSGi component and added as a feature to the WSO2 EI product. WSO2 ESB exposes its statistical data through JMX as MBeans. The Prometheus publisher in WSO2 EI scrapes these bean data, and converts them to the Prometheus format. The converted metrics are then exposed through an HTTP endpoint, which is used by Prometheus to scrape the statistical data.

Configuring the Prometheus server

  1. Download and install Prometheus.
  2. Open the <PROMETHEUS_HOME>/prometheus.yml file. Add a scrape config as to this file as shown below. The port number and the endpoint name should be as specified below.

     - job_name: "esb_stats"
         - targets: ['localhost:9191']
       metrics_path: "metric-service/metrics"
  3. Save the configuration file.
  4. To start the Prometheus server, navigate to the  <PROMETHEUS_HOME> and execute the start-up script located there.

Starting the ESB server

 To start the ESB server with Prometheus enabled, navigate to the <EI_HOME>/bin directory and issue one of the following commands.

  • For Windows: integrator.bat -DenablePrometheusApi
  • For Linux : ./ -DenablePrometheusApi

Viewing statistics

The stats can be viewed in following urls.


You may also visit following url in Prometheus server to plot the graphs.

  • No labels