Setting up Dashboards to Display SI Statistics¶ This section explains how WSO2 Integrator: SI servers can be configured to publish data to Prometheus and display statistics in Grafana dashboards. Before you begin: Download and install Prometheus. For instructions, see the Prometheus Getting Started Guide. Download Grafana from Grafana Labs - Download Grafana. Configuring Servers¶ In order to configure a Grafana dashboard, follow the steps below: Configure Prometheus reporter in WSO2 Integrator: SI Enable statistics for the Prometheus reporter as follows. To enable statistics for the Prometheus reporter, open the <SI_HOME>/conf/server/deployment.yaml file and set the enabled parameter in the wso2.metrics section to true, and update the other parameters in the section as shown below. You also need to add the metrics.prometheus: as shown. wso2.metrics: # Enable Metrics enabled: true reporting: console: - # The name for the Console Reporter name: Console # Enable Console Reporter enabled: false # Polling Period in seconds. # This is the period for polling metrics from the metric registry and printing in the console pollingPeriod: 2 metrics.prometheus: reporting: prometheus: - name: prometheus enabled: true serverURL: "http://localhost:9005" - To enable statistics for the Prometheus reporter at Siddhi application level, use the @App:statistics annotation in the required Siddhi applications to set the reporter parameter as shown in the example below. @App:name('TestMetrics') @App:statistics(reporter = 'prometheus') define stream TestStream (message string); Start WSO2 Integrator: SI server To start the Streaming runtime, navigate to the <SI_HOME>/bin directory and issue the appropriate command based on your operating system. On macOS/LinuxOn Windows ./server.sh server.bat Start the Prometheus server Start and run the Prometheus server by following the procedure below. Open the <PROMETHEUS_HOME>/prometheus.yml file and add the following configuration in the scrape_configs: section. scrape_configs: - job_name: 'prometheus' static_configs: - targets: ['localhost:9005'] 2. Start the Prometheus server by issuing the following command in the terminal. ./prometheus Start and configure the Grafana server To start and configure the Grafana server, follow the procedure below: Start Grafana. Info The procedure to start Grafana depends on your operating system and the installation process. e.g., If your operating system is macOS and you have installed Grafana via Homebrew, you start Grafana by issuing the brew services start grafana command. Access Grafana via http://localhost:3000/. In the Data Sources section, click Add your first data source. In the Add data source page that appears, click Select for Prometheus. In the Add data source page -> Settings tab, update the configurations for Prometheus as follows. Click Default to make Prometheus the default data source. Under HTTP, enter http://localhost:9090 as the URL. Click Save & Test. If the data source is successfully configured, it is indicated via a message. Load dashboards into Grafana WSO2 Integrator: SI offers pre-built dashboards for monitoring streaming data flows and server statistics. To load them, follow the procedure below: Download the required JSON file (i.e., based on the statistics you need to view) from here. Start Grafana and access it via http://localhost:3000/. To load a new dashboard, click the plus icon (+) in the side panel. Then click Import. In the Import page, click Upload .json file. Then browse and select the .json file of the preconfigured dashboard that you downloaded (i.e., in step 5, substep 1). If required, change the unique identifier displayed in the Unique Identifier (uid). Click Import.