Oracle iPlanet Web Proxy Server 4.0.14 Administration Guide

Processing Proxy Server Statistics

A built-in function called stats-xml is used to collect Proxy Server statistics. This function must be enabled to view statistics from the Server Manager or to generate a report using the perfdump function. The stats-xml function is also used to enable profiling, which is a requirement for monitoring statistics through the use of a custom NSAPI function. Enabling statistics and profiling on the server initializes a server function called stats-init in the obj.conf file to begin statistics gathering.

Init profiling="on" fn="stats-init"

This instruction also creates a NameTrans directive that allows you to access statistics from a browser window.

NameTrans fn="assign-name" name="stats-xml" from="(/stats-xml|/stats-xml/.*)

Finally, enabling statistics adds a Service directive to process the stats-xml function when the NameTrans directive is selected

<Object name="stats-xml">

Service fn="stats-xml"

</Object>

Statistics gathering updates an Init function in the obj.conf. Therefore, you must stop and start your server for these changes to take effect.

The following example shows stats-init in the obj.conf file:

Init profiling="on" fn="stats-init" update-interval="5"

You can also designate the following values:

You can retrieve the stats-xml output using the following URL:

http://computer_name:proxyport/stats-xml/proxystats.xml

This request will return an XML page containing the Proxy Server statistics. Some browsers allow you to view the data within the browser window; others require that you save the data to an external file and view it with an external viewer. The usefulness of this information is not fully apparent without the ability to parse the statistics for different views of the data for analysis. The use of third-party tools can assist in this process. Without a parsing tool, the stats-xml output is best observed through the Server Manager or the perfdump SAF.

Restricting Access to the stats-xml Output

You should create an ACL for the /stats-xml URI if you want to limit the users who can view the stats-xml statistics for your server from a browser.

The ACL file must also be referenced in the stats-xml object definition in the obj.conf file. For example, if you created a named ACL for the /stats-xml URI, you would need to reference the ACL file in a PathCheck statement in the object definition as follows:

<Object name="stats-xml">

PathCheck fn="check-acl" acl="stats.acl"

Service fn="stats-xml"

</Object>