Events User Manual: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 65: Line 65:


If the link exists and points to an older value, first remove the link and then recreated it.
If the link exists and points to an older value, first remove the link and then recreated it.
Add /opt/events/bin to your PATH:
<pre>
export PATH=/opt/events/bin:${PATH}
</pre>


=Business Scenario Measurement Procedure=
=Business Scenario Measurement Procedure=

Revision as of 08:56, 12 May 2016

Internal

Overview

A HttpEvent contains all the query parameters under a “query” MapProperty.

A HttpEvent contains all the incoming headers under a “incoming-headers” MapProperty.

Concepts

Faults

A fault is a HTTP request that exhibit some sort of problem, which is not serious enough to indicated corrupted data and stop processing. The faults are shown in statistics.

Common fault types:

  • NO_JSESSIONID_COOKIE: the request does not have a JSESSIONID cookie, which means it was sent before authentication and session establishment, or after the session was closed. These requests are reported in summary statistics and usually ignored.
  • NO_REQUEST_DURATION_INFO: No request duration information was found in the input data stream. This fault indicates a potentially serious condition, as it won't be possible to calculate request and business scenario durations. A common cause is omitting to set in the WildFly configuration.
  • NO_OPEN_BUSINESS_SCENARIO: these faults are generated by the request arriving "between" scenarios. This is a normal condition and they should be usually ignored.

More details:

https://github.com/NovaOrdis/events/blob/master/src/main/java/io/novaordis/events/extensions/bscenarios/BusinessScenarioFaultType.java

Business Scenarios

Business Scenario

events extracts business scenario statistics and can identify business scenarios in one of these states:

  • NORMAL: the scenario has been closed normally by a STOP marker and contains valid data.
  • INCOMPLETE: we ran out of event data while the scenario was in an OPEN state, usually because we reached the end of the log file, without encountering a STOP marker. This happens when the log generator stops abruptly in the middle of an iteration.
  • CLOSED_BY_START_MARKER: we did not encounter the STOP marker, but we did encounter a START marker of a new scenario for the same session.

More details:

https://github.com/NovaOrdis/events/blob/master/src/main/java/io/novaordis/events/extensions/bscenarios/BusinessScenarioState.java

Installation

Download the latest binary release from:


https://github.com/NovaOrdis/events/tree/master/releases

Unzip the binary release file into the directory where third party tools are usually installed on your system (/usr/local, /opt, etc.). Extraction will create a events-<version> directory.

Link to the newly created directory as "events" Assuming the extraction directory was /opt:

cd /opt
ln -s events-<version> events

where "<version>" should be replaced with the actual value.

If the link exists and points to an older value, first remove the link and then recreated it.

Add /opt/events/bin to your PATH:

export PATH=/opt/events/bin:${PATH}

Business Scenario Measurement Procedure

Record the Load Scenarios

Record interaction with a load generator. This example was based on NeoLoad.

Mark the start of the target business scenarios.

Design -> Virtual User Profiles -> Style Reader -> Actions -> Style - Seasons - Style - Style Sample - Style Gallery -> First Page -> First request in the page -> Advanced -> Request headers:

Add a new header: "Business-Scenario-Start-Marker" (the exact name is available in BusinessScenario.java). The value of the header should be business scenario type.

Mark the end of the target business scenarios.

Design -> Virtual User Profiles -> Style Reader -> Actions -> Style - Seasons - Style - Style Sample - Style Gallery -> RequestHandler_16 -> First request in page -> Advanced -> Request headers:

Add a new header: "Business-Scenario-Start-Marker" (the exact name is available in BusinessScenario.java). Do Not use an empty value - NeoLoad does not send that or the undertow logging does not log it. Use the same string used to mark the scenario start (the business scenario type).

Save.

Prepare the Target Environment

Configure the Access Log Output

This is necessary to be done once.

Stop the server.

cd /c/ovidiu/bin
./environment.sh stop

Update the application server configuration file <access-log> section (if you copy and paste, open this in edit mode to correctly copy quots):

       ...
       <subsystem xmlns="urn:jboss:domain:undertow:1.1">
            ...
            <server name="default-server" >
                ...
                <host name="default-host" alias="localhost">
                    ...
                    <access-log pattern=""%I" %h %u [%t] "%r" "%q" %s %b %D %{i,Business-Scenario-Start-Marker} %{i,Business-Scenario-Stop-Marker} %{c,JSESSIONID}"/>
                    ...
                </host>
            </server>
      </subsystem>
      ...

Start the Environment

On the target environment, reset the application server node:

cd /c/ovidiu/bin
./environment.sh start

The start script will also clean the previous logs.

Run the Test

Shut Down and Collect Data

cd /c/ovidiu/bin
./environment.sh stop

All log data is collected and zipped under /c/ovidiu/data/load-data-yy-mm-dd-hh-mm-ss...zip

Download the test data locally via the QLB-APP02-Redirected-Folder on NOMBP2.

Unzip it in its own separated directory.

The data export script keeps the access log as “access_log.log” and places the definition of the access log fields in access_log.def.

Data Processing

Do initial parsing:

events < ./access_log.log --input-format-file=./access_log.def 

events < ./access_log.log --input-format-file=./access_log.def  describe

Extract per-scenario statistics:

events < ./access_log.log --input-format-file=./access_log.def business-scenario > business-scenarios.csv

Scatter plot the results.