This documentation is for WSO2 Stream Processor 4.4.0 (the latest version of WSO2 SP. View documentation for the Streaming Integrator, the successor of WSO2 SP.

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

Introduction

In previous tutorials, you learnt different Siddhi concepts and created many Siddhi applications to try them out. However, those Siddhi applications were created in the Stream Processor Studio and they were not deployed in a production environment. 

In this tutorial, let's consider a scenario where your Siddhi applications are deployed in a production environment, and in a worker profile. The node is configured to execute Siddhi applications, and it does not have a UI (User Interface). 

The staff at the Sweet Factory need to check whether the SP nodes in which their Siddhi applications are deployed are working as expected, or whether any Siddhi application requires performance improvements. They need a user-friendly UI in order to monitor this. For this purpose, you can use the Monitoring Dashboard of WSO2 SP.

This tutorial covers how to use the Monitoring Dashboard.

Before you begin:

  • Before you try out this tutorial, the worker node needs to be configured. For detailed instructions, see Monitoring Stream Processor - Prerequisites.
  • This tutorial uses the SweetTotalApp Siddhi application that you created in Tutorial 1 and updated in Tutorial 2. Therefore, it is recommended that you complete those tutorials before following this tutorial.

Tutorial steps

Let's get started!

  1. Let's start the dashboard profile of WSO2 Stream Processor by issuing one of the following commands from the <SP_HOME>/bin directory.
    • For Windows: dashboard.bat

    • For Linux: sh dashboard.sh

  2. To access the Monitoring Dashboard, you can use the following URL.
    https://localhost:9643/monitoring 

    You can login to the dashboard by specifying admin as both the username and the password.

    Here, we are using the credentials available by default to access the dashboard. If you are using a different user, make sure that it is granted the relevant permissions to add/delete workers from the dashboard. For more details, see User Management via the IdP Client Interface.

    The following is displayed once you login.

  3. Let's add a worker to view statistics for it. To do this, follow the substeps below.
    1. Click Add New. This opens the following page.
    2. Let's add localhost as the host and 9443 as the HTTPS port. 

      These are the default host and port of a single node. If the worker node is not run in the same computer as the dashboard node or if it is run on a different port, change these values accordingly.

      Click Add Node to proceed. As a result, the following is displayed.

      To monitor a worker node (which we will run later on localhost:9443), click Worker.

      The dashboard indicates that there is no worker running at the host and port you specified because you have not started a worker node yet.

  4. To view an active worker, let's start a worker node by issuing one of the following commands from  the <SP_HOME>/bin directory.

    In this tutorial, you can run the worker and the dashboard in the same computer for simplicity.


    • For Windows: worker.bat

    • For Linux: sh worker.sh
       

    Now, if you refresh the OVERVIEW page of the Monitoring Dashboard, an active worker is displayed as follows.
  5. To view more information about the worker node, let's click on it. This opens a page named localhost:9443, displaying information specific to the worker node you started as shown below.

    Ths information is displayed in this page after a time period of about 30 seconds after opening it.



     Note that no information is currently displayed under Overall Throughput (events/second) and Siddhi Applications. This is because no Siddhi applications are deployed in this worker.

  6. Let's deploy and run a Siddhi application in the worker. For this purpose, you can use the SweetTotalApp that you created in Tutorial 1 and updated in Tutorial 2.

     You can deploy the Siddhi application by copying the SweetTotalApp.siddhi file from the <SP_HOME>/wso2/editor/deployment/workspace directory and pasting it in the <SP_HOME>/wso2/worker/deployment/siddhi-files directory.
  7. To view the Siddhi application you deployed, let's refresh the localhost:9443 page. The SweetTotalsApp Siddhi application is displayed in the Siddhi Applications section as follows.
  8. To view information specific to the Siddhi application, click on it. This opens a page named localhost:9443 > SweetTotalApp as shown below.

     
  9. Metrics are not enabled for Siddhi applications by default. Let's enable metrics for the SweetTotalApp Siddhi application by clicking the Metrics switch. This displays available information relating to the latency, overall throughput and memory used, as well as available statistics for the Siddhi application as shown below.
  • No labels