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

Visualizing Results in the Analytics Dashboard

Note that this dashboard is not supported with IBM JDK.

Analytics dashboard application is the data visualization component of WSO2 Complex Event Processor. You can create dashboards and real time gadgets event streams. A gadget displays the real-time information processed by WSO2 CEP in a selected format. A dashboard serves as a container for a collection of gadgets organized in a selected layout. The following diagram summarizes how to set up the Analytics Dashboard for WSO2 CEP as per your requirement.

Instructions to set up a dashboard are covered in the following steps.

Prerequisites

The following table specifies the prerequisites for viewing information in a gadget depending on the service provider selected for it.

Service ProviderPrerequisites
Relational Database Source
  • A relational database with at least one table that has data should exist.
  • The appropriate JDBC driver should be downloaded and saved in the <DAS_HOME>/repository/conf/lib directory.
Realtime Data Source
  • A real-time event stream should exist in order to get the real-time events based on which information is displayed in the gadget. To define an event stream, see Understanding Event Streams.
  • A UI publisher should exist in order to publish events from the real-time event stream to the Analytics Dashboard. To define a UI Publisher, see UI Event Publisher.
REST Data SourceAn accessible REST endpoint should exist.

Step 1: Log into the Analytics Dashboard

Follow the procedure below to log into the Analytics Dashboard.

  1. Access the WSO2 CEP Analytics Dashboard using the following URL. 
    https://<HOST_NAME>:<PORT>/portal/dashboard
  2. Enter your username and password, and click Login.
     

You can deploy a dashboard and/or its components (e.g. layouts, gadgets, and widgets) in the Analytics Dashboard of WSO2 CEP by bundling them as artifacts of a Carbon Application (cApp). For instructions on deploying cApps in WSO2 CEP, see Packaging Artifacts as C-App Archive.

Step 2: Create required gadgets

Follow the procedure below to create a gadget to display information processed by WSO2 CEP as required.

  1. In the Anaytics Dashboard, click the menu icon and then click Gadgets to open the Gadgets page as demonstrated below
  2. Click GENERATE GADGET to open the Generate a Gadget wizard.
  3. Enter information as follows to configure a gadget.

    1. In the Select Provider field, select the relevant service provider based on the source from which data should be taken to update the gadget. The source of each provider type is given in the table below. Then click Next. In this example, Realtime Data Source is selected to publish data updated in a real-time event stream. Then click Next.

       

       

      ProviderSource of Data Published in Gadget
      Relational Database SourceA datasource that can connect to an RDBMS database.
      Real-time Data Source

      Real-time events received in event streams.

      Here, the events are directly obtained from the backend. In order to do this, a UI event publisher should be defined and connected to the event stream that receives the events.

      REST DatasourceA REST endpoint

       

       

    2. In the Event Stream field, select the event stream from which the events to be published are derived. In this example, a stream named org.wso2.event.sensor.filtered.stream:1.0.0 is selected. Click Next.
    3. Configure a chart as follows.

      Parameter NameDescriptionExample
      Gadget NameThe text to be displayed as the name of the gadget.Sensor Value VS Timestamp
      Select Chart TypeThe type of chart that you want the gadget to display.Line Chart
      X-AxisSelect the attribute for the X axis of the line chart.TIMESTAMP
      X typeThe data type of the item represented on the X axis.time
      Y-AxisSelect the attribute for the Y axis of the line chart.sensorValue
      Y typeThe data type of the item represented on the Y axis.default
      Color domainThe points mapped on the line chart will be differentiated using colour based on the value of the attribute selected for this parameter.sensorName
      Max lengthThe maximum length of the chart in terms of the number of records displayed at a given time.30
    4. Click Preview and then simulate a few events to see the preview of the gadget in the lower section of the page.

      In this example, the event stream used receives events via an HTTP receiver. Three events were simulated by issuing the following cURL commands.

      curl -X POST -d "{ "event": { "metaData": { "timestamp":1439467524120 , "isPowerSaverEnabled": false, "sensorId": 701, "sensorName": temperature }, "correlationData": { "longitude": 4.504343, "latitude": 20.44345 }, "payloadData": { "humidity": 2.3, "sensorValue": 120 } } }" http://localhost:9763/endpoints/httpReceiver --header "Content-Type:application/json"

       

      curl -X POST -d "{ "event": { "metaData": { "timestamp":1439467524120 , "isPowerSaverEnabled": false, "sensorId": 701, "sensorName": temperature }, "correlationData": { "longitude": 4.504343, "latitude": 20.44345 }, "payloadData": { "humidity": 2.3, "sensorValue": 163 } } }" http://localhost:9763/endpoints/httpReceiver --header "Content-Type:application/json"
       

      curl -X POST -d "{ "event": { "metaData": { "timestamp":1439467524120 , "isPowerSaverEnabled": false, "sensorId": 701, "sensorName": temperature }, "correlationData": { "longitude": 4.504343, "latitude": 20.44345 }, "payloadData": { "humidity": 2.3, "sensorValue": 187 } } }" http://localhost:9763/endpoints/httpReceiver --header "Content-Type:application/json"


    5. Click Add to Store to save the gadget configuration, and then click Go to Portal. the Dashboards page appears again.
  • Once a gadget is created and saved, its configuration is saved in JSON format in the <CEP_HOME>/repository/deployment/server/jaggeryapps/portal/store/<Tenant_Name>/fs/gadget directory.
  • For more detailed information about creating and customising gadgets, see WSO2 Dashboard Server Documentation - Gadget Author Guide.

 

Step 3: Create a new dashboard

Follow the procedure below to add a new dashboard to the Analytics Dashboard.

  1. Log into the Analytics Dashboard if you are not already logged in. For detailed instructions, see Logging into the Analytics Dashboard. If there are any existing dashboards, they are displayed as shown in the example below.
  2. Click CREATE DASHBOARD in the top navigator to open the CREATE A DASHBOARD page. 
  3. Enter information as follows.
    1. Enter a name and a description for the dashboard. In this example, the name and the description is entered as follows.

      ParameterValue
      Name of your DashboardSensor Statistics
      DescriptionThis dashboard indicates the sensor value at different times in a particular location.
    2. Select a layout based on how you want the gadgets to be organized on your dashboard. In this example, the Single Column layout is selected. A message appears to indicate that the dashboard is successfully created.

    3. Click the icon for gadgets. Drag and drop a gadget displayed into the required column of your dashboard. In this example, the Sensor Value VS Timestamp gadget that was created in Step 2: Create required gadgets is added to the dashboard.

      Once information is entered as described above, the Dashboard saved successfully message appears. The new dashboard can be viewed in the Dashboards page.

  • Once a dashboard is created and saved, its configuration is saved in JSON format in the registry. This can be accessed via the  /_system/config/ues/dashboards/<Dashboard_Name> registry path. For more information about the registry, see Registry.
  • For more detailed information about creating and customising dashboards, see WSO2 Dashboard Server Documentation - Editor Guide.

Step 4: View information

Follow the procedure below to view information in a dashboard in the WSO2 CEP Analytics Dashboard.

  1. Access the WSO2 CEP Analytics Dashboard using the following URL., and log in using your credentials.
    https://<HOST_NAME>:<PORT>/portal/dashboard 
  2. Click View on the required dashboard. In this example, the dashboard created in Step 3: Create a new dashboard is selected.
  3. Simulate some data for the event stream connected to your gadget.

    In this example, the following cURL commands are issued.

    curl -X POST -d "{ "event": { "metaData": { "timestamp":1439467524120 , "isPowerSaverEnabled": false, "sensorId": 701, "sensorName": humidity }, "correlationData": { "longitude": 4.504343, "latitude": 20.44345 }, "payloadData": { "humidity": 2.3, "sensorValue": 138 } } }" http://localhost:9763/endpoints/httpReceiver --header "Content-Type:application/json"
     

    curl -X POST -d "{ "event": { "metaData": { "timestamp":1439467524121 , "isPowerSaverEnabled": false, "sensorId": 701, "sensorName": temperature }, "correlationData": { "longitude": 4.504343, "latitude": 20.44345 }, "payloadData": { "humidity": 2.4, "sensorValue": 144 } } }" http://localhost:9763/endpoints/httpReceiver --header "Content-Type:application/json"
     

    curl -X POST -d "{ "event": { "metaData": { "timestamp":1439467524125 , "isPowerSaverEnabled": false, "sensorId": 701, "sensorName": humidity }, "correlationData": { "longitude": 4.504343, "latitude": 20.44345 }, "payloadData": { "humidity": 2.7, "sensorValue": 145 } } }" http://localhost:9763/endpoints/httpReceiver --header "Content-Type:application/json"
     

    curl -X POST -d "{ "event": { "metaData": { "timestamp":1439467524131 , "isPowerSaverEnabled": false, "sensorId": 701, "sensorName": temperature }, "correlationData": { "longitude": 4.504343, "latitude": 20.44345 }, "payloadData": { "humidity": 2.3, "sensorValue": 156 } } }" http://localhost:9763/endpoints/httpReceiver --header "Content-Type:application/json"
     

    curl -X POST -d "{ "event": { "metaData": { "timestamp":1439467524135 , "isPowerSaverEnabled": false, "sensorId": 701, "sensorName": temperature }, "correlationData": { "longitude": 4.504343, "latitude": 20.44345 }, "payloadData": { "humidity": 2.3, "sensorValue": 165 } } }" http://localhost:9763/endpoints/httpReceiver --header "Content-Type:application/json"

    curl -X POST -d "{ "event": { "metaData": { "timestamp":1439467524140 , "isPowerSaverEnabled": false, "sensorId": 701, "sensorName": humidity }, "correlationData": { "longitude": 4.504343, "latitude": 20.44345 }, "payloadData": { "humidity": 2.9, "sensorValue": 170 } } }" http://localhost:9763/endpoints/httpReceiver --header "Content-Type:application/json"

     

    curl -X POST -d "{ "event": { "metaData": { "timestamp":1439467524150 , "isPowerSaverEnabled": false, "sensorId": 701, "sensorName": temperature }, "correlationData": { "longitude": 4.504343, "latitude": 20.44345 }, "payloadData": { "humidity": 2.3, "sensorValue": 168 } } }" http://localhost:9763/endpoints/httpReceiver --header "Content-Type:application/json"

     

    The dashboard is updated as follows.


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