Red Hat Training

A Red Hat training course is available for Red Hat Virtualization

2.7. Statistics History Views

Statistics data is available in hourly, daily, and samples views.
To query a statistics view, run SELECT * FROM view_name_[hourly|daily|samples];. For example:
# SELECT * FROM v4_0_statistics_hosts_resources_usage_daily;
To list all available views, run:
# \dv

2.7.1. Enabling Debug Mode

You can enable debug mode to record log sampling, hourly, and daily job times in the /var/log/ovirt-engine-dwh/ovirt-engine-dwhd.log file. This is useful for checking the ETL process. Debug mode is disabled by default.
  1. Log in to the Manager machine and create a configuration file (for example, /etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/logging.conf).
  2. Add the following line to the configuration file:
    # DWH_AGGREGATION_DEBUG=true
  3. Restart the ovirt-engine-dwhd service:
    # systemctl restart ovirt-engine-dwhd.service
To disable debug mode, delete the configuration file and restart the service.

2.7.2. Storage Domain Statistics Views

Table 2.2. Historical Statistics for Each Storage Domain in the System

Name Type Description
history_id bigint The unique ID of this row in the table.
history_datetime date The timestamp of this history row (rounded to minute, hour, day as per the aggregation level).
storage_domain_id uuid Unique ID of the storage domain in the system.
storage_domain_status smallint The storage domain status.
seconds_in_status integer The total number of seconds that the storage domain was in the status shown state as shown in the status column for the aggregation period. For example, if a storage domain was "Active" for 55 seconds and "Inactive" for 5 seconds within a minute, two rows will be reported in the table for the same minute. One row will have a status of Active with seconds_in_status of 55, the other will have a status of Inactive and seconds_in_status of 5.
minutes_in_status numeric(7,2) The total number of minutes that the storage domain was in the status shown state as shown in the status column for the aggregation period. For example, if a storage domain was "Active" for 55 minutes and "Inactive" for 5 minutes within an hour, two rows will be reported in the table for the same hour. One row will have a status of Active with minutes_in_status of 55, the other will have a status of Inactive and minutes_in_status of 5.
available_disk_size_gb integer The total available (unused) capacity on the disk, expressed in gigabytes (GB).
used_disk_size_gb integer The total used capacity on the disk, expressed in gigabytes (GB).
storage_configuration_version integer The storage domain configuration version at the time of sample.

2.7.3. Host Statistics Views

Table 2.3. Historical Statistics for Each Host in the System

Name Type Description
history_id bigint The unique ID of this row in the table.
history_datetime date The timestamp of this history row (rounded to minute, hour, day as per the aggregation level).
host_id uuid Unique ID of the host in the system.
host_status smallint
  • -1 - Unknown Status (used only to indicate a problem with the ETL. Please notify Red Hat Support)
  • 1 - Up
  • 2 - Maintenance
  • 3 - Problematic
seconds_in_status integer The total number of seconds that the host was in the status shown in the status column for the aggregation period. For example, if a host was up for 55 seconds and down for 5 seconds during a minute, two rows will show for this minute. One will have a status of Up and seconds_in_status of 55, the other will have a status of Down and a seconds_in_status of 5.
minutes_in_status numeric(7,2) The total number of minutes that the host was in the status shown in the status column for the aggregation period. For example, if a host was up for 55 minutes and down for 5 minutes during an hour, two rows will show for this hour. One will have a status of Up and minutes_in_status of 55, the other will have a status of Down and a minutes_in_status of 5.
memory_usage_percent smallint Percentage of used memory on the host.
max_memory_usage smallint The maximum memory usage for the aggregation period, expressed as a percentage. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
ksm_shared_memory_mb bigint The Kernel Shared Memory size, in megabytes (MB), that the host is using.
max_ksm_shared_memory_mb bigint The maximum KSM memory usage for the aggregation period expressed in megabytes (MB). For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
cpu_usage_percent smallint Used CPU percentage on the host.
max_cpu_usage smallint The maximum CPU usage for the aggregation period, expressed as a percentage. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
ksm_cpu_percent smallint CPU percentage ksm on the host is using.
max_ksm_cpu_percent smallint The maximum KSM usage for the aggregation period, expressed as a percentage. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
active_vms smallint The average number of active virtual machines for this aggregation.
max_active_vms smallint The maximum active number of virtual machines for the aggregation period. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
total_vms smallint The average number of all virtual machines on the host for this aggregation.
max_total_vms smallint The maximum total number of virtual machines for the aggregation period. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
total_vms_vcpus integer Total number of vCPUs allocated to the host.
max_total_vms_vcpus integer The maximum total virtual machine vCPU number for the aggregation period. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
cpu_load integer The CPU load of the host.
max_cpu_load integer The maximum CPU load for the aggregation period. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
system_cpu_usage_percent smallint Used CPU percentage on the host.
max_system_cpu_usage_percent smallint The maximum system CPU usage for the aggregation period, expressed as a percentage. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
user_cpu_usage_percent smallint Used user CPU percentage on the host.
max_user_cpu_usage_percent smallint The maximum user CPU usage for the aggregation period, expressed as a percentage. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
swap_used_mb integer Used swap size usage of the host in megabytes (MB).
max_swap_used_mb integer The maximum user swap size usage of the host for the aggregation period in megabytes (MB), expressed as a percentage. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
host_configuration_version integer The host configuration version at the time of sample.

2.7.4. Host Interface Statistics Views

Table 2.4. Historical Statistics for Each Host Network Interface in the System

Name Type Description
history_id bigint The unique ID of this row in the table.
history_datetime date The timestamp of this history view (rounded to minute, hour, day as per the aggregation level).
host_interface_id uuid Unique identifier of the interface in the system.
receive_rate_percent smallint Used receive rate percentage on the host.
max_receive_rate_percent smallint The maximum receive rate for the aggregation period, expressed as a percentage. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
transmit_rate_percent smallint Used transmit rate percentage on the host.
max_transmit_rate_percent smallint The maximum transmit rate for the aggregation period, expressed as a percentage. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
received_total_byte bigint The total number of bytes received by the host.
transmitted_total_byte bigint The total number of bytes transmitted from the host.
host_interface_configuration_version integer The host interface configuration version at the time of sample.

2.7.5. Virtual Machine Statistics Views

Table 2.5. Historical Statistics for Each Virtual Machine in the System

Name Type Description
history_id bigint The unique ID of this row in the table.
history_datetime date The timestamp of this history row (rounded to minute, hour, day as per the aggregation level).
vm_id uuid Unique ID of the virtual machine in the system.
vm_status smallint
  • -1 - Unknown Status (used only to indicate problems with the ETL. Please notify Red Hat Support)
  • 0 - Down
  • 1 - Up
  • 2 - Paused
  • 3 - Problematic
seconds_in_status integer The total number of seconds that the virtual machine was in the status shown in the status column for the aggregation period. For example, if a virtual machine was up for 55 seconds and down for 5 seconds during a minute, two rows will show for this minute. One will have a status of Up and seconds_in_status, the other will have a status of Down and a seconds_in_status of 5.
minutes_in_status numeric(7,2) The total number of minutes that the virtual machine was in the status shown in the status column for the aggregation period. For example, if a virtual machine was up for 55 minutes and down for 5 minutes during an hour, two rows will show for this hour. One will have a status of Up and minutes_in_status, the other will have a status of Down and a minutes_in_status of 5.
cpu_usage_percent smallint The percentage of the CPU in use by the virtual machine.
max_cpu_usage smallint The maximum CPU usage for the aggregation period, expressed as a percentage. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
memory_usage_percent smallint Percentage of used memory in the virtual machine. The guest tools must be installed on the virtual machine for memory usage to be recorded.
max_memory_usage smallint The maximum memory usage for the aggregation period, expressed as a percentage. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value. The guest tools must be installed on the virtual machine for memory usage to be recorded.
user_cpu_usage_percent smallint Used user CPU percentage on the host.
max_user_cpu_usage_percent smallint The maximum user CPU usage for the aggregation period, expressed as a percentage. For hourly aggregations, this is the maximum collected sample value. For daily aggregation, it is the maximum hourly average value.
system_cpu_usage_percent smallint Used system CPU percentage on the host.
max_system_cpu_usage_percent smallint The maximum system CPU usage for the aggregation period, expressed as a percentage. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
vm_ip text The IP address of the first NIC. Only shown if the guest agent is installed.
currently_running_on_host uuid The unique ID of the host the virtual machine is running on.
current_user_id uuid The unique ID of the user logged into the virtual machine console, if the guest agent is installed.
disks_usage text The disk description. File systems type, mount point, total size, and used size.
vm_configuration_version integer The virtual machine configuration version at the time of sample.
current_host_configuration_version integer The host configuration version at the time of sample.
memory_buffered_kb bigint The amount of buffered memory on the virtual machine, in kilobytes (KB).
memory_cached_kb bigint The amount of cached memory on the virtual machine, in kilobytes (KB).
max_memory_buffered_kb bigint The maximum buffered memory for the aggregation period, in kilobytes (KB). For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
max_memory_cached_kb bigint The maximum cached memory for the aggregation period, in kilobytes (KB). For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.

2.7.6. Virtual Machine Interface Statistics Views

Table 2.6. Historical Statistics for the Virtual Machine Network Interfaces in the System

Name Type Description
history_id integer The unique ID of this row in the table.
history_datetime date The timestamp of this history row (rounded to minute, hour, day as per the aggregation level).
vm_interface_id uuid Unique ID of the interface in the system.
receive_rate_percent smallint Used receive rate percentage on the host.
max_receive_rate_percent smallint The maximum receive rate for the aggregation period, expressed as a percentage. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
transmit_rate_percent smallint Used transmit rate percentage on the host.
max_transmit_rate_percent smallint The maximum transmit rate for the aggregation period, expressed as a percentage. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average rate.
received_total_byte bigint The total number of bytes received by the virtual machine.
transmitted_total_byte bigint The total number of bytes transmitted from the virtual machine.
vm_interface_configuration_version integer The virtual machine interface configuration version at the time of sample.

2.7.7. Virtual Disk Statistics Views

Table 2.7. Historical Statistics for the Virtual Disks in the System

Name Type Description
history_id bigint The unique ID of this row in the table.
history_datetime date The timestamp of this history row (rounded to minute, hour, day as per the aggregation level).
vm_disk_id uuid Unique ID of the disk in the system.
vm_disk_status smallint
  • 0 - Unassigned
  • 1 - OK
  • 2 - Locked
  • 3 - Invalid
  • 4 - Illegal
seconds_in_status integer The total number of seconds that the virtual disk was in the status shown in the status column for the aggregation period. For example, if a virtual disk was locked for 55 seconds and OK for 5 seconds during a minute, two rows will show for this minute. One will have a status of Locked and seconds_in_status of 55, the other will have a status of OK and a seconds_in_status of 5.
minutes_in_status numeric(7,2) The total number of minutes that the virtual disk was in the status shown in the status column for the aggregation period. For example, if a virtual disk was locked for 55 minutes and OK for 5 minutes during an hour, two rows will show for this hour. One will have a status of Locked and minutes_in_status of 55, the other will have a status of OK and a minutes_in_status of 5.
vm_disk_actual_size_mb integer The actual size allocated to the disk.
read_rate_bytes_per_second integer Read rate to disk in bytes per second.
max_read_rate_bytes_per_second integer The maximum read rate for the aggregation period. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
read_latency_seconds numeric(18,9) The virtual disk read latency measured in seconds.
max_read_latency_seconds numeric(18,9) The maximum read latency for the aggregation period, measured in seconds. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
write_rate_bytes_per_second integer Write rate to disk in bytes per second.
max_write_rate_bytes_per_second integer The maximum write rate for the aggregation period. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
write_latency_seconds numeric(18,9) The virtual disk write latency measured in seconds.
max_write_latency_seconds numeric(18,9) The maximum write latency for the aggregation period, measured in seconds. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
flush_latency_seconds numeric(18,9) The virtual disk flush latency measured in seconds.
max_flush_latency_seconds numeric(18,9) The maximum flush latency for the aggregation period, measured in seconds. For hourly aggregations, this is the maximum collected sample value. For daily aggregations, it is the maximum hourly average value.
vm_disk_configuration_version integer The virtual disk configuration version at the time of sample.