Best practices for maintaining a Webtrends installation

Best practices for maintaining a Webtrends installation

For products:
Webtrends Analytics 9.2x
Webtrends Analytics 8.7d
Webtrends Analytics 8.5x
Webtrends Analytics 8.1x
Webtrends Analytics 8.0x

Last modified: 8/6/2010

Introduction:
There are many files, folders, and database tables in Webtrends that grow to large sizes during normal operation. Usually Webtrends will clean up its temporary folders and files on its own, but there are situations in which this doesn't happen. Analysis failures, crashes, and unexpected system restarts are just a few of the situations that can result in left over data that doesn't get properly cleaned up. This document details what files are safe to delete, and what database tables can be safely truncated to clean up your Webtrends installation. Deleting files and database information is an inherently risky operation, and as such, you should always make a backup before attempting the steps below. If you have any questions, please call Webtrends Technical Support at 503-223-3023 for more information.

I. Log files and temporary file caches

The files in the following directories should not be removed while any of the Webtrends services are running, however they can be deleted once the services are stopped. In all cases, the directory structure must be maintained, but the files within them can be removed. Note that you may not have all of the folders below.

1.The following folders contain log files:

\Webtrends\storage\config\wtm_wtx\datfiles\statuslogs\
(\Webtrends\storage\analysis\wtm_wtx\datfiles\statuslogs in 8.7d and 9.2a)
\Webtrends\logs\
\Webtrends\common\apache\logs\ (only applies to 8.0x - 8.1x)
\Webtrends\common\jakarta-tomcat\logs\

2. Any computer (including distributed nodes) that is running an analysis engine will have the following directories that can be cleaned out:

\Webtrends\modules\analysis\engine\[version number]\wtm_wtx\datfiles\statuslogs\
\Webtrends\modules\analysis\engine\[version number]\wtm_wtx\datfiles\databases\
\Webtrends\modules\analysis\engine\[version number]\wtm_wtx\datfiles\ehost_logs\
\Webtrends\modules\analysis\engine\[version number]\wtm_wtx\datfiles\reports\

3. The following directories contain cached files from compressed archives and FTP transfers:

\Webtrends\modules\analysis\engine\[version number]\wtm_wtx\datfiles\ftp
\Webtrends\modules\analysis\engine\[version number]\wtm_wtx\datfiles\zipcache

4. If you are running MySQL, you may have a large error log. Check for the following file. If it has grown to ten megabytes or larger, delete it:

\Webtrends\common\database\mysql\data\*.err


II. Reducing backup storage

To reduce the size of the 'backup' files, simply reduce the retention time of the profile backups in the interface (Administration -> System Management -> Backup/Restore -> Options -> "Configuration Backups" and "Data Backups").


III. Database Clean-up

Several tables in the database can grow to unusual size and should be truncated when they grow large. To truncate a table, open a command line on the Webtrends server running MySQL and cd to the following directory:

\Webtrends\common\database\mysql\bin\

Type the following command:

mysql -u <username> -p

When prompted, enter your MySQL password.

Change to the database that contains the table you want to truncate with one of the following commands:

use wtmaster
use wt_sched


To delete the contents of a table, use the following command:

delete from <tablename>;

Below is a list of the tables that can be safely truncated under the database in which they can be found.

In wtmaster, truncate:

wt_analysissummary
wt_servicestatus

In wt_sched, truncate:

wt_analysistime
wt_eventstatus
wt_hostmetrichistory
wt_hoststatus
wt_taskstatus
wt_taskchronicle

Once you are finished truncating tables, run the following two commands:

mysqlcheck.exe -r --databases wt_sched -u <database user account> -p
mysqlcheck.exe -r --databases wtmaster -u <database user account> -p

Both should finish with "OK" for all tables. If one of them displays something other than OK as it runs, run it a second time.

For MS SQL execute the following SQL statements in a front-end tool such as MS SQL Server Management Studio Express:

In wtmaster, truncate:

DELETE FROM wtmaster.dbo.wt_analysissummary;
DELETE FROM wtmaster.dbo.wt_servicestatus;


In wt_sched, truncate:

DELETE FROM wt_sched.dbo.wt_analysistime;
DELETE FROM wt_sched.dbo.wt_eventstatus;
DELETE FROM wt_sched.dbo.wt_hostmetrichistory;
DELETE FROM wt_sched.dbo.wt_hoststatus;
DELETE FROM wt_sched.dbo.wt_taskstatus;
DELETE FROM wt_sched.dbo.wt_taskchronicle;
DELETE FROM wt_sched.dbo.WT_MonitorResultAction;
DELETE FROM wt_sched.dbo.WT_MonitorAlertResolveHistory;
DELETE FROM wt_sched.dbo.WT_MonitorResult;

    • Related Articles

    • How to perform a clean installation of Webtrends Report Exporter

      For products: Webtrends Analytics 8.x Last modified: 3/1/2011 Situation: After removing Report Exporter through Add/Remove Programs or Programs and Features in the Control Panel, the user interface displays errors indicating the system believes the ...
    • Webtrends On Premises Backup

      Before making non-trivial changes to a Webtrends On Premises installation it is recommended a backup of the system's core components be made to allow recovery of the installation should issues arise. Webtrends services needs to be stopped during the ...
    • Upgrading WebTrends 7.x to WebTrends 8.x

      For Products: WebTrends Analytics 8.0x WebTrends Small Business 7.x WebTrends Professional 7.x WebTrends Enterprise 7.x Last Modified: 10/4/2007 Intoduction: Upgrading WebTrends 7.x to WebTrends 8.x Process: There are two basic types of WebTrends ...
    • FAQ for Webtrends Customers: Webtrends Analytics Page View Licensing

      For products: Webtrends Analytics 9.2x Webtrends Analytics 8.x Webtrends Enterprise 7.x Webtrends Professional 7.x Webtrends Small Business 7.x Last modified: 8/4/2010 Introduction: Q. What is a page view and how is it counted? A. "Page View" counted ...
    • Tracking RSS feeds with Webtrends

      For products: Webtrends On Demand Webtrends Analytics 9.2x Webtrends Analytics 8.x Last Modified: 3/1/2011 Introduction: The following three events relating to RSS feeds can be tracked using Webtrends: 1. Tracking the feed itself, that is, how many ...