Applies To:

Show Versions Show Versions

Manual Chapter: Storing Statistics
Manual Chapter
Table of Contents   |   << Previous Chapter   |   Next Chapter >>

Overview: Statistics storage

Enterprise Manager stores statistical data until the system reaches the storage capacity, which is by default, 1 GB stored locally. When this capacity is met, the oldest data in the system is replaced with new data, up to the storage limit. This default amount is intentionally low because when you enable statistics collection it affects the overall performance of the system. Therefore, it is important to plan for your database storage needs by understanding your system's capacity and personalize your storage requirements so you can maximize the value of the statistics features. Once you have estimated the availability of storage on your system, you can change the default database storage capacity setting. Increasing the default setting is essential to monitoring statistics data over time.

To help you plan for statistics storage, you can view the system's hard drive allocation by file type to remove any unnecessary files and calculate statistics data storage.

Viewing hard drive storage allocation

The Enterprise Manager system hard drive contains all locally-stored statistical data as well as software images, attack signature files, system logs, archives, and so forth. It is important to note that if you are collecting statistics for a large number of devices and objects, the size of the statistics database can be limited by how many other parts of the Enterprise Manager system are using the shared file system. You can view file allocation to determine if storage is maximized for your needs.
  1. In the navigation pane, click System > File System Management > File System Information.
  2. Review the storage allocation to identify any outdated or unnecessary file storage.
You can remove any superfluous files to free storage space to increase statistics data storage.

Calculating and modifying statistics storage allocation

When Enterprise Manager is configured to collect statistical data, the Data Storage screen displays a system-generated estimate of the number of days until the system reaches capacity for statistical data storage.

This number is calculated based on the current rate of data collection and the amount of disk space you specified for the storage space allocation. To retain more or less historical data, you can change the storage allocation space. To help you determine how much disk space you want to allocate to statistics storage, you can recalculate the estimated number of storage days by modifying the storage space. When you have determined that you are satisfied with the storage space value, you can then opt to save the changes.

  1. On the Main tab, click Statistics > Managed Devices > Options > Data Storage.
  2. From the Allocated Statistic Storage Space list, select a value for the number of gigabytes on the external database hard drive.
  3. Click Recalculate.
  4. Review the value displayed for the Estimated Statistics Storage Capacity With Current Settings setting.
  5. Continue to change the Allocated Statistic Storage Space value until you are satisfied with the number of days for the estimated statistics storage.
    Important: If you change the Allocated Statistic Storage Space setting to a value less than the current value, Enterprise Manager removes statistics data from the database, starting with the oldest, until it reaches the new lowered storage limit. For external databases, this value cannot exceed the available amount of disk space of the system on which you set up the external database. Enterprise Manager does not monitor the amount of disk space on the external database.
  6. Once you are satisfied with the number of days statistics are stored, click Save Changes.
Enterprise Manager allocates the specified hard drive space to statistics storage.

About external storage for health and performance monitoring statistics

By default, Enterprise Manager™ stores health and performance monitoring statistics data in the database located on its hard drive. You have the option of configuring Enterprise Manager to store these statistics on a hard drive that is separate (external) from the Enterprise Manager system. Storing statistics on an external database clears space on Enterprise Manager for more storage of archives, images, configuration files, and so forth. A space dedicated only to health and performance monitoring statistic data can also provide you with more historical data storage.

To use an external database for health and performance monitoring statistics storage, you must create the external database and then configure Enterprise Manager to store data on that database.

If you previously collected data locally on the Enterprise Manager system, you have the option to back up and restore the data to the external database.

Task summary

Creating an external database for health and performance monitoring statistics storage

Before configuring Enterprise Manager™ to store statistics data on an external database, you must create an external database on a system that is running Oracle® MySQL® version 5.1 with patch 52 or later.

Important: Versions of MySQL other than 5.1 are not compatible with the statistics database schema. All patches for MySQL version 5.1 (with patch 52 or later) are compatible. In some operating environments, the number of file handles required by the partitioning feature of MySQL exceed the number configured by default. If this occurs, MySQL logs the errors Too many open files or File table overflow. For systems using a Linux operating system, this issue might be resolved by setting the open file limit to 12000 (open-files-limit=12000) in the my.cnf configuration file.
Storing statistics on an external database clears space on Enterprise Manager for more storage of archives, images, configuration files, and so forth. A space dedicated only to health and performance monitoring statistic data can also provide you with more historical data storage. To create an external database for statistics storage, you use a specific sequence of SQL commands.
  1. create database <database> , where <database> is the name of the external database.
  2. grant all privileges on <database>.* to <username>@<host> identified by <password> , where <host> includes the IP address of the Enterprise Manager system that is storing data on the external database and <password> is the password for the user name specified.
  3. grant select on mysql.proc to <username>@<host>
    This command sets privileges for the specified user to initiate the required procedures for Enterprise Manager to store and access data on the external database.
  4. set global log_bin_trust_function_creators = 1
    This command relaxes the privilege conditions so that Enterprise Manager can create necessary functions and procedures that enable you to store and access statistics data.
You can now configure Enterprise Manager to store health and performance monitoring statistics in the external database that you created.

Backing up a local statistics database to an external statistics database

If you previously collected data locally on the Enterprise Manager™ system, you can back up and restore the local data to the external database that you created.

  1. On the Main tab, click Managed Devices > Options > Statistics > Data Collection.
  2. From the Collect Statistics Data list, select Disable.
  3. Click the Save Changes button.
  4. On the system on which the local database is located, create a back up of the data by running the following command: mysqldump -u <user> -p -R f5em_extern> dump.sql, where <user> is the user name assigned to the database.
  5. On the system on which you created the external database, restore the data by running the following command: mysql -u <user> -p -D remotedb < dump.sql, where <user> is the user name assigned to the database.
  6. On the Main tab, click Managed > Options > Statistics > Data Collection.
  7. From the Collect Statistics Data list, select Enabled.
  8. Click the Save Changes button.
You can now configure Enterprise Manager to store health and performance monitoring statistics on the external database.

Configuring Enterprise Manager to store statistics on an external database

After you have created the external database on the remote system, you can configure Enterprise Manager™ to store data there.

Configuring Enterprise Manager to store health and performance monitoring statistics on an external database frees system resources, and provides you with space to store statistics that is limited only by the system's hard drive on which you configure the external database.

Important: When configured to use an external database for statistics storage, Enterprise Manager no longer monitors, reports, nor sends alerts regarding storage capacity and usage, and you cannot schedule or perform statistics database backups and restorations from Enterprise Manager. When statistics are stored in an external database, the administrator of the remote system on which the statistics are stored must perform capacity management, and backup and restoration tasks independently of Enterprise Manager.

If you have two Enterprise Manager systems configured as a high availability system, configure the external database the same way on each system.

  1. On the Main tab, click Statistics > Options > Data Storage.
  2. For the Statistics Data Location setting, select External. The screen refreshes to display additional fields specific to the external database option.
  3. In the External Database Address field, type the IP address of the system on which you configured the external database.
  4. In the External Database Port field, leave 3306 for the MySQL default port, or type a new port number in the field.
  5. In the External Database Name field, type a name for the external database.
  6. In the External Database User and External Database Password fields, type the credentials required to access the database.
  7. In the Allocated Statistic Storage Space field, type a value for the number of gigabytes (GB) that you want to dedicate to storing statistics. This value cannot exceed the available amount of disk space of the system on which you set up the external database. Enterprise Manager does not monitor the amount of disk space on the external database.
  8. Click Save Changes. The screen displays a summary of the configuration.
  9. If the summary details are correct, click Confirm to initialize the configuration.
When the configuration changes are fully initialized, Enterprise Manager begins to store health and performance monitoring statistics data in the external database. (This transition may take a few minutes.) Content currently stored in the local database remains there until you remove it.
Removing local statistics data storage
After you configure Enterprise Manager™ to store health and performance monitoring statistics on an external database location, you can remove the data stored locally to free more disk space. Before removing the local statistics, first verify that external statistics storage, data retrieval, and reporting functionality are working as expected, and that the locally-stored data is no longer useful or relevant. Or, if you want to retain the local data, back up the local data to store elsewhere, prior to deleting it.
Removing the locally-stored statistics increases the amount of storage that Enterprise Manager can use for archives, images, configuration files, and so forth.
  1. On the Main tab, click Enterprise Management > Statistics > Options > Data Storage.
  2. Click the Delete Local Statistics Data button.
  3. Click Confirm.
Enterprise Manager frees the local disk space that was previously dedicated to storing statistics data.

About statistics database backup and restoration

You can backup and restore the statistics database from the command line, or you can create a task to backup the statistics database on a regular schedule.

Scheduling statistics database backups

You must enable statistics collection and have content saved to the statistics database, before a scheduled backup can occur.
Scheduling a regular backup for you statistics database ensures you have a the option to restore it in the event of a system failure.
  1. On the Main tab, click Enterprise Manager > Tasks > Schedules > Statistics Database Backup.
  2. From the Backup Data list, select the frequency that you want Enterprise Manager to back up the statistics database. Depending on your selection, the screen refreshes to display associated options.
  3. Specify the day of the week or month, and the time of day that you want Enterprise Manager to review the device's configuration for any changes.
  4. In the Username field, type the user ID that you use to log in to the remote system.
  5. In the Hostname field, type the FQDN of the remote system.
  6. In the Path field, type the file path of the remote system.
  7. Click Save Changes.
If any changes occur during the specified time frame, Enterprise Manager backs up the statistics database.

Backing up the statistics database from the command line

You must enable statistics collection and have content saved to the statistics database, before you can create a backup.
You can manually back up the statistics database for archive and restoration purposes.
  1. Log in to the Enterprise Manager command line as root.
  2. Type the em-backup-extern <user@host.com>:/>full_file_path_for_backup_file> command. The default file name is f5em_extern-<date stamp>.
Enterprise Manager saves the stored contents of the statistics database to the specified file.

Restoring the statistics database from the command line

You must backup the statistics database before you can restore it.
You can manually restore a statistics database backup from the command line.
  1. Log in to the Enterprise Manager command line as root.
  2. Type the em-restore-extern <user@host.com>:/>full_file_path_for_backup_file> command. For example: em-restore-extern <user@host.com>f5em_extern-<date stamp>.
Enterprise Manager restores the stored contents of the statistics database to the specified location.
Table of Contents   |   << Previous Chapter   |   Next Chapter >>

Was this resource helpful in solving your issue?




NOTE: Please do not provide personal information.



Incorrect answer. Please try again: Please enter the words to the right: Please enter the numbers you hear:

Additional Comments (optional)