This documentation is for WSO2 Complex Event Processor 4.0.0. View documentation for the latest release.
WSO2 Complex Event Processor is succeeded by WSO2 Stream Processor. To view the latest documentation for WSO2 SP, see WSO2 Stream Processor Documentation.
||
Skip to end of metadata
Go to start of metadata

Event Statistics is an important feature which helps monitoring purposes of events. This presents realtime requests and responses vs time for all the incoming and outgoing Topics of the CEP/DAS. You can use this visualization to get an idea about system throughput, input frequency and to check whether the inputs are received or outputs are published. By default, event statistics are disabled in the CEP/DAS to avoid over-head of unnecessary processing of events.

Enabling/Disabling Event Statistics 

Even though  the Event Statistics feature is enabled in the product, it is not activated by itself.  You need to activate event  statistics for each and every configuration that you want since monitoring event statistics takes a considerable amount of processing overhead. Change the <StatisticsReporterDisabled> property  to false in the <PRODUCT_HOME>/repository/conf/carbon.xml file, to enable event statistics tracing in the product server.   

You can enable or disable event statistics for event receivers and event publishers. For an example, follow the steps below to enable event statistics tracing on a event publisher.

Any change in the event statistics status (enable or disable) leads to a redeployment of the necessary configuration. 

  1. Log in to the product management console using admin/admin credentials.
  2. Click Main, and then click Publishers.
  3. Click the Enable Statistics option of the corresponding publisher, on which you want to enable tracing as shown below.
    enable statistics tracing

Monitoring Event Statistics

There are two ways to monitor event statistics:

  1. Using the WSO2 CEP management console
  2. Using JConsole

Both of the above ways provide the same statistics with one exception; which is that JConsole expose statistics belonging only to the super tenant. It does not expose statistics belonging to other tenants.

If you use the CEP management console, it will allow you to view statistics belonging to the currently logged in tenant.

Monitoring Event Statistics using the Management Console

Follow the instructions below to access Event Statistics through the management console.

  1. Log in to the product management console using admin/admin credentials.
  2. Click Monitor, and then click Event Statistics.
    If you enabled event statistics for all the configurations (event receivers and event publishers), then you view a window like below.
    statistics of all configurations
    If you send events to the product, then you can get the details of actual statistics details. Then, you view a similar window as shown in the example below.

    statistics of a specific event publisher

    You can further analyse statistics regarding the requests and responses in each configuration in real time as shown above.

Monitoring Event Statistics using JConsole
  1. Open <PRODUCT_HOME>/repository/conf/carbon.xml file on a text editor.
  2. Add the following element as a child of <Server> element.

    <EventStat>
            <Observers>org.wso2.carbon.event.statistics.internal.jmx.JMXObserver</Observers>
    </EventStat>

    As a result of adding the above element, at the server start-time, an instance of JMXObserver will be registered as an event statistics observer. This observer will be periodically (every 5 seconds) updated on event statistics. Upon receiving an update, Event Statistic MBeans (which can be viewed on the JConsole) will be updated.

  3. Start WSO2 CEP server.
  4. Start JConsole to monitor above CEP server process. Refer JMX-Based Monitoring to learn how to start JConsole to monitor WSO2 CEP.
  5. Click MBeans tab on the JConsole window. Then expand the domain ‘org.wso2.carbon.event’.
  6. Now you can select MBeans as you wish, to view statistics.

    For example:

    - Selecting the MBean ‘-1234’ will show the stats for all the elements for which stats have being enabled, such as publishers, receivers and execution plans.

    - Selecting the MBean ‘-1234.Event Publisher.TestLogger’ will show the stats for the Event Publisher with name ‘TestLogger’.
  • No labels