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>]
Value | Summary |
---|---|
-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 |
Value | Summary |
---|---|
-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 |
Value | Summary |
---|---|
--noindent | Whether to disable indenting the json |
Value | Summary |
---|---|
--prefix PREFIX | Add a prefix to all variable names |
Value | Summary |
---|---|
--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. |
Value | Summary |
---|---|
--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. |
Value | Summary |
---|---|
--event-type <EVENT_TYPE> | Event type to evaluate against |
Value | Summary |
---|---|
--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 |
Value | Summary |
---|---|
--resource-type <RESOURCE_TYPE> | The type of resource. |
--resource-id <RESOURCE_ID> | The id of a resource. |
Value | Summary |
---|---|
--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>]
Value | Summary |
---|---|
<ALARM ID or NAME> | Id or name of an alarm. |
Value | Summary |
---|---|
-h, --help | Show this help message and exit |
--name <NAME> | Name of the alarm |
7.3. alarm-history search
Show history for all alarms based on query
Usage:
openstack alarm-history search [-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]
Value | Summary |
---|---|
-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 |
Value | Summary |
---|---|
-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 |
Value | Summary |
---|---|
--quote {all,minimal,none,nonnumeric} | When to include quotes, defaults to nonnumeric |
Value | Summary |
---|---|
--noindent | Whether to disable indenting the json |
Value | Summary |
---|---|
--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.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>
Value | Summary |
---|---|
<alarm-id> | Id of an alarm |
Value | Summary |
---|---|
-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 |
Value | Summary |
---|---|
-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 |
Value | Summary |
---|---|
--quote {all,minimal,none,nonnumeric} | When to include quotes, defaults to nonnumeric |
Value | Summary |
---|---|
--noindent | Whether to disable indenting the json |
Value | Summary |
---|---|
--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>]
Value | Summary |
---|---|
-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 |
Value | Summary |
---|---|
-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 |
Value | Summary |
---|---|
--quote {all,minimal,none,nonnumeric} | When to include quotes, defaults to nonnumeric |
Value | Summary |
---|---|
--noindent | Whether to disable indenting the json |
Value | Summary |
---|---|
--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>]
Value | Summary |
---|---|
<ALARM ID or NAME> | Id or name of an alarm. |
Value | Summary |
---|---|
-h, --help | Show this help message and exit |
--name <NAME> | Name of the alarm |
Value | Summary |
---|---|
-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 |
Value | Summary |
---|---|
--noindent | Whether to disable indenting the json |
Value | Summary |
---|---|
--prefix PREFIX | Add a prefix to all variable names |
Value | Summary |
---|---|
--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>]
Value | Summary |
---|---|
<ALARM ID or NAME> | Id or name of an alarm. |
Value | Summary |
---|---|
-h, --help | Show this help message and exit |
--name <NAME> | Name of the alarm |
Value | Summary |
---|---|
-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 |
Value | Summary |
---|---|
--noindent | Whether to disable indenting the json |
Value | Summary |
---|---|
--prefix PREFIX | Add a prefix to all variable names |
Value | Summary |
---|---|
--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>]
Value | Summary |
---|---|
<ALARM ID or NAME> | Id or name of an alarm. |
Value | Summary |
---|---|
-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] |
Value | Summary |
---|---|
-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 |
Value | Summary |
---|---|
--noindent | Whether to disable indenting the json |
Value | Summary |
---|---|
--prefix PREFIX | Add a prefix to all variable names |
Value | Summary |
---|---|
--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>]
Value | Summary |
---|---|
<ALARM ID or NAME> | Id or name of an alarm. |
Value | Summary |
---|---|
-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 |
Value | Summary |
---|---|
-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 |
Value | Summary |
---|---|
--noindent | Whether to disable indenting the json |
Value | Summary |
---|---|
--prefix PREFIX | Add a prefix to all variable names |
Value | Summary |
---|---|
--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. |
Value | Summary |
---|---|
--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. |
Value | Summary |
---|---|
--event-type <EVENT_TYPE> | Event type to evaluate against |
Value | Summary |
---|---|
--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 |
Value | Summary |
---|---|
--resource-type <RESOURCE_TYPE> | The type of resource. |
--resource-id <RESOURCE_ID> | The id of a resource. |
Value | Summary |
---|---|
--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]}]}. |