VMware vCenter - Accessing Data

About VMware vCenter

The SAS IT Resource Management adapter for VMware vCenter reads data from the vCenter external Oracle or Microsoft SQL Server database. For vCenter releases prior to 5.5, the SAS IT Resource Management adapter for VMware vCenter can also read data from IBM DB2 database. (VMware dropped support for IBM DB2 after this release.)
Note: The SAS IT Resource Management adapter for VMware vCenter cannot read from the VMware vCenter local PostgreSQL database. VMware implements the embedded PostgresSQL database as a closed system to which access is not permitted.
The VMware vCenter Server can be installed on a Microsoft Windows server. Beginning with VMware 5.x, it can be deployed by using the vCenter Server Appliance to a virtual machine that operates under Linux.
  • For VMware installations on Microsoft Windows, SAS IT Resource Management recommends that the VMware vCenter server be installed with an external Oracle, Microsoft SQL Server database, or for VMware vCenter releases prior to 5.5 an IBM DB2 database.
  • For VMware vCenter Server Appliance deployments to a virtual machine that operates under Linux, SAS IT Resource Management recommends that the VMware vCenter server be installed with an external Oracle database.

VMware Data Collection Process

VMware data collection intervals determine the duration for which statistics are aggregated, calculated, rolled up, and archived. The data collection level determines the amount of data gathered and which counters are available for reporting. The Data Collection Interval along with the data collection level determines how much statistical data is gathered and stored in the database.

VMware Data Collection Level

VMware enables you to control the amount of data that is gathered and the counters that are available by using the data collection level (also known as the statistics levels). This level is set in the vSphere client and can be a value between 1 and 4. The SAS IT Resource Management adapter for VMware vCenter is designed to process the data collected using a data collection level of up to 3. (The adapter also operates as expected with a data collection level of 4.)
CAUTION:
Data collection level should not be set to a value less than 3.
If the data collection level is less than 3, then some of the values in the supplied SAS IT Resource Management data model will be missing.
Data Collection Level 3 satisfies the requirements of all the reports that are supplied by VMware. The adapter stages and processes the 5-minute frequency (1 Day) Data Collection Interval of VMware measurements that are made available in the vCenter database. (SAS IT Resource Management processes only the vCenter 5-minute frequency data. This ensures that the statistics that are calculated are as statistically valid as possible.)
VMware might average the statistics multiple times while these values are rolled up to higher collection intervals. The SAS IT Resource Management solution accounts for that possibility. For example, the statistic CPU usage is rolled up by computing the average CPU usage for a time period according to the following formulas:
  • past_week_CPU_usage=Average(past_day_CPU_usage)
  • past_month_CPU_usage=Average(past_week_CPU_usage)
  • past_year_CPU_usage=Average(past_month_CPU_usage)
Note: SAS IT Resource Management does not provide an option to process only summarized measurements from the vCenter database as an alternative to working from the more granular 5-minute frequency measurements.

Overview of Limiting the Data in the Events and Tasks Staged Table

Tip
Users should take care when staging the VMware Tasks and Events tables due to the potentially huge amount of data that exists in the input database for these tables.
The table in the vCenter database contains data for the Events staged table. This data consists of a record for each event that is the result of a task or alarm in vCenter. The table in the vCenter database contains data for the Tasks staged table. This data consists of a record for each task (power on or off of a virtual machine, alarm created, and so on) that occurs in vCenter. To limit the potential for large amounts of data for these two tables, you can do either one of the following precautions:
  • Define a datetime range for which data should be loaded for each of these staged tables.
  • Specify the last number of days for which data should be loaded for each of these tables.

Limiting the VMware Data in the Events Table

If the Events staged table is added to a VMware vCenter staging job, do one of the following two procedures:
  • To define a datetime range for which data should be loaded for each of these staged tables, edit the generated code for the staging job by adding the following code:
    %let ITRM_LoadEventsFromDate = <start-datetime>;
    %let ITRM_LoadEventsToDate = <end-datetime>;
    The following code is an example of how to specify the datetime range.
    %let ITRM_LoadEventsFromDate = 12APR2010:00:00; 
    %let ITRM_LoadEventsToDate = 13APR2010:00:00;  
    By setting these two macro variables to a valid datetime range, the staging job would load data for the Events table that falls within the specified range.
  • You can specify the last number of days for which data should be loaded for each of these tables. To do so, edit the generated code for the staging job by adding the following code:
    %let ITRM_LoadEventsForDays = <number-of-days>;
    The following code is an example of how to specify the last number of days for which data should be loaded.
    %let ITRM_LoadEventsForDays = 3;
    By setting this macro variable to a valid positive integer, the staging job loads data for the Events table for the last number of days that you specified. In the preceding example, the staging job populates the Events staged table with data for the past three days.
Note: Specify the values for these macro variables in Coordinated Universal Time (UTC). (UTC time is the same as Greenwich Mean Time (GMT).)

Limiting the VMware Data in the Tasks Table

If the Tasks staged table is added to a VMware vCenter staging job, do one of the two following procedures:
  • To define a datetime range for which data should be loaded for each of these staged tables, edit the generated code for the staging job by adding the following code:
    %let ITRM_LoadTasksFromDate = <start-datetime>;
    %let ITRM_LoadTasksToDate = <end-datetime>;
    The following example shows how to specify datetime range.
    %let ITRM_LoadTasksFromDate = 12APR2010:00:00;  
    %let ITRM_LoadTasksToDate = 13APR2010:00:00; 
    By setting these two macro variables to a valid datetime range, the staging job would load data for the Tasks table that falls within the specified range.
  • You can specify the last number of days for which data should be loaded for each of these tables. To do so, edit the generated code for the staging job by adding the following code:
    %let ITRM_LoadTasksForDays = <number-of-days>;
    The following code is an example of how to specify the last number of days for which data should be loaded.
    %let ITRM_LoadTasksForDays = 3;
    By setting this macro variable to a valid positive integer, the staging job loads data for the Tasks table for the last number of days that you specify. In the preceding example, the staging job populates the Tasks staged table with data for the past three days.
Note: Specify the values for these macro variables in Coordinated Universal Time (UTC). (UTC time is the same as Greenwich Mean Time (GMT).)

VMware Statistics Tables

Prior to VMwarevCenter 5.1, the vCenter database contained four VPX_HIST_STAT [1–4] tables. The performance metrics for past day, week, month, and year were collected and stored in those four VPX_HIST_STAT tables. Starting with VMwarevCenter vCenter Server 5.1, the performance metrics are stored in multiple dynamic tables. The statistics tables are redesigned, and partitioned statistics tables are created and are available as VPX_HIST_STAT [1-4 ]_n tables. Views for the VPX_HIST_STAT[1-4] tables are created.
The SAS IT Resource Management VMware adapter stages all performance metrics in statistics tables in the vCenter 6.0 database as it did with prior versions of VMware vCenter. The SAS IT Resource Management VMware adapter accesses the VPX_HIST_STAT1 view and creates a SAS data set that contains the vCenter statistics for the past day.