Este contenido no está disponible en el idioma seleccionado.

Chapter 7. alarm


This chapter describes the commands under the alarm command.

7.1. alarm create

Create an alarm

Usage:

openstack alarm create [-h] [-f {json,shell,table,value,yaml}]
                              [-c COLUMN] [--noindent] [--prefix PREFIX]
                              [--max-width <integer>] [--fit-width]
                              [--print-empty] --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>]

Table 7.1. Command 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

Table 7.2. Output formatter options
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

Table 7.3. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 7.4. Shell formatter options
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Table 7.5. Table formatter options
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.

Table 7.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.

Table 7.7. event alarm
ValueSummary

--event-type <EVENT_TYPE>

Event type to evaluate against

Table 7.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

Table 7.9. gnocchi resource threshold alarm
ValueSummary

--resource-type <RESOURCE_TYPE>

The type of resource.

--resource-id <RESOURCE_ID>

The id of a resource.

Table 7.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]}]}.

7.2. alarm delete

Delete an alarm

Usage:

openstack alarm delete [-h] [--name <NAME>] [<ALARM ID or NAME>]

Table 7.11. Positional arguments
ValueSummary

<ALARM ID or NAME>

Id or name of an alarm.

Table 7.12. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--name <NAME>

Name of the alarm

7.4. alarm-history show

Show history for an alarm

Usage:

openstack alarm-history show [-h] [-f {csv,json,table,value,yaml}]
                                    [-c COLUMN]
                                    [--quote {all,minimal,none,nonnumeric}]
                                    [--noindent] [--max-width <integer>]
                                    [--fit-width] [--print-empty]
                                    [--sort-column SORT_COLUMN]
                                    [--limit <LIMIT>] [--marker <MARKER>]
                                    [--sort <SORT_KEY:SORT_DIR>]
                                    <alarm-id>

Table 7.18. Positional arguments
ValueSummary

<alarm-id>

Id of an alarm

Table 7.19. Command 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

Table 7.20. Output formatter options
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

Table 7.21. CSV formatter options
ValueSummary

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

When to include quotes, defaults to nonnumeric

Table 7.22. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 7.23. Table formatter options
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.

7.5. alarm list

List alarms

Usage:

openstack alarm list [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN]
                            [--quote {all,minimal,none,nonnumeric}]
                            [--noindent] [--max-width <integer>] [--fit-width]
                            [--print-empty] [--sort-column SORT_COLUMN]
                            [--query QUERY | --filter <KEY1=VALUE1;KEY2=VALUE2...>]
                            [--limit <LIMIT>] [--marker <MARKER>]
                            [--sort <SORT_KEY:SORT_DIR>]

Table 7.24. Command 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

Table 7.25. Output formatter options
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

Table 7.26. CSV formatter options
ValueSummary

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

When to include quotes, defaults to nonnumeric

Table 7.27. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 7.28. Table formatter options
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.

7.6. alarm show

Show an alarm

Usage:

openstack alarm show [-h] [-f {json,shell,table,value,yaml}]
                            [-c COLUMN] [--noindent] [--prefix PREFIX]
                            [--max-width <integer>] [--fit-width]
                            [--print-empty] [--name <NAME>]
                            [<ALARM ID or NAME>]

Table 7.29. Positional arguments
ValueSummary

<ALARM ID or NAME>

Id or name of an alarm.

Table 7.30. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--name <NAME>

Name of the alarm

Table 7.31. Output formatter options
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

Table 7.32. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 7.33. Shell formatter options
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Table 7.34. Table formatter options
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.

7.7. alarm state get

Get state of an alarm

Usage:

openstack alarm state get [-h] [-f {json,shell,table,value,yaml}]
                                 [-c COLUMN] [--noindent] [--prefix PREFIX]
                                 [--max-width <integer>] [--fit-width]
                                 [--print-empty] [--name <NAME>]
                                 [<ALARM ID or NAME>]

Table 7.35. Positional arguments
ValueSummary

<ALARM ID or NAME>

Id or name of an alarm.

Table 7.36. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--name <NAME>

Name of the alarm

Table 7.37. Output formatter options
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

Table 7.38. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 7.39. Shell formatter options
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Table 7.40. Table formatter options
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.

7.8. alarm state set

Set state of an alarm

Usage:

openstack alarm state set [-h] [-f {json,shell,table,value,yaml}]
                                 [-c COLUMN] [--noindent] [--prefix PREFIX]
                                 [--max-width <integer>] [--fit-width]
                                 [--print-empty] [--name <NAME>] --state
                                 <STATE>
                                 [<ALARM ID or NAME>]

Table 7.41. Positional arguments
ValueSummary

<ALARM ID or NAME>

Id or name of an alarm.

Table 7.42. Command 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]

Table 7.43. Output formatter options
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

Table 7.44. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 7.45. Shell formatter options
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Table 7.46. Table formatter options
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.

7.9. alarm update

Update an alarm

Usage:

openstack alarm update [-h] [-f {json,shell,table,value,yaml}]
                              [-c COLUMN] [--noindent] [--prefix PREFIX]
                              [--max-width <integer>] [--fit-width]
                              [--print-empty] [--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>]

Table 7.47. Positional arguments
ValueSummary

<ALARM ID or NAME>

Id or name of an alarm.

Table 7.48. Command 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

Table 7.49. Output formatter options
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

Table 7.50. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 7.51. Shell formatter options
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Table 7.52. Table formatter options
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.

Table 7.53. 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.

Table 7.54. event alarm
ValueSummary

--event-type <EVENT_TYPE>

Event type to evaluate against

Table 7.55. 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

Table 7.56. gnocchi resource threshold alarm
ValueSummary

--resource-type <RESOURCE_TYPE>

The type of resource.

--resource-id <RESOURCE_ID>

The id of a resource.

Table 7.57. 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]}]}.

Red Hat logoGithubRedditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

© 2024 Red Hat, Inc.