Chapter 47. metric
This chapter describes the commands under the metric command.
47.1. metric clean-tombstones Copy linkLink copied to clipboard!
Remove deleted data from disk and clean up the existing tombstones.
Usage:
openstack metric clean-tombstones [-h] [--dev] [--messy]
[--disable-rbac]
openstack metric clean-tombstones [-h] [--dev] [--messy]
[--disable-rbac]
| Value | Summary |
|---|---|
| -h, --help | Show this help message and exit |
| --dev | Enable development output. |
| --messy | Disable cleanup of temporary files. |
| --disable-rbac | Disable rbac injection |
47.2. metric delete Copy linkLink copied to clipboard!
Delete data for a selected series and time range.
Usage:
openstack metric delete [-h] [--dev] [--messy] [--disable-rbac]
[--start START] [--end END]
matches [matches ...]
openstack metric delete [-h] [--dev] [--messy] [--disable-rbac]
[--start START] [--end END]
matches [matches ...]
| Value | Summary |
|---|---|
| matches | Series selector, that selects the series to delete. specify multiple selectors delimited by space to delete multiple series. |
| Value | Summary |
|---|---|
| -h, --help | Show this help message and exit |
| --dev | Enable development output. |
| --messy | Disable cleanup of temporary files. |
| --disable-rbac | Disable rbac injection |
| --start START | Start timestamp in rfc3339 or unix timestamp. defaults to minimum possible timestamp. |
| --end END | End timestamp in rfc3339 or unix timestamp. defaults to maximum possible timestamp. |
47.3. metric list Copy linkLink copied to clipboard!
Query prometheus for list of all metrics.
Usage:
| Value | Summary |
|---|---|
| -h, --help | Show this help message and exit |
| --dev | Enable development output. |
| --messy | Disable cleanup of temporary files. |
| --disable-rbac | Disable rbac injection |
| 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 to show multiple columns |
| --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 |
| --sort-ascending | Sort the column(s) in ascending order |
| --sort-descending | Sort the column(s) in descending order |
| 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. |
47.4. metric query Copy linkLink copied to clipboard!
Query prometheus with a custom query string.
Usage:
| Value | Summary |
|---|---|
| query | Custom promql query |
| Value | Summary |
|---|---|
| -h, --help | Show this help message and exit |
| --dev | Enable development output. |
| --messy | Disable cleanup of temporary files. |
| --disable-rbac | Disable rbac injection |
| 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 to show multiple columns |
| --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 |
| --sort-ascending | Sort the column(s) in ascending order |
| --sort-descending | Sort the column(s) in descending order |
| 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. |
47.5. metric show Copy linkLink copied to clipboard!
Query prometheus for the current value of metric.
Usage:
| Value | Summary |
|---|---|
| name | Name of the metric to show |
| Value | Summary |
|---|---|
| -h, --help | Show this help message and exit |
| --dev | Enable development output. |
| --messy | Disable cleanup of temporary files. |
| --disable-rbac | Disable rbac injection |
| 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 to show multiple columns |
| --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 |
| --sort-ascending | Sort the column(s) in ascending order |
| --sort-descending | Sort the column(s) in descending order |
| 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. |
47.6. metric snapshot Copy linkLink copied to clipboard!
Base class for metric commands.
Usage:
| Value | Summary |
|---|---|
| -h, --help | Show this help message and exit |
| --dev | Enable development output. |
| --messy | Disable cleanup of temporary files. |
| --disable-rbac | Disable rbac injection |
| 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 to show multiple columns |
| --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 |
| --sort-ascending | Sort the column(s) in ascending order |
| --sort-descending | Sort the column(s) in descending order |
| 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. |