Depending on the amount of disk space available for the continuously growing DataStore, administrators can set an archive policy that determines how many month’s worth of data is retained. Old performance data is automatically archived and removed from the DataStore. This archiving procedure works with all databases that are compatible with Uptime Infrastructure Monitor.
The existing archive policy can be viewed and modified on the Archive Policy subpanel, which is accessed from the main Config panel. Here, the main archive categories are shown, along with the number of months for which collected data is retained in the DataStore.
Every month, Uptime Infrastructure Monitor checks the DataStore’s entries; data that is older than the limit set in the archive policy are written to XML files. The XML archives use the following format:
<table_name>_<date>.xml.gz
The archives created reflect the database table structure used to store performance data, as well as the date that the stored data represents, as shown in the following example:
performance_cpu_2013-09-13.xml.gz
The DataStore is trimmed and the XML files are compressed and stored in the /archives
directory.
For example, if you installed Uptime Infrastructure Monitor in the default location, the path to the archived data is:
- Linux:
/usr/local/uptime/archives
- Windows:
C:\Program Files\uptime software\uptime\archives
Once backed up, archives can be stored offline. If required, they can be temporarily imported into the DataStore.
Archive Categories
The following table lists the statistical categories whose archiving can be configured, along with the corresponding DataStore database table:
Archive Policy Category | Database Table |
---|---|
Overall CPU/Memory |
|
Multi-CPU |
|
Detailed Process |
|
Disk Performance |
|
File System Capacity |
|
Network |
|
User Information |
|
Volume Manager |
|
Retained Data |
|
vSphere Performance Data |
|
vSphere Inventory Updates |
|
Network Device Performance Data |
|
Configuring an Archive Policy
To set an archive policy, do the following:
- On the Uptime Infrastructure Monitor tool bar, click Config.
- In the tree panel, click Archive Policy.
- For the following categories, specify the number of months worth of data that is retained in the DataStore before removal and archiving:
- Overall CPU/Memory Statistics
- Multi-CPU Statistics
- Detailed Process Statistics
- Disk Performance Statistics
- File System Capacity Statistics
- Network Statistics
- User Information Statistics
- Volume Manager Statistics
- Retained Data
- vSphere Performance Data
- vSphere Inventory Data
- Network Device Performance Data
- Ensure the Enable Archiving checkbox is selected.
- Click Set Archive Policy.
- Optionally, you can click the Archive Now button to immediately create archives of the data in your DataStore.
Uptime Infrastructure Monitor checks the DataStore entries and archiving anything that is older than the limits you have configured.
Restoring Archived Data
If you need to generate graphs or reports on older data that are is already archived and is no longer in the DataStore, you can import specific archives using the restorearchive
command line utility. The command’s parameters allow you to import archives in the following manner:
- a single archive that represents a specific archive category and date; the collected data for each archive category and 24-hour period is exported to individual XML files
- all archives for a specific date (that is, a 24-hour period)
Importing Archived Data into the DataStore
To import archived data into the DataStore, do the following:
- Ensure the database hosting the DataStore is running.
- At the command line, navigate to the Uptime Infrastructure Monitor
/scripts
folder.
For example, if you installed the Monitoring Station in the default location on a Windows system, navigate to the following folder:
C:\Program Files\uptime software\uptime\scripts\
Run the
restorearchive
command with one or more of the following options:Option Description -f <filename> Imports a single file (an archive category’s data for a single date). You must specify the full path to the file name. -d <date> Imports all files with the specified date (in YYYY-MM-DD
format).-D <directory> The directory containing the archived files. Note that you must specify this option when using the -d
option.-c <directory> The full directory path to the uptime.conf
file.
For example, the following command imports all of the data archived on September 18, 2013, which is located in the default directory for archived data:
restorearchive -d 2013-09-18 -D /usr/local/uptime/archives/ -c /usr/local/uptime
If you have deployed Uptime Infrastructure Monitor UI instances, ensure you always run command-line scripts such as restorearchive
on the primary Monitoring Station that is actually performing data collection.
Exporting and Importing the DataStore
In cases where you need to perform a wholesale backup of the existing DataStore (e.g., migrating your DataStore to another database), Uptime Infrastructure Monitor includes two command-line utilities:
fulldatabasedump
: creates a compressed XML file of the contents of your DataStorefulldatabaseimport
: imports the archived data back into your DataStore
Archiving the DataStore
To archive your DataStore, do the following:
- Ensure the database hosting the DataStore is running.
- Stop the Uptime Infrastructure Monitor Data Collector service (i.e., the up.time Core).
See Stopping and Restarting Uptime Infrastructure Monitor Services for more information. At the command line, navigate to the Uptime Infrastructure Monitor
/scripts
folder.
For example, if you installed the Monitoring Station in the default location on a Windows system, navigate to the following folder:
C:\Program Files\uptime software\uptime\scripts\
Run the following command:
fulldatabasedump
If you have deployed Uptime Infrastructure Monitor UI instances, ensure you always run command-line scripts such as
fulldatabasedump
orfulldatabaseimport
on the primary Monitoring Station that is actually performing data collection.
Depending on the size of your DataStore, this process can take anywhere from several minutes to several hours.
The utility creates the fileuptimedump_YYYY-MM-DD.xml.gz
(for example,uptimedump_2014-01-02.xml.gz
). This file is saved in Uptime Infrastructure Monitor's root installation directory.- Restart the Uptime Infrastructure Monitor Data Collector service.
Restoring the DataStore
To restore your DataStore, do the following:
- Ensure the database hosting the DataStore is running.
- Use the
resetdb
utility with thereally
andnodata
options to delete, then recreate the database structure that is used by Uptime Infrastructure Monitor by running one of the following commands:- Linux:
/usr/local/uptime/resetdb --nodata really
- Windows:
C:\Program Files\uptime software\uptime\resetdb --nodata really
If you have set up UI instances of Uptime Infrastructure Monitor, ensure you always run command-line scripts such as
resetdb
on the primary Monitoring Station that is actually performing data collection. - Linux:
Run the following command:
fulldatabaseimport path/<fileToImport>.xml.gz
Where "path/<fileToImport>.xml.gz"
is the path to, and file name of, the archived contents of your DataStore. For example, to import an archive that is located in Uptime Infrastructure Monitor's root installation directory, enter the following:
fulldatabaseimport uptimedump_2014-01-02.xml.gz