Run optimization audits and action plans

Create and run audits to optimize your infrastructure by generating action plans that accomplish specific goals. Understanding the audit and action plan workflow helps you implement one-time optimizations or schedule continuous monitoring to maintain optimal resource utilization.

When you use Optimize (watcher), you create or schedule an audit, which then creates an action plan. An Optimize action plan describes the specific actions to be performed to accomplish predetermined goals, such as rebalancing. You can have an action plan created once, or many times for continuous audits. The following takes place for an action plan to be executed:

  1. The administrator creates or schedules an audit.
  2. The audit creates an action plan.
  3. The action plan is either manually or automatically executed to complete the goal.

Generate optimization recommendations with an audit

Create audits to help optimize your infrastructure based on your chosen goals and strategies. Running audits allows you to make data-driven decisions about resource management.

Procedure

  1. Pick a goal:
    openstack optimize goal list
  2. Pick a strategy to use with the goal:
    openstack optimize strategy list --goal <goal_name>
    • Replace <goal_name> with the name of the goal that you are using.
  3. View strategy parameters. Each strategy has its own parameters that can be used when creating an audit. For information about strategy parameters see Optimize service strategies.
  4. Decide whether to create a single audit immediately, or recurring audits so that your OpenStack infrastructure is continuously monitored and optimized. When you create an audit now, use type ONESHOT. For continuous audits, use type CONTINUOUS.
  5. Create the audit.
    openstack optimize audit create -g <goal> -s <strategy> -t <type> -p <parameter> --name <name>
    • Replace <goal> with your chosen goal.
    • Replace <strategy> with your chosen strategy.
    • Replace <type> with a type of either ONESHOT or CONTINUOUS.
    • Replace <parameter> with required parameters. The parameters available depend on your chosen strategy. This option can be specified multiple times.
    • Replace <name> with the name of your audit.

Apply infrastructure optimizations from action plans

Review and run action plans to implement the infrastructure optimizations recommended by your audits. Starting action plans allows you to control when changes are applied and gives you the opportunity to verify recommendations before they affect your production environment.

About this task

Optimize (watcher) goals and strategies are executed through action plans. Action plans are created after you create an audit. Action plans give you a chance to review the specific actions that will be taken on your cluster to accomplish the goal you have chosen.

When you create an audit, you can use the --auto-trigger option to automatically run the action plan that is created. This is helpful when you use the CONTINUOUS option. Without using --auto-trigger, recommended action plans accumulate until an OpenStack administrator starts the most recent action plan. Additionally, audits of type ONESHOT do not run with the --auto-trigger option.

You can list action plans by audit, start an action plan, and remove old action plans.

Procedure

  1. View the action plans associated with your audit:
    openstack optimize actionplan list --audit <audit_id>
    • Replace <audit_id> with the ID of your audit with associated action plans.

      Example output:

      +--------------------------------------+--------------------------------------+-----------+---------------------------+-------------------------------+
      | UUID                                 | Audit                                | State     | Updated At                | Global efficacy               |
      +--------------------------------------+--------------------------------------+-----------+---------------------------+-------------------------------+
      | 87ece8bd-c0bb-4e24-bbfc-a54cabccb8db | c77bb5b2-4171-40e8-80af-5e768502ada1 | SUCCEEDED | 2025-08-19T18:47:25+00:00 | Live_migrations_count: 0.00 % |
      |                                      |                                      |           |                           |                               |
      +--------------------------------------+--------------------------------------+-----------+---------------------------+-------------------------------+
  2. Start the most recent actionplan for your audit:
    openstack optimize actionplan start <action_plan_id>
    • Replace <action_plan_id> with the ID of your most recent actionplan. Note
      You can only start the most recent actionplan
  3. Optional: You can remove old actionplans for your audit:
    openstack optimize actionplan delete <action_plan_id>`
    • Replace <action_plan_id> with the ID of the action plan that you want to delete.

Continuous audit scheduling

Schedule recurring audits to continuously monitor and optimize your infrastructure at regular intervals. Using continuous audits ensures that your environment maintains optimal resource utilization as workloads change over time.

type
Set to CONTINUOUS
auto-trigger
Include the --auto-trigger option in CONTINUOUS audits if you want action plans to be run automatically.
interval
Set by using an interval either in seconds, or by using CRON syntax.
start-time

Set by using UTC in the ISO 8601 format. Use one of the following examples:

  • 2025-06-30 13:00:00
  • 2025-06-30T13:00:00
end-time

Set by using UTC in the ISO 8601 format. Use one of the following examples:

  • 2025-06-30 13:00:00
  • 2025-06-30T13:00:00

Example:

openstack optimize audit create -g workload_balancing -s workload_balance -t CONTINUOUS --interval "00 14 * * *"

When using type CONTINUOUS, you can also use the --start-time and --end-time parameters. These parameters allow you to: * Delay the beginning of a scheduled action plan creations. * Set an expiry for the ending of scheduled action plan creations. * Schedule a single run audit creation for a set time in the future.

For example, by setting a start-time value and end-time value such that only a single audit can be created within that window, a one time run is effectively created.

Example command:

openstack optimize audit create \
-g cluster_maintaining \
-s host_maintenance \
-t CONTINUOUS \
--start-time "2025-06-30 13:00:00" \
--end-time "2025-06-30 14:30:00" \
--interval "00 14 * * *" \
-p maintenance_node="compute-1" \
--auto-trigger \
--name compute1_maintenance_june_30

Continuous audit modification

Modify or remove continuous audits to adapt to changing infrastructure needs or correct configuration errors.

Stop a continuous audit

openstack optimize audit update <uuid> replace state=CANCELLED

  • Replace <uuid> with the UUID of your audit.
Modify the interval of an audit

openstack optimize audit update <uuid> replace interval=<interval>

  • Replace <uuid> with the UUID of your audit.
  • Replace <interval> with a time interval measured in seconds.
Modify the end time of an audit

openstack optimize audit update <uuid> replace end_time=<time>

  • Replace <uuid> with the UUID of your audit.
  • Replace <time> with the time in ISO 8601 format. For example: 2025-08-12T14:00:00
Delete a continuous audit

openstack optimize audit delete <uuid>

Replace <uuid> with the UUID of your audit.

Note
You must stop your continuous audit by setting the state to CANCELLED before you can delete it.