Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 3

Table of Contents
maxLevel2
minLevel2

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. 

...

Tip
iconfalse
titleBefore 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.

    Info

    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.
    Image RemovedImage Added

  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.
      Image RemovedImage Added
    2. Let's add localhost as the host and 9443 as the HTTPS port. 

      Info

      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 WorkerNode to proceed. As a result, the OVERVIEW page opens as follows.
      Image Removed , the following is displayed.
      Image Added
      To monitor a worker node (which we will run later on localhost:9443), click Worker.
      Image Added
      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.

    Info

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


    • For Windows: dashboardworker.bat

    • For Linux: sh dashboardworker.sh
       

    Now, if you refresh the OVERVIEW page of the Monitoring Dashboard, an active worker is displayed as follows.
    Image RemovedImage Added
  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.

    Info

    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.