Hitachi

JP1 Version 11 JP1/Performance Management - Agent Option for Service Response Description, User's Guide and Reference


4.4.6 Defining settings for the dynamic session management

PFM - Agent for Service Response provides the settings of the variable strings and the substitute strings to support the dynamic session management. If you use the variable strings and substitute strings, PFM - Agent for Service Response replaces the variable string part of the HTTP request with the substitute string and issues the replaced HTTP request while measuring. Note the following when you specify the HTTP Cookie as the variable string.

The following explains how to specify the variable strings and the substitute strings.

Organization of this subsection

(1) Setting variable strings

You specify as the variable strings the character string to change dynamically in the URL, message body, or HTTP Cookie in the step.

If you use the Web Recorder to create a new Web transaction file and record the operations in the site with the dynamic session management, the used session ID when recording is defined in the Web transaction file.

Specify either of the following in the variable string.

(2) Setting substitute strings

A substitute string is a character string to replace the variable string in the HTTP request with when issuing the HTTP request. The substitute string can be acquired by either of the following procedures.

The definition of the substitute string is different according to the source of the substitute string.

(a) Acquiring substitute strings from HTML files

The following information are required to define substitute strings:

  1. The step ID of the step from which PFM - Agent for Service Response acquires the HTML file containing the substitute strings.

  2. The location of the substitute string (the element names, the attributes, or the contents).

  3. The information to specify which part of the element, attribute, or the content specified in the above information 2 contains the substitute string (attributes or contents).

Note:

The following notes are on acquiring the substitute strings from HTML files:

  • The range of the element is between its start tag and the next occurrence of the start tag of the same element (<element name>) or between its start tag and its end tag (</element name>) unless the specified element is an empty element (<element name.../>).

  • If PFM - Agent for Service Response cannot find the HTML file containing the substitute string (i.e. you specified the step ID where PFM - Agent for Service Response does not acquire the HTML file), PFM - Agent for Service Response sends the HTTP request as it is, not changing the variable string part of the HTTP request.

  • If PFM - Agent for Service Response cannot find the element containing the substitute string, PFM - Agent for Service Response replaces the variable string with the null string and sends the HTTP request.

  • PFM - Agent for Service Response does not acquire the substitute string from the compressed HTML file.

(b) Acquiring the substitute strings from HTML headers

The following information are required to define substitute strings:

  1. The Step ID of the step to acquire the HTTP headers containing the substitute strings.

  2. Information to identify the HTTP headers containing the substitute strings (header name or part of values).

Note:

The following notes are on acquiring the substitute strings from the HTTP headers:

  • If there are multiple HTTP headers matching the specified information to identify the HTTP header containing the substitute string, PFM - Agent for Service Response acquire the substitute string from the HTTP header to be received earlier.

  • If PFM - Agent for Service Response does not find the HTTP header containing the substitute string, PFM - Agent for Service Response replaces the variable string with the null string and sends the HTTP request.

(c) Acquiring the substitute strings from commands

The following information are required to define substitute strings:

  1. The name of the substitution-sting generation command

  2. The arguments given to the command

Important

The following notes are on acquiring the substitute strings from commands:

  • In put to the commands

    You can specify arguments as an interface to give the values to the command. If the arguments are fixed, you can specify the command name to include the argument when you specify the above information 1. If the arguments change dynamically, you can acquire the arguments of the command from the content of the HTML or the HTTP header obtained before this step.

    The arguments specified as the above information 2 must be surrounded by the double quotes (") and when PFM - Agent for Service Response execute it PFM - Agent for Service Response inserts the arguments after the command in the specified order.

    Note that the PFM - Agent for Service Response does not provide to the commands an interface to the standard input.

  • Output from the commands

    The commands must output the character strings as the substitute strings in the standard output. The output character string must not be longer than 10,000 bytes, because in that case PFM - Agent for Service Response may not successfully terminate the command. The output character string that is removed linefeed characters (1 or greater) in the end is the substitute string.

  • Return codes of the commands

    If the return codes of the commands (exit status) are other than 0, the commands are judged to be a failure. In this case, PFM - Agent for Service Response replaces the variable string with null characters and issues the HTTP request. If the commands output the substitute strings to the standard output correctly, the return codes must be 0.

  • The commands are executed whenever the substitute strings are required.

  • The commands are executed by the account of the Extensible Service Probe service.

  • If an error occurs when executing the commands, PFM - Agent for Service Response replaces the variable string with null characters and issues the HTTP request.