Chapter 6. alarm
This chapter describes the commands under the alarm
command.
6.1. alarm create Copy linkLink copied to clipboard!
Usage:
Create 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 |
---|---|
--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 |
---|---|
--noindent | Whether to disable indenting the json |
Value | Summary |
---|---|
--prefix PREFIX | Add a prefix to all variable names |
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]}]}. |
This command is provided by the aodhclient plugin.
6.2. alarm delete Copy linkLink copied to clipboard!
Usage:
openstack alarm delete [-h] [--name <NAME>] [<ALARM ID or NAME>]
openstack alarm delete [-h] [--name <NAME>] [<ALARM ID or NAME>]
Delete an alarm
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 |
This command is provided by the aodhclient plugin.
6.3. alarm list Copy linkLink copied to clipboard!
Usage:
List alarms
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 |
---|---|
--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 |
---|---|
--noindent | Whether to disable indenting the json |
Value | Summary |
---|---|
--quote {all,minimal,none,nonnumeric} | when to include quotes, defaults to nonnumeric |
This command is provided by the aodhclient plugin.
6.4. alarm show Copy linkLink copied to clipboard!
Usage:
Show an alarm
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 |
---|---|
--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 |
---|---|
--noindent | Whether to disable indenting the json |
Value | Summary |
---|---|
--prefix PREFIX | Add a prefix to all variable names |
This command is provided by the aodhclient plugin.
6.5. alarm state get Copy linkLink copied to clipboard!
Usage:
Get state of an alarm
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 |
---|---|
--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 |
---|---|
--noindent | Whether to disable indenting the json |
Value | Summary |
---|---|
--prefix PREFIX | Add a prefix to all variable names |
This command is provided by the aodhclient plugin.
6.6. alarm state set Copy linkLink copied to clipboard!
Usage:
Set state of an alarm
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 |
---|---|
--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 |
---|---|
--noindent | Whether to disable indenting the json |
Value | Summary |
---|---|
--prefix PREFIX | Add a prefix to all variable names |
This command is provided by the aodhclient plugin.
6.7. alarm update Copy linkLink copied to clipboard!
Usage:
Update an alarm
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 |
---|---|
--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 |
---|---|
--noindent | Whether to disable indenting the json |
Value | Summary |
---|---|
--prefix PREFIX | Add a prefix to all variable names |
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]}]}. |
This command is provided by the aodhclient plugin.
6.8. alarm history search Copy linkLink copied to clipboard!
Usage:
Show history for all alarms based on 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 |
---|---|
--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 |
---|---|
--noindent | Whether to disable indenting the json |
Value | Summary |
---|---|
--quote {all,minimal,none,nonnumeric} | when to include quotes, defaults to nonnumeric |
This command is provided by the aodhclient plugin.
6.9. alarm history show Copy linkLink copied to clipboard!
Usage:
Show history for an alarm
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 |
---|---|
--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 |
---|---|
--noindent | Whether to disable indenting the json |
Value | Summary |
---|---|
--quote {all,minimal,none,nonnumeric} | when to include quotes, defaults to nonnumeric |
This command is provided by the aodhclient plugin.