Maintaining the Commander Database

In large, busy environments, it can be useful to purge historical data. Purging historical data helps minimize database size and maintain Commander performance. You can select the types of data to purge and specify the age at which data purge is triggered.

In a new installation of Commander, a default Purge Historical Data task runs weekly, purging events and tasks older than a year. See Scheduling Purge Historical Data tasks below to learn how to disable or edit this task.

Best Practice: Embotics recommends that you use a monitoring solution to make sure you don't run out of disk space unexpectedly.

See also the following Knowledge Base articles:

In this topic:

Important considerations before purging data

  • Caution: Data that's purged from the Commander database is permanently deleted. Embotics recommends taking great caution if you want to delete records from your database. Always back up your database before performing a purge.
  • You may want to generate a VM Billing Report before purging billing records.
  • Commander performance may be impacted while the data purge task is running. Consider running the purge during a time when the system is not busy (at the end of the wizard, you can choose to run the purge later).

Purging historical data

Access through:

Configuration > System

Available to:

Commander Role of Superuser

To purge historical data:

  1. Click the Maintenance tab.
  2. On the Maintenance page, click Start Wizard.
  3. In the Purge Data wizard, on the Choose Data Type page, do the following, then click Next:
    • Select one or more of the following data types:

      Data Type

      Description

      Alerts

      A message generated by Commander when an event or task that has been started requires attention. Alerts are sent out by Commander when a policy has been triggered.

      Events

      A record of activities that have occurred in your virtualized infrastructure. You can see all events that have taken place through the information panel accessed through the historical Events tab.

      Historical Reporting Data

      Events generated before the managed system was added to Commander; used to produce reports.

      Tasks

      A user-initiated action that appears under the Tasks tab.

      VM Performance Data

      The data that Commander displays on the Performance tab for a VM. If you purge this data, performance data for the VMs in your virtualized infrastructure will be set to "unknown" for the relevant dates. See also Monitoring Performance Metrics for VMs, Hosts, and Clusters.

      Billing Records

      A record of current VM costs, generated nightly from values entered in cost models. Billing records are also generated automatically for retrieved historical events. Billing records form the basis for reports such as the VM Billing Report and the VM Comparative Economics Report. See Configuring Cost Models for details.

    • To specify the age at which data purge is triggered, select values from the Purge all data older than menus.
  4. On the Perform Maintenance page, review the summary information, and do one of the following:
    • To purge the data now, enable Confirm purge and click Purge Now.
    • To run this task later or schedule it to run regularly, click Schedule. See the next section for details.

Scheduling Purge Historical Data tasks

In large, busy environments, it can be useful to purge historical data on a regular basis. Purging historical data helps minimize database size and maintain Commander performance. Commander allows you to schedule a regular automatic data purge task. You select the types of data to purge and specify the age at which data purge is triggered. You can create multiple tasks if you need to purge different types of data on different schedules.

Important Considerations Before Purging Data

  • Caution: Data that's purged from the Commander database is permanently deleted. Embotics recommends taking great caution if you want to delete records from your database. Always back up your database before performing a purge.
  • Schedule a data purge at a time when the system isn't busy, so that Commander performance is not impacted.
  • You may want to schedule a VM Billing Report task before a scheduled purge billing records task. To do this: 1) Generate the VM Billing Report with the desired parameters. 2) Save the current parameters as a Create a report template. 3) Create a scheduled Report task, using the VM Billing template you saved.
  • In a new installation of Commander, a default Purge Historical Data task runs weekly, purging events and tasks older than a year. To disable this scheduled task, double-click it on the Scheduled Tasks page and deselect Enabled on the Scheduling page. You can also change the data types or the schedule for this default scheduled task.

Access through:

Tools > Scheduled Tasks

Available to:

Superuser

To schedule a Purge Historical Data task:

  1. On the Scheduled Tasks page, click Add.
  2. In the Configure Scheduled Task wizard, on the Task page, select Purge Historical Data, then click Next.
  3. On the Purge Historical Data page, do the following:
    • Provide a name for the purge task. This name can't be edited later.
    • Choose one or more data types:

      Data Type

      Description

      Alerts

      A message generated by Commander when an event or task that has been started requires attention. Alerts are sent out by Commander when a policy has been triggered.

      Events

      A record of activities that have occurred in your virtualized infrastructure. You can see all events that have taken place through the information panel accessed through the historical Events tab.

      Historical Reporting Data

      Events generated before the managed system was added to Commander; used to produce reports.

      Tasks

      A user-initiated action that appears under the Tasks tab.

      VM Performance Data

      The data that Commander displays on the Performance tab for a VM. If you purge this data, performance data for the VMs in your virtualized infrastructure will be set to "unknown" for the relevant dates. See also Monitoring Performance Metrics for VMs, Hosts, and Clusters.

      Billing Records

      A record of current VM costs, generated nightly from values entered in cost models. Billing records are also generated automatically for retrieved historical events. Billing records form the basis for reports such as the VM Billing Report and the VM Comparative Economics Report. See Configuring Cost Models for details.

    • Specify the age at which data purge is triggered. Note that you can specify only one age trigger per scheduled task. To specify different ages for different data types, create multiple scheduled tasks.
  4. On the Scheduling page, do the following:
    • To have scheduling take effect immediately, select Enabled. (You can edit the scheduled task at any time to enable or disable it.)
    • To schedule the frequency and the time for the task, select when you want the task to occur: daily, weekly, monthly, or weekdays. You can also specify that the task be performed only once (in which case the task will be removed from the Scheduled Tasks list after it has been run).
      If you selected a weekly or monthly frequency, select the day of the week or the month from the drop-down menu.

      If you select 31 for Day of Month for a monthly frequency, Commander automatically adjusts the day to reflect the last day of any given month. The same adjustment is made if you select 29 or 30 for February.

  5. On the Summary page, review the details and click Finish.

    The scheduled task appears in the list of scheduled tasks.

Configuring the schedule for the Database Maintenance task

If you upgraded Commander, a database maintenance scheduled task is scheduled to run once on the Saturday following the upgrade, at 2:00 a.m. This task creates database indexes which speed up managed system reconnection and Commander service restart. Once the scheduled task has run successfully, the scheduled task is automatically deleted. It's not possible to delete this task manually. You can change the time when this scheduled task runs.

This scheduled task doesn't exist in a fresh installation of Commander, because the indexes are created during installation.

Access through:

Tools > Scheduled Tasks

Available to:

All Access Rights Levels

Superuser and Enterprise Admin can Disable or Override Schedule

To edit the schedule for the database maintenance task:

  1. On the Scheduled Tasks page, select the Database Maintenance task type and click Edit.
  2. In the Configure Scheduled Task dialog, on the Scheduling page, change the schedule, then click Next.
  3. On the Summary page, click Finish.