01.01.2013 Views

Web Gateway 7.1.5 Product Guide - McAfee

Web Gateway 7.1.5 Product Guide - McAfee

Web Gateway 7.1.5 Product Guide - McAfee

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8<br />

Monitoring<br />

Performance measurement<br />

Using properties in rules to log performance information<br />

You can insert the properties that are available on the appliance for logging performance information<br />

into logging rules that write log lines into log files.<br />

The properties for logging performance information make this information available with regard to the<br />

processing of individual requests. When a request is received on the appliance, particular activities are<br />

completed to process it, which are together considered as one transaction.<br />

An Access Log exists by default on the appliance with log files into which a log line is written whenever<br />

a transaction has been completed for a request. This log is an appropriate location for recording<br />

performance information.<br />

Writing log lines into the log files of the Access Log is handled by a logging rule. This rule uses one<br />

event to create a log file entry and another to write this entry as a log line into a log file.<br />

A log entry is composed of several elements, each of which adds a particular piece of information, for<br />

example, the date and time when a request was received on the appliance. By inserting an element<br />

providing performance information into the entry you can let this information be recorded.<br />

The event that creates a log entry for the Access Log begins as follows:<br />

Set User-Defined.logLine = DateTime.To<strong>Web</strong>ReporterString + “”” ...<br />

Date and time for a request is recorded by the DateTime.To<strong>Web</strong>ReporterString + “”” element. More<br />

elements providing other information follow this element.<br />

To record performance information about, for example, the processing time consumed for DNS lookups<br />

you need to add the following element:<br />

+ Number.ToString (Timer.ResolveHostNameViaDNS) + “””<br />

Since the log line is a string, the numerical value for the processing time must be converted to string<br />

format before it can be recorded. This is done by the Number.ToString property, which takes the<br />

Timer.ResolveHostNameViaDNS property as a parameter.<br />

For more information on working with log entries, see Sample logging rule and Create a sample logging<br />

rule.<br />

Events for measuring performance in rule set processing<br />

You can measure the time the rule engine consumes for processing individual rule sets. Several events<br />

to be used in appropriate rules are available for this purpose.<br />

The reason for measuring this time could be that you want to know whether performance is improved<br />

or reduced after you have applied changes to the rule set.<br />

The events for measuring rule set processing performance control an internal watch on the appliance.<br />

The following events are available:<br />

• Stopwatch.Start (String) — Starts the internal watch<br />

• Stopwatch.Stop (String) — Stops the internal watch<br />

• Stopwatch.Reset (String) — Resets the internal watch<br />

The string parameter that each of these events takes can be used to identify the event. For example, if<br />

you use these events to record processing time for the URL Filtering rule set, you can assign<br />

URLFiltering as a value to this string.<br />

298 <strong>McAfee</strong> <strong>Web</strong> <strong>Gateway</strong> <strong>7.1.5</strong> <strong>Product</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!