com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Monitoring WSO2 Micro Integrator

See the following topics for instructions on monitoring WSO2 Micro Integrator.

Using Prometheus to monitor statistics

Prometheus is an open source toolkit for monitoring systems (using graphs and alerts). It collects statistical data exposed over an HTTP endpoint in the form of multi dimensional time series data. Prometheus can be easily incorporated into existing systems, and it can also be integrated with popular graphical tools such as Grafana (to visualize system behavior). Furthermore, Prometheus has its own querying language (PromQL), and an expression browser to view basic graphical representations of the data.

Step 1: Setting up Prometheus

  1. Download and install Prometheus.
  2. Configuring Prometheus: Open the prometheus.yml file in the downloaded distribution, and add a scrape config as shown below. The port number and the endpoint name should be as specified below.

    scrape_configs:
     - job_name: "esb_stats"
       static_configs:
         - targets: ['localhost:9201']
       metrics_path: "metric-service/metrics"

    Save the configuration file.

Step 2: Starting Prometheus

Open a teminal, navigate to the Prometheus distribution, and execute the server startup script.

Step 3: Starting the Micro Integrator

To use Prometheus, you need to first start the WSO2 Micro Integrator instance by passing the 'enablePrometheusApi' system property. This system property will connect the Micro Integrator to Prometheus, and enable the Micro Integrator to publish statistics to Prometheus.

  • When you run the Micro Integrator on Docker, start your Docker container by passing the 'enablePrometheusApi' system property:

    docker run -p 8290:8290 -e JAVA_OPTS="-DenablePrometheusApi=true" <Docker_Image_Name>
  • When you run the Micro Integrator on a VM, use the following command to enable the 'enablePrometheusApi' system property:

    sh micro-integrator.sh -DenablePrometheusApi

Step 4: Viewing statistics

The stats can be viewed in following urls.

http://localhost:9201/metric-service/metrics

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

http://localhost:9090/graph

Monitoring logs

A properly configured logging system is vital for identifying errors, security threats and usage patterns in your product server. For instructions on monitoring the server logs, see Monitoring Logs in the WSO2 Administration Guide. 

Monitoring HTTP access logs

HTTP Requests/Responses are logged in the access log(s) and are helpful to monitor your application's usage activities, such as the persons who access it, how many hits it receives, what the errors are etc. For more information on access logs, go to HTTP Access Logging in the WSO2 Administration Guide.

Using WSO2 Metrics

JVM Metrics allow you to monitor statistics of all the profiles of WSO2 EI using Java Metrics. For instructions on setting up and using Carbon metrics for monitoring, see Using WSO2 Metrics in the WSO2 Administration Guide.

JMX-based monitoring

For information on monitoring your server using JMX, see JMX-based monitoring in the WSO2 Administration Guide. For information on the various MBeans available for monitoring, see JMX Monitoring.

Monitoring TCP-based messages

You can view and monitor the messages passed along a TCP-based conversation using the TCPMon.  For information on setting up and using TCPMon in your server, see Monitoring TCP-Based Messages in WSO2 Administration Guide. 

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.