Chapter 6. alarm


This chapter describes the commands under the alarm command.

6.1. alarm create

Usage:

openstack alarm create [-h] [-f {json,shell,table,value,yaml}]

                            [-c COLUMN] [--max-width <integer>]
                            [--fit-width] [--print-empty] [--noindent]
                            [--prefix PREFIX] --name <NAME> -t <TYPE>
                            [--project-id <PROJECT_ID>]
                            [--user-id <USER_ID>]
                            [--description <DESCRIPTION>] [--state <STATE>]
                            [--severity <SEVERITY>] [--enabled {True|False}]
                            [--alarm-action <Webhook URL>]
                            [--ok-action <Webhook URL>]
                            [--insufficient-data-action <Webhook URL>]
                            [--time-constraint <Time Constraint>]
                            [--repeat-actions {True|False}]
                            [--query <QUERY>]
                            [--comparison-operator <OPERATOR>]
                            [--evaluation-periods <EVAL_PERIODS>]
                            [--threshold <THRESHOLD>]
                            [--event-type <EVENT_TYPE>]
                            [--granularity <GRANULARITY>]
                            [--aggregation-method <AGGR_METHOD>]
                            [--metric <METRIC>]
                            [--resource-type <RESOURCE_TYPE>]
                            [--resource-id <RESOURCE_ID>]
                            [--composite-rule <COMPOSITE_RULE>]
Copy to Clipboard Toggle word wrap

Create an alarm

Expand
Table 6.1. Optional Arguments
ValueSummary

-h, --help

Show this help message and exit

--name <NAME>

Name of the alarm

-t <TYPE>, --type <TYPE>

Type of alarm, should be one of: event, composite, gnocchi_resources_threshold, gnocchi_aggregation_by_metrics_threshold, gnocchi_aggregation_by_resources_threshold.

--project-id <PROJECT_ID>

Project to associate with alarm (configurable by admin users only)

--user-id <USER_ID>

User to associate with alarm (configurable by admin users only)

--description <DESCRIPTION>

Free text description of the alarm

--state <STATE>

State of the alarm, one of: ['ok', 'alarm', 'insufficient data']

--severity <SEVERITY>

Severity of the alarm, one of: ['low', 'moderate', 'critical']

--enabled {True

False}

True if alarm evaluation is enabled

--alarm-action <Webhook URL>

URL to invoke when state transitions to alarm. May be used multiple times

--ok-action <Webhook URL>

URL to invoke when state transitions to OK. May be used multiple times

--insufficient-data-action <Webhook URL>

URL to invoke when state transitions to insufficient data. May be used multiple times

--time-constraint <Time Constraint>

Only evaluate the alarm if the time at evaluation is within this time constraint. Start point(s) of the constraint are specified with a cron expression, whereas its duration is given in seconds. Can be specified multiple times for multiple time constraints, format is: name=<CONSTRAINT_NAME>;start=< CRON>;duration=<SECONDS>;[description=<DESCRIPTION>;[t imezone=<IANA Timezone>]]

--repeat-actions {True

False}

True if actions should be repeatedly notified while alarm remains in target state

Expand
Table 6.2. Output Formatters
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

Expand
Table 6.3. Table Formatter
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

Expand
Table 6.4. JSON Formatter
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 6.5. shell formatter
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Expand
Table 6.6. common alarm rules
ValueSummary

--query <QUERY>

For alarms of type event: key[op]data_type::value; list. data_type is optional, but if supplied must be string, integer, float, or boolean. For alarms of type gnocchi_aggregation_by_resources_threshold: need to specify a complex query json string, like: {"and": [{"=": {"ended_at": null}}, …​]}.

--comparison-operator <OPERATOR>

Operator to compare with, one of: ['lt', 'le', 'eq', 'ne', 'ge', 'gt']

--evaluation-periods <EVAL_PERIODS>

Number of periods to evaluate over

--threshold <THRESHOLD>

Threshold to evaluate against.

Expand
Table 6.7. event alarm
ValueSummary

--event-type <EVENT_TYPE>

Event type to evaluate against

Expand
Table 6.8. common gnocchi alarm rules
ValueSummary

--granularity <GRANULARITY>

The time range in seconds over which to query.

--aggregation-method <AGGR_METHOD>

The aggregation_method to compare to the threshold.

--metric <METRIC>, --metrics <METRIC>

The metric id or name depending of the alarm type

Expand
Table 6.9. gnocchi resource threshold alarm
ValueSummary

--resource-type <RESOURCE_TYPE>

The type of resource.

--resource-id <RESOURCE_ID>

The id of a resource.

Expand
Table 6.10. composite alarm
ValueSummary

--composite-rule <COMPOSITE_RULE>

Composite threshold rule with JSON format, the form can be a nested dict which combine gnocchi rules by "and", "or". For example, the form is like: {"or":[RULE1, RULE2, {"and": [RULE3, RULE4]}]}.

This command is provided by the aodhclient plugin.

6.2. alarm delete

Usage:

openstack alarm delete [-h] [--name <NAME>] [<ALARM ID or NAME>]
Copy to Clipboard Toggle word wrap

Delete an alarm

Expand
Table 6.11. Positional Arguments
ValueSummary

<ALARM ID or NAME>

Id or name of an alarm.

Expand
Table 6.12. Optional Arguments
ValueSummary

-h, --help

Show this help message and exit

--name <NAME>

Name of the alarm

This command is provided by the aodhclient plugin.

6.3. alarm list

Usage:

openstack alarm list [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN]

                          [--max-width <integer>] [--fit-width]
                          [--print-empty] [--noindent]
                          [--quote {all,minimal,none,nonnumeric}]
                          [--sort-column SORT_COLUMN]
                          [--query QUERY | --filter <KEY1=VALUE1;KEY2=VALUE2...>]
                          [--limit <LIMIT>] [--marker <MARKER>]
                          [--sort <SORT_KEY:SORT_DIR>]
Copy to Clipboard Toggle word wrap

List alarms

Expand
Table 6.13. Optional Arguments
ValueSummary

-h, --help

Show this help message and exit

--query QUERY

Rich query supported by aodh, e.g. project_id!=my-id user_id=foo or user_id=bar

--filter <KEY1=VALUE1;KEY2=VALUE2…​>

Filter parameters to apply on returned alarms.

--limit <LIMIT>

Number of resources to return (default is server default)

--marker <MARKER>

Last item of the previous listing. return the next results after this value,the supported marker is alarm_id.

--sort <SORT_KEY:SORT_DIR>

Sort of resource attribute, e.g. name:asc

Expand
Table 6.14. Output Formatters
ValueSummary

-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

Expand
Table 6.15. Table Formatter
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

Expand
Table 6.16. JSON Formatter
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 6.17. CSV Formatter
ValueSummary

--quote {all,minimal,none,nonnumeric}

when to include quotes, defaults to nonnumeric

This command is provided by the aodhclient plugin.

6.4. alarm show

Usage:

openstack alarm show [-h] [-f {json,shell,table,value,yaml}]

                          [-c COLUMN] [--max-width <integer>] [--fit-width]
                          [--print-empty] [--noindent] [--prefix PREFIX]
                          [--name <NAME>]
                          [<ALARM ID or NAME>]
Copy to Clipboard Toggle word wrap

Show an alarm

Expand
Table 6.18. Positional Arguments
ValueSummary

<ALARM ID or NAME>

Id or name of an alarm.

Expand
Table 6.19. Optional Arguments
ValueSummary

-h, --help

Show this help message and exit

--name <NAME>

Name of the alarm

Expand
Table 6.20. Output Formatters
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

Expand
Table 6.21. Table Formatter
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

Expand
Table 6.22. JSON Formatter
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 6.23. shell formatter
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

This command is provided by the aodhclient plugin.

6.5. alarm state get

Usage:

openstack alarm state get [-h] [-f {json,shell,table,value,yaml}]

                               [-c COLUMN] [--max-width <integer>]
                               [--fit-width] [--print-empty] [--noindent]
                               [--prefix PREFIX] [--name <NAME>]
                               [<ALARM ID or NAME>]
Copy to Clipboard Toggle word wrap

Get state of an alarm

Expand
Table 6.24. Positional Arguments
ValueSummary

<ALARM ID or NAME>

Id or name of an alarm.

Expand
Table 6.25. Optional Arguments
ValueSummary

-h, --help

Show this help message and exit

--name <NAME>

Name of the alarm

Expand
Table 6.26. Output Formatters
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

Expand
Table 6.27. Table Formatter
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

Expand
Table 6.28. JSON Formatter
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 6.29. shell formatter
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

This command is provided by the aodhclient plugin.

6.6. alarm state set

Usage:

openstack alarm state set [-h] [-f {json,shell,table,value,yaml}]

                               [-c COLUMN] [--max-width <integer>]
                               [--fit-width] [--print-empty] [--noindent]
                               [--prefix PREFIX] [--name <NAME>] --state
                               <STATE>
                               [<ALARM ID or NAME>]
Copy to Clipboard Toggle word wrap

Set state of an alarm

Expand
Table 6.30. Positional Arguments
ValueSummary

<ALARM ID or NAME>

Id or name of an alarm.

Expand
Table 6.31. Optional Arguments
ValueSummary

-h, --help

Show this help message and exit

--name <NAME>

Name of the alarm

--state <STATE>

State of the alarm, one of: ['ok', 'alarm', 'insufficient data']

Expand
Table 6.32. Output Formatters
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

Expand
Table 6.33. Table Formatter
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

Expand
Table 6.34. JSON Formatter
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 6.35. shell formatter
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

This command is provided by the aodhclient plugin.

6.7. alarm update

Usage:

openstack alarm update [-h] [-f {json,shell,table,value,yaml}]

                            [-c COLUMN] [--max-width <integer>]
                            [--fit-width] [--print-empty] [--noindent]
                            [--prefix PREFIX] [--name <NAME>] [-t <TYPE>]
                            [--project-id <PROJECT_ID>]
                            [--user-id <USER_ID>]
                            [--description <DESCRIPTION>] [--state <STATE>]
                            [--severity <SEVERITY>] [--enabled {True|False}]
                            [--alarm-action <Webhook URL>]
                            [--ok-action <Webhook URL>]
                            [--insufficient-data-action <Webhook URL>]
                            [--time-constraint <Time Constraint>]
                            [--repeat-actions {True|False}]
                            [--query <QUERY>]
                            [--comparison-operator <OPERATOR>]
                            [--evaluation-periods <EVAL_PERIODS>]
                            [--threshold <THRESHOLD>]
                            [--event-type <EVENT_TYPE>]
                            [--granularity <GRANULARITY>]
                            [--aggregation-method <AGGR_METHOD>]
                            [--metric <METRIC>]
                            [--resource-type <RESOURCE_TYPE>]
                            [--resource-id <RESOURCE_ID>]
                            [--composite-rule <COMPOSITE_RULE>]
                            [<ALARM ID or NAME>]
Copy to Clipboard Toggle word wrap

Update an alarm

Expand
Table 6.36. Positional Arguments
ValueSummary

<ALARM ID or NAME>

Id or name of an alarm.

Expand
Table 6.37. Optional Arguments
ValueSummary

-h, --help

Show this help message and exit

--name <NAME>

Name of the alarm

-t <TYPE>, --type <TYPE>

Type of alarm, should be one of: event, composite, gnocchi_resources_threshold, gnocchi_aggregation_by_metrics_threshold, gnocchi_aggregation_by_resources_threshold.

--project-id <PROJECT_ID>

Project to associate with alarm (configurable by admin users only)

--user-id <USER_ID>

User to associate with alarm (configurable by admin users only)

--description <DESCRIPTION>

Free text description of the alarm

--state <STATE>

State of the alarm, one of: ['ok', 'alarm', 'insufficient data']

--severity <SEVERITY>

Severity of the alarm, one of: ['low', 'moderate', 'critical']

--enabled {True

False}

True if alarm evaluation is enabled

--alarm-action <Webhook URL>

URL to invoke when state transitions to alarm. May be used multiple times

--ok-action <Webhook URL>

URL to invoke when state transitions to OK. May be used multiple times

--insufficient-data-action <Webhook URL>

URL to invoke when state transitions to insufficient data. May be used multiple times

--time-constraint <Time Constraint>

Only evaluate the alarm if the time at evaluation is within this time constraint. Start point(s) of the constraint are specified with a cron expression, whereas its duration is given in seconds. Can be specified multiple times for multiple time constraints, format is: name=<CONSTRAINT_NAME>;start=< CRON>;duration=<SECONDS>;[description=<DESCRIPTION>;[t imezone=<IANA Timezone>]]

--repeat-actions {True

False}

True if actions should be repeatedly notified while alarm remains in target state

Expand
Table 6.38. Output Formatters
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

Expand
Table 6.39. Table Formatter
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

Expand
Table 6.40. JSON Formatter
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 6.41. shell formatter
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Expand
Table 6.42. common alarm rules
ValueSummary

--query <QUERY>

For alarms of type event: key[op]data_type::value; list. data_type is optional, but if supplied must be string, integer, float, or boolean. For alarms of type gnocchi_aggregation_by_resources_threshold: need to specify a complex query json string, like: {"and": [{"=": {"ended_at": null}}, …​]}.

--comparison-operator <OPERATOR>

Operator to compare with, one of: ['lt', 'le', 'eq', 'ne', 'ge', 'gt']

--evaluation-periods <EVAL_PERIODS>

Number of periods to evaluate over

--threshold <THRESHOLD>

Threshold to evaluate against.

Expand
Table 6.43. event alarm
ValueSummary

--event-type <EVENT_TYPE>

Event type to evaluate against

Expand
Table 6.44. common gnocchi alarm rules
ValueSummary

--granularity <GRANULARITY>

The time range in seconds over which to query.

--aggregation-method <AGGR_METHOD>

The aggregation_method to compare to the threshold.

--metric <METRIC>, --metrics <METRIC>

The metric id or name depending of the alarm type

Expand
Table 6.45. gnocchi resource threshold alarm
ValueSummary

--resource-type <RESOURCE_TYPE>

The type of resource.

--resource-id <RESOURCE_ID>

The id of a resource.

Expand
Table 6.46. composite alarm
ValueSummary

--composite-rule <COMPOSITE_RULE>

Composite threshold rule with JSON format, the form can be a nested dict which combine gnocchi rules by "and", "or". For example, the form is like: {"or":[RULE1, RULE2, {"and": [RULE3, RULE4]}]}.

This command is provided by the aodhclient plugin.

6.9. alarm history show

Usage:

openstack alarm-history show [-h] [-f {csv,json,table,value,yaml}]

                                  [-c COLUMN] [--max-width <integer>]
                                  [--fit-width] [--print-empty] [--noindent]
                                  [--quote {all,minimal,none,nonnumeric}]
                                  [--sort-column SORT_COLUMN]
                                  [--limit <LIMIT>] [--marker <MARKER>]
                                  [--sort <SORT_KEY:SORT_DIR>]
                                  alarm_id
Copy to Clipboard Toggle word wrap

Show history for an alarm

Expand
Table 6.52. Positional Arguments
ValueSummary

alarm_id

Id of an alarm

Expand
Table 6.53. Optional Arguments
ValueSummary

-h, --help

Show this help message and exit

--limit <LIMIT>

Number of resources to return (default is server default)

--marker <MARKER>

Last item of the previous listing. return the next results after this value,the supported marker is event_id.

--sort <SORT_KEY:SORT_DIR>

Sort of resource attribute. e.g. timestamp:desc

Expand
Table 6.54. Output Formatters
ValueSummary

-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

Expand
Table 6.55. Table Formatter
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

Expand
Table 6.56. JSON Formatter
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 6.57. CSV Formatter
ValueSummary

--quote {all,minimal,none,nonnumeric}

when to include quotes, defaults to nonnumeric

This command is provided by the aodhclient plugin.

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat