Chapter 11. History Database Reports

Red Hat Enterprise Virtualization includes a comprehensive management history database, which any reporting application utilizes to generate a range of reports at data center, cluster and host levels. This chapter provides information to enable you to set up queries against the history database and generate reports.

11.1. Overview

Red Hat Enterprise Virtualization Manager uses PostgreSQL 8.4.7 as a database platform to store information about the state of the virtualization environment, its configuration and performance. At install time, Red Hat Enterprise Virtualization Manager creates a PostgreSQL database called rhevm. Installing the dwh package creates a second database called rhevm_history, which contains historical configuration information and statistical metrics collected every minute over time from the rhevm operational database. Tracking the changes to the database provides information on the objects in the database, enabling the user to analyze activity, enhance performance, and resolve difficulties.

Warning — Do Not Stop RHEVM History Service

The replication of data in the rhevm_history database is performed by the RHEVM ETL Service (Red Hat Enterprise Virtualization Manager Extract Transform Load Service). The service is based on Talend Open Studio, a data integration tool. This service is configured to start automatically during the data warehouse package setup. It is a Java program responsible for extracting data from the rhevm database, transforming the data to the history database standard and loading it to the rhevm_history database.
The RHEVM ETL service must not be stopped.
Since the rhevm_history database schema changes over time, the database includes a set of database views to provide a supported, versioned API with a consistent structure. A view is a virtual table composed of the result set of a database query. The database stores the definition of a view as a SELECT statement. The result of the SELECT statement populates the virtual table that the view returns. A user references the view name in PL/PGSQL statements the same way a table is referenced.

11.1.1. Tracking Configuration History

The ETL service tracks three types of changes:
  • A new entity is added to the rhevm database - the ETL Service replicates the change to the rhevm_history database as a new entry.
  • An existing entity is updated - the ETL Service replicates the change to the rhevm_history database as a new entry.
  • An entity is removed from the rhevm database - A new entry in the rhevm_history database flags the corresponding entity as removed. Removed entities are only flagged as removed. To maintain correctness of historical reports and representations, they are not physically removed.
The configuration tables in the rhevm_history database differ from the corresponding tables in the rhevm database in several ways. The most apparent difference is they contain fewer configuration columns. This is because certain configuration items are less interesting to report than others and are not kept due to database size considerations. Also, columns from a few tables in the rhevm database appear in a single table in rhevm_history and have different column names to make viewing data more convenient and comprehensible. All configuration tables contain:
  • a history_id to indicate the configuration version of the entity;
  • a create_date field to indicate when the entity was added to the system;
  • an update_date field to indicate when the entity was changed; and
  • a delete_date field to indicate the date the entity was removed from the system.

11.1.2. Recording Statistical History

The ETL service collects data into the statistical tables every minute. Data is stored for every minute of the past 24 hours. Minute-by-minute data more than two hours old is aggregated into hourly data and stored for two months. Hourly data more than two days old is aggregated into daily data and stored for five years.
Hourly data and daily data can be found in the hourly and daily tables.
Each statistical datum is kept in its respective aggregation level table: samples, hourly, and daily history. All history tables also contain a history_id column to uniquely identify rows. Tables reference the configuration version of a host in order to enable reports on statistics of an entity in relation to its past configuration.

11.1.3. Tracking Tag History

The ETL Service collects tag information as displayed in the Administration Portal every minute and stores this data in the tags historical tables. The ETL Service tracks five types of changes:
  • A tag is created in the Administration Portal - the ETL Service copies the tag details, position in the tag tree and relation to other objects in the tag tree.
  • A entity is attached to the tag tree in the Administration Portal - the ETL Service replicates the addition to the rhevm_history database as a new entry.
  • A tag is updated - the ETL Service replicates the change of tag details to the rhevm_history database as a new entry.
  • An entity or tag branch is removed from the Administration Portal - the rhevm_history database flags the corresponding tag and relations as removed in new entries. Removed tags and relations are only flagged as removed or detached. In order to maintain correctness of historical reports and representations, they are not physically removed.
  • A tag branch is moved - the corresponding tag and relations are updated as new entries. Moved tags and relations are only flagged as updated. In order to maintain correctness of historical reports and representations, they are not physically updated.