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
- Download and install Prometheus.
<PROMETHEUS_HOME>/prometheus.ymlfile. Add a scrape config as to this file as shown below. The port number and the endpoint name should be as specified below.
- Save the configuration file.
- 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:
- For Linux :
The stats can be viewed in following urls.
You may also visit following url in Prometheus server to plot the graphs.