Logging HTTP transactions has associated costs. The Access Gateway is capable of handling thousands of transactions per second. If transaction volume is high and each log entry consumes a few hundred bytes, the Access Gateway can fill up the available disk space in a matter of minutes. HTTP logging also increases system overhead, which causes some degradation in performance. By default, the logging of HTTP transactions is turned off. Before enabling logging, you need to determine what needs to be logged and then plan a logging strategy.
Because logging requirements and transaction volume vary widely, Novell cannot make recommendations regarding a specific logging strategy. The following tasks guide you through the process of creating a strategy that fits your business needs.
Identify the reasons for tracking transactions such as customer billing, statistical analysis, or growth planning.
Determine which resources need logging.
You enable logging at the proxy service level. If you have a proxy service protecting resources whose transactions do not need to be logged, reconfigure your proxy services so that the proxy service you configure for logging contains only the resources for which you want to log transactions.
Determine what information you need in each log entry.
The common configuration for a log entry contains minimal information: the date, time, and client IP address for each entry. If you need more information, you can to select the extended log configuration. Do not select all available fields, but carefully select what you really need. For example, you can include cookie information, but cookie information can consume a large amount of space and might not include any critical information you need.
You should log only the essential data because a few bytes can add up quickly when the Access Gateway is tracking thousands of hits every second. For information about what is available in an extended log profile, see Section 32.4.5, Configuring Extended Log Options.
Design a rollover strategy.
A log must be closed before it can be downloaded to another server for analysis or deleted. You specify either by time or size when the Access Gateway closes a log file and creates a new one. For each proxy service that you enable for logging, you need to reserve enough space for at least two files: one for logging and one for roll over. To calculate the best procedure, see Section 32.4.2, Calculating Rollover Requirements.
Design a log deletion strategy
The Access Gateway has a limited amount of disk space allocated for logging, and you need to decide how you are going to manage this space. You can limit the number of rollover files by number or age. You can also select to copy the files to another server and then delete them. To calculate the best procedure, see Section 32.4.2, Calculating Rollover Requirements.
You can have the Access Gateway roll over log files based on time or on size, but not both. If you already know which option you want to use, scan this section and then complete only the calculations pertinent to your choice. If you don’t know which option best matches your situation, completing the calculations in this section should help you decide.
The following variables are used in the formulas:
logpartition_size: The total disk capacity reserved for log files on the Access Gateway.
The Access Gateway reserves 4 GB to share between logging and system files. The system files do not grow significantly, so you can assume that you have about 2 GB for logging. To increase this size, see Section 32.4.7, Configuring the Size of the Log Partition.
logentry_size: The average log entry size.
You can determine this by configuring a proxy service to track the required information, generating traffic to the proxy service, downloading the log files, determining how large each entry is, and calculating the average.
request_rate: The peak rate of requests per second.
You can estimate this rate or place your Access Gateway in service and get more accurate data by accessing generated statistics. See Section 33.2, Monitoring Access Gateway Statistics.
num_services: The number of proxy services for which you plan to enable logging.
logs_per_service: The number of log files, both active and closed, that you want the Access Gateway to generate for each proxy service before the disk fills.
You must plan to have at least two logs per proxy service, but you can have three or more.
The following formulas can help you estimate when the system would run out of resources:
Using the following formula, you can calculate how long it will take the Access Gateway to fill your logging disk space:
diskfull_time in seconds = logpartition_size / (request_rate * logentry_size * num_services)
For example, assume the following:
diskfull_time = (1 GB) / (1000 * 1 KB * 1) = 1048 seconds (17.47 minutes)
The logging disk space will fill up every 17.47 minutes.
To calculate the diskfull_time for your Access Gateway:
Determine the values of the four variables listed above.
Using the diskfull_time formula, calculate how often you can expect your logging disk to fill; then use the result in Calculating max_roll_time.
If your diskfull_time interval is too short to be practical for your rollover schedule, the easiest option is to reduce the log entry size by configuring the proxy services to log less information per transaction.
Using the following formula, you can calculate the maximum rollover time value you should specify in the
fieldmax_roll_time = diskfull_time / logs_per_service
For example, assume the following:
max_roll_time = 12 / 2 = 6 hours
If you roll your logs over by time intervals, the maximum time should be less than six hours. Otherwise, scheduling the download and deletion of log files is much more complicated and the window in which this can be done is narrower.
To calculate the max_roll_time for your Access Gateway:
Determine how many log files you want the Access Gateway to generate per service before log space fills.
The minimum number is two.
Using the max_roll_time formula and the diskfull_time value obtained in Calculating diskfull_time, calculate how often you should have the cache device roll over the log files.
Record the max_roll_time result on your planning sheet.
Using the following formula, you can calculate the maximum log file size you should specify in the
field:max_log_roll_size = logpartition_size / (num_services * logs_per_service)
For example, assume the following:
max_log_roll_size = 600 MB / (2 * 3) = 100 MB
If you roll your logs over when they reach a specific size, the file size must be no more than 100 MB. Otherwise, the system runs out of disk space before you have three complete log files and scheduling the download and deletion of log files is much more complex.
To calculate the max_log_roll_size for your Access Gateway:
Determine the values of the three variables listed above.
Using the max_log_roll_size formula, calculate the maximum size a log file should reach before the cache device rolls it over.
Do not enable logging until you have designed a logging strategy. See Section 32.4.1, Determining Logging Requirements.
In the Administration Console, click
> > > > >Fill in the following fields:
Enable Logging: Select this field to enable logging.
Stop Service On Log Failure: Select this field if you want the Access Gateway to deny requests to this proxy service because the Access Gateway cannot log entries for it.
Log Directory: Displays the default location for the log files for this proxy service.
In the
, click one of the following options:New: Click this option to create a new logging profile. Then specify a name and select either
or .Default: Click
to modify or view the settings for the profile. The profile uses the common log options.A logging profile determines the type of information that is written to the log file; it also manages rollover and old file options.
Continue with one of the following:
Use the common log options page to control log rollover and old file options. The data included in a log entry is controlled by a default configuration that includes the following:
Date and time of the request
Username of the client
Remote host name
The request line as it came from the client
The HTTP status code returned to the client
The number of bytes in the document transferred to the client
The Access Gateway does not allow active log files to be deleted. Only log files that have been closed can be deleted. The rollover options allow you to control when a file is rolled over and closed, and a new file is created. The old file options allow you to control when the rolled-over log files are deleted.
To configure a default log file for a selected proxy service:
Click
> > > > > .Select one of the following roll over options:
Maximum File Size: Rolls the file when it reaches the specified number of megabytes.
Roll over every: Rolls the file at the specified interval. You can specify the interval in hours or days.
beginning: Specifies the day that the interval should begin. You can select a day of the week or the first of the month.
at: Select the hour of the day that the interval should begin and the time zone (either the local time zone or GMT).
Select one of the following old file options:
Maximum Number of Archived Files: Allows you to limit the number of old log files on the system to the number specified in this option. The oldest file is automatically deleted when this number is reached. All logging data in deleted files is lost. If you configure the
option, you can set the system up so that the files are copied to another server before they are deleted from the server.Delete Files Older Than: Allows you to configure the Access Gateway to delete files when they are older than the time you specify. All logging data in deleted files is lost. If you configure the
option, you can set the system up so that the files are copied to another server before they are deleted from the server.Do Not Delete: Prevents the system from automatically deleting the log files. You can use the
option to copy the files to another server and then either manually delete them or have the option delete them from the server after they are copied to another server.For information about the Section 32.4.6, Configuring Log Pushing.
option, seeClick
.Click the
link, then click > .Use the extended log options page to control log entry content, log rollover, and old file options. A log entry always includes the date, time, and client IP address for each entry, but with the log data options, you can add other fields such as the IP address of the server and the username of the client.
The Access Gateway does not allow active log files to be deleted. Only log files that have been closed can be deleted. The rollover options allow you to control when a file is rolled over and closed, and a new file is created. The old file options allow you to control when the rolled-over log files are deleted.
To configure an extended log file for a selected proxy service:
Click
> > > > > > .Select one or more of the log data options:
Select one of the following rollover options:
Maximum File Size: Rolls the file when it reaches the specified number of megabytes.
Roll over every: Rolls the file at the specified interval. You can specify the interval in hours or days.
beginning: Specifies the day that the interval should be begin. You can select a day of the week or the first of the month.
at: Select the hour of the day that the interval should begin and the time zone (either the local time zone or GMT).
Select one of the following old file options.
Maximum Number of Archived Files: Allows you to limit the number of old log files on the system to the number specified in this option. The oldest file is automatically deleted when this number is reached. All logging data in deleted files is lost. If you configure the Log Push option, you can set the system up so that the files are copied to another server before they are deleted from the server.
Delete Files Older Than: Allows you to configure the Access Gateway to delete files when they are older than the time you specify. All logging data in deleted files is lost. If you configure the
option, you can set the system up so that the files are copied to another server before they are deleted from the server.Do Not Delete: Prevents the system from automatically deleting the log files. You can use the
option to copy the files to another server and then either delete them manually or have the option delete them from the server when they have been copied to another server.For information about the Section 32.4.6, Configuring Log Pushing.
option, seeClick
.Click the
link, then click > .(NetWare only) The
option allows you to configure the NetWare Access Gateway to copy log files to an FTP server at specified intervals. The option is configured for all log files on the Access Gateway. If you have enabled logging on multiple proxy services, the Access Gateway uses the same configuration to push the log files of each proxy service.This feature works within the following parameters:
The Access Gateway tries as many times as necessary to establish a connection with the FTP server during the hour of the scheduled push. When the hour changes, the Access Gateway stops trying until the next interval you have specified.
When the connection is established, the Access Gateway assumes that pushing the log files was successful. The Access Gateway does not detect any errors that prevent the successful pushing of the files.
For example, you specify that log files are to be pushed on every day of the week at 12 midnight. When the system clock reaches the target hour, the Access Gateway begins trying to establish a connection with the FTP server.
If a connection cannot be established before the hour changes to 1 a.m., the Access Gateway stops trying to connect and doesn't try again until 12 midnight the next day.
If a connection is established but an error occurs that prevents a successful push, the error is not detected, and the Access Gateway doesn't try to connect again until 12 midnight the next day.
To configure log pushing:
In the Administration Console, click
> > > .To enable log pushing, select
.Configure the following FTP settings. All of them are required settings.
DNS or IP Address: Specify the DNS name or the IP address of your FTP server.
Default Directory: Specify the directory on the FTP server to which the Access Gateway should copy the log files.
Login Name: Specify the name that the Access Gateway should use to log in to the FTP server.
Password: Specify the password that the Access Gateway should use for logging in.
To schedule when the log files are copied to the FTP server, fill in the following fields:
Cluster Member: (Available only if the Access Gateway is a member of a cluster.) Select the server you want to configure from the list of servers. The modifications made to the
option apply only to the selected cluster member. Modifications made to any other options on the page apply to all members of the cluster.Push Using Address: Select the IP address you want to use for sending the log files to the FTP server.
Select when you want the logs to be pushed. Select one of the following:
Push Logs when the Logs Roll Over: To push the logs as soon as a log file rolls over, select
.This method ensures that log files are copied as soon as possible.Push Logs on Specified Days and Time: To push the logs on selected days at a specific time, select
, then configure the following fields:Days to Push the Logs: Allows you to select the days when the log push should occur. You can select multiple days for pushing.
Time to Push the Logs: Specifies the time of day when the log files are pushed.
Specify what you want done with the log files after they have been copied to the FTP server.
Select the Section 32.4.4, Configuring Common Log Options).
option to have the Access Gateway delete the log files after they have been copied to the FTP server. This is the recommended method. If you do not select this option, you must manually delete them or use the old file options on the Logging page (seeClick
.Click the
link, then click > .The size of the log partition should be configured as part of the installation process. See one of the following in the Novell Access Manager 3.0 SP4 Installation Guide:
The NetWare Access Gateway creates a 2 GB log: volume. To increase its size, see Configuring the Log Partition on the NetWare Access Gateway
Linux Access Gateway logs are stored in /root partition by default. You can create a /var partition to store the logs. The size of this partition depends on your requirements. For more information on creating the /var partition, see Customizing the Partitions
in the Novell Access Manager 3.0 SP4 Installation Guide.