2.1.2 Measurement of Web transactions
When you obtain measurements of HTTP(S) services, PFM - Agent for Service Response enables you not only to measure a single set of a request and a response, but also to define and measure as a Web transaction a series of tasks consisting of multiple sets of an HTTP(S) request and a response. This makes it possible to measure not only Web servers, but also Web applications that require logon. PFM - Agent for Service Response can measure a Web transaction's response times down to thousandths of a second (3 decimal places).
The following figure provides an overview of measurement of a Web transaction.
At startup, PFM - Agent for Service Response's Probe Daemon reads the four files listed below. Measurement results for each measurement condition are output to a report file and then collected by Agent Collector at a specified interval.
-
Probe action condition definition file (esp.conf)
This file defines startup options, such as the maximum number of measurement conditions for a PFM - Agent for Service Response probe and the maximum size of a report file. For details, see 8.2 Probe action condition definition file (esp.conf).
-
Measurement condition registration file (esptask.xml)
This file defines the measurement conditions, such as a target's service type, host name, and measurement interval. You define the measurement conditions in PFM - Web Console (or you can define conditions by editing the measurement condition registration file directly). For details about defining conditions in PFM - Web Console, see 4.7 Defining measurement conditions in PFM - Web Console. For details about measurement condition registration file, see 8.3 Measurement condition registration file (esptask.xml).
-
Web transaction file
This file defines information such as a target Web transaction's access destination URL, Web authentication, and proxy. For details, see 8.5 Web transaction files.
-
Password file (esp.pdb)
This file registers and manages the passwords needed to log on to a target Internet service. For details, see 4.3.1 Registering passwords.
When you measure a Web transaction, PFM - Agent for Service Response issues HTTP(S) requests according to the definition of the Web transaction, and measures data such as response times. The URL to be measured must be defined for each HTML frame. PFM - Agent for Service Response measures transactions by simulating a series of operations using a browser such as Internet Explorer. You can measure performance not only of the entire Web transaction, but also the following specific items:
The measurement result of the entire Web transaction is output as the measurement result. You can define a series of page transitions as scope and the measurement result includes the measurement result of each scope. For details about performance data as measurement results, see Web Transaction (PI_WT) and Web Transaction Overview (PI_WTO) in 10. Records.
You can use Web Recorder to create Web transaction files. An Internet Explorer window is called from Web Recorder, which defines the Web transaction by recording the browser operations (navigations) performed in that window.
- Organization of this subsection
(1) Measurement of performance response for page transitions
You can measure the response performance for page transitions. To do this, you define as a scope a series (or range) of page transitions. You can define a maximum of 8 scopes. One range of page transitions defined as a scope may overlap another range. The following figure shows an example of scope definitions.
In this example, the following measurement items were defined for each scope:
-
Entire transaction
The time required to get to the point of being able to log in, the time that elapsed from display of the login window to getting a list of sent emails, and the time that elapsed from display of the login window to getting a list of received emails.
-
Scope 1
Items such as the time required to get to the login window and log in
-
Scope 2
Items such as the time required to get to the login window and get a list of sent emails
-
Scope 3
Items such as the time required to get a list of sent emails
-
Scope 4
Items such as the time required to get a list of received emails
As demonstrated in this example, you can measure the performance of each type of processing by defining scopes within a single Web transaction.
(2) Response determination
By defining response determination information, you can check the details of the HTML responses acquired from a defined URL and detect abnormalities at the measurement target.
If you want to treat some successful event in the HTTP protocol level as evidence of an error in the Web transaction monitoring, such as when the login window is redisplayed because login has failed, you define the response determination information and then check the details of the response. The following figure shows an example of response determination definitions.
In this example, if the page after transition contains the word Invalid, login is determined to have failed. If this error is detected, measurement of the Web transaction is canceled.
(3) Acquisition of embedded resources
If you define acquisition of an embedded resource, you can acquire the embedded resource automatically during measurement. PFM - Agent for Service Response analyzes the HTML acquired during measurement, and obtains the resource specified by the values of a tag and an attribute name, as listed in the table below. If the response time is to include the acquisition time either for an embedded resource specified by a tag that is not an acquisition target for embedded resources, or for a resource embedded using a programming language such as JavaScript, then you must add the URL of that resource in the Web transaction definition.
Tag name |
Attribute name |
---|---|
applet |
code |
body |
background |
embed |
src |
img |
src |
object |
data |
script |
src |
(4) Support for dynamic session management
When PFM - Agent for Service Response conducts Web transaction monitoring, it can handle the dynamically changing HTTP requests so that PFM - Agent for Service Response can monitor the sites that manage the session using the session IDs.
Take the sites using the Web applications for example. These sites provide the log-in page using the form on the HTML. These sites assign the session IDs to its visitors when they log in to the sites and then identify its visitors by adding the session IDs to the requests.
To monitor these kind of sites, you must add the issued (obtained) session IDs to its requests thereafter.
The following figure shows an example of a site that manages sessions by dynamically issuing session IDs.
Yet, if you send requests with the recorded session IDs by the Web Recorder, the Web server judges the requests to be sent with the invalid session IDs and returns the HTML with error messages such as Invalid Session ID (although error messages appear, the HTTP requests itself do succeed).
To monitor these kind of sites properly, you must obtain the session IDs while you conduct a measurement of Web transactions and issue the requests with the obtained session IDs.
PFM - Agent for Service Response provides the setting of variable strings and substitute strings in order to support the dynamic session management. You specify the location of the string to contain the session IDs as the variable strings. To monitor the sites with the dynamic session management, you must define the Web transaction to output the HTML files. To do so, select the Output the acquired HTML and HTTP header in a file check box on the Web Transaction Info page in the Set Web Transaction Conditions window, or specify the <HTML_OUT> tag and measure the transaction. This is because PFM - Agent for Service Response looks up the session IDs in the output HTML files. As for the substitute string, you specify the location of the session IDs in the obtained HTML files.
Note that the HTTP Cookies generated through the Web transaction measurement issue the requests according to its conditions. If the sites implement the dynamic session management using HTTP Cookies and you do not need to edit the values of the Cookies in order to measure properly, you do not have to define variable strings and substitute strings. If you edit the values of the HTTP Cookies, prepare the commands to generate the substitute string, specify the value of the Cookie as the variable string and specify the commands as the substitute string.
For details about the definitions for supporting dynamic session management, see 4.4.6 Defining settings for the dynamic session management.
(5) Setting of the Character set
You can specify the following character sets for the Web transaction measurement. You specify the character set in the Web transaction file.
-
The character set for the Web transaction file
You specify the character set of the Web transaction file in the XML declaration of the Web transaction file. The specifiable values are Shift_JIS, EUC-JP, ISO-2022-JP, UTF-8, US-ASCII, and GB18030.
You cannot use multiple character sets in a Web transaction file. Define Web transaction files for each character set if you use multiple character sets. If you specify UTF-8, do not add the BOM (Byte Order Mark) in the Web transaction file when editing and saving the file. If the BOM is added, the Web Recorder fails to read the Web transaction file.
-
The character set for the acquired HTML file
You specify the character set of the character set is specified in the <DEFAULT_CHARSET> tag or the <CHARSET> tag of the Web transaction file. The specifiable values are Shift_JIS, EUC-JP, ISO-2022-JP, UTF-8, and GB18030. If the character set for the acquired HTML is US-ASCII, specify Shift_JIS, and you can use ASCII characters when you set response determinations and variable strings.
When you define response determinations and variable strings, specify this character set correctly.
-
The character set for request information (URL, Message body, and Cookie) sent when measuring
You specify the character set for request information in the <REQUEST_CHARSET> tag of the Web transaction file.
The request information is sent using this specified character set, instead of the character set for the Web transaction files and the character set for the acquired HTML file. The specifiable values are Shift_JIS, EUC-JP, ISO-2022-JP, UTF-8, and GB18030. If the character set for request information is US-ASCII, specify none or Shift_JIS. If the value is ISO-2022-JP, do not include multi-byte characters in the URL strings and do not set variable strings.
If all request information (such as URL encoding strings) is defined using ASCII characters, it is not necessary to specify this character set.
The UTF-8 supports only Japanese and Chinese.The GB18030 supports only Chinese.
For details about setting, see 8.5 Web transaction files.
(6) URL encoded
The URL and the message body defined in the Web transaction file are URL encoded when issuing the requests, as listed in the table below.
The substitute strings are replaced with the variable strings through the encoding process described in the above table. If you use the characters such as delimiter (/ or =) in the variable string, you must force these characters to be URL encoded in the URL. In this case, specify the <SUBSTITUTE_FORCE_URLENCODE> tag in the Web transaction file. For details about the <SUBSTITUTE_FORCE_URLENCODE> tag, see 8.5.2 Format and definition of the Web transaction measurement conditions.