|
!
|
----------------------------------------------------------------------------
(1) "Best practices for maintaining a Webtrends installation"
----------------------------------------------------------------------------
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.
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\logs\
\Webtrends\common\apache\logs\
\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\8.x\wtm_wtx\datfiles\statuslogs\
\Webtrends\modules\analysis\engine\8.x\wtm_wtx\datfiles\databases\
\Webtrends\modules\analysis\engine\8.x\wtm_wtx\datfiles\ehost_logs\
\Webtrends\modules\analysis\engine\8.x\wtm_wtx\datfiles\reports\
3. The following directories contain cached files from compressed archives and FTP transfers:
\Webtrends\modules\analysis\engine\8.x\wtm_wtx\datfiles\ftp
\Webtrends\modules\analysis\engine\8.x\wtm_wtx\datfiles\zipcache
4. If you are running MySQL, you may have a large error log. Check for the following files, and if it is growing to over 10 or 20 M, you can 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 -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 ;
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 Administrator -p
mysqlcheck.exe -r --databases wtmaster -u Administrator -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;
|