Este conteúdo não está disponível no idioma selecionado.
Chapter 4. Optimize high-level overview
Create and execute 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:
- The administrator creates or schedules an audit.
- The audit creates an action plan.
- The action plan is either manually or automatically executed to complete the goal.
4.1. Creating an Optimize audit Copiar o linkLink copiado para a área de transferência!
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
Pick a goal:
openstack optimize goal listPick 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.
-
Replace
- 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.
-
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 typeCONTINUOUS. 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 eitherONESHOTorCONTINUOUS. -
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.
-
Replace
4.2. Starting Optimize action plans Copiar o linkLink copiado para a área de transferência!
Review and execute action plans to implement the infrastructure optimizations recommended by your audits. Starting action plans allows you to control when changes are applied, giving you the opportunity to verify recommendations before they affect your production environment.
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 execute 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
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 % | | | | | | | +--------------------------------------+--------------------------------------+-----------+---------------------------+-------------------------------+
Start the most recent
actionplanfor your audit:openstack optimize actionplan start <action_plan_id>Replace
<action_plan_id>with the ID of your most recentactionplan.NoteYou can only start the most recent
actionplan
Optional: You can remove old
actionplansfor 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.
-
Replace
4.3. Continuous audit scheduling Copiar o linkLink copiado para a área de transferência!
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-triggeroption inCONTINUOUSaudits if you want action plans to be run automatically. - interval
- Set using an interval either in seconds, or using CRON syntax.
- start-time
Set using UTC using the ISO 8601 format. Use one of the following examples:
-
2025-06-30 13:00:00 -
2025-06-30T13:00:00
-
- end-time
Set using UTC using 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
4.4. Continuous audit modification Copiar o linkLink copiado para a área de transferência!
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.
-
Replace
- 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.
-
Replace
- 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
-
Replace
- Delete a continuous audit
openstack optimize audit delete <uuid>Replace
<uuid>with the UUID of your audit.NoteYou must stop your continuous audit by setting the
statetoCANCELLEDbefore you can delete it.