KnowledgeBase - Best practices for maintaining a Webtrends installation
Article

Best practices for maintaining a Webtrends installation

« Go Back
Products
Webtrends Analytics 9.2
Webtrends Analytics 8.7
Webtrends Analytics 8.5
Webtrends Analytics 8.1
Webtrends Analytics 8.0
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.
Procedure
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. For more information regarding the order to stop and start the Webtrends services, please see Order to stop and start the Webtrends services by version. 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\analysis\wtm_wtx\datfiles\statuslogs
(\Webtrends\storage\config\wtm_wtx\datfiles\statuslogs\ in versions prior to 8.7d)
\Webtrends\logs\
\Webtrends\common\jakarta-tomcat\logs\
\Webtrends\common\apache\logs\ (only applies to 8.0x - 8.1x)

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 making backups, on any machine that contains a UI go to and delete any files files in the following directory that do not contain today's date:
\Webtrends\modules\tools\temp

5. 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 -> Application Settings -> System Management -> Backup/Restore -> Options -> Backup Options -> "Configuration File Backups" and "Analysis Data Backups").

III. Database Clean-up


Several tables in the database can grow to unusual size and should be truncated when they grow large. 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;


IIII. Insight Clean-up

If you have an Insight server installed, there are several locations on the Insight server where log files can accumulate.

\Webtrends\logs
\Webtrends\Twister\App_Data\elmah
\Webtrends\Twister\App_Data\logs






For MySQL, 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.
More Information
 
Was this article helpful?

Please tell us how we can make this article more useful.

Characters Remaining: 255