Chapter 47. metric


This chapter describes the commands under the metric command.

47.1. metric clean-tombstones

Remove deleted data from disk and clean up the existing tombstones.

Usage:

openstack metric clean-tombstones [-h] [--dev] [--messy]
                                         [--disable-rbac]
Copy to Clipboard Toggle word wrap

Expand
Table 47.1. Command arguments
ValueSummary

-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

Delete data for a selected series and time range.

Usage:

openstack metric delete [-h] [--dev] [--messy] [--disable-rbac]
                               [--start START] [--end END]
                               matches [matches ...]
Copy to Clipboard Toggle word wrap

Expand
Table 47.2. Positional arguments
ValueSummary

matches

Series selector, that selects the series to delete. specify multiple selectors delimited by space to delete multiple series.

Expand
Table 47.3. Command arguments
ValueSummary

-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

Query prometheus for list of all metrics.

Usage:

openstack metric 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]
                             [--sort-ascending | --sort-descending] [--dev]
                             [--messy] [--disable-rbac]
Copy to Clipboard Toggle word wrap

Expand
Table 47.4. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--dev

Enable development output.

--messy

Disable cleanup of temporary files.

--disable-rbac

Disable rbac injection

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

Expand
Table 47.6. CSV formatter options
ValueSummary

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

When to include quotes, defaults to nonnumeric

Expand
Table 47.7. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

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

47.4. metric query

Query prometheus with a custom query string.

Usage:

openstack metric query [-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]
                              [--sort-ascending | --sort-descending] [--dev]
                              [--messy] [--disable-rbac]
                              query
Copy to Clipboard Toggle word wrap

Expand
Table 47.9. Positional arguments
ValueSummary

query

Custom promql query

Expand
Table 47.10. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--dev

Enable development output.

--messy

Disable cleanup of temporary files.

--disable-rbac

Disable rbac injection

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

Expand
Table 47.12. CSV formatter options
ValueSummary

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

When to include quotes, defaults to nonnumeric

Expand
Table 47.13. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

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

47.5. metric show

Query prometheus for the current value of metric.

Usage:

openstack metric 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]
                             [--sort-ascending | --sort-descending] [--dev]
                             [--messy] [--disable-rbac]
                             name
Copy to Clipboard Toggle word wrap

Expand
Table 47.15. Positional arguments
ValueSummary

name

Name of the metric to show

Expand
Table 47.16. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--dev

Enable development output.

--messy

Disable cleanup of temporary files.

--disable-rbac

Disable rbac injection

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

Expand
Table 47.18. CSV formatter options
ValueSummary

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

When to include quotes, defaults to nonnumeric

Expand
Table 47.19. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

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

47.6. metric snapshot

Base class for metric commands.

Usage:

openstack metric snapshot [-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]
                                 [--sort-ascending | --sort-descending]
                                 [--dev] [--messy] [--disable-rbac]
Copy to Clipboard Toggle word wrap

Expand
Table 47.21. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--dev

Enable development output.

--messy

Disable cleanup of temporary files.

--disable-rbac

Disable rbac injection

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

Expand
Table 47.23. CSV formatter options
ValueSummary

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

When to include quotes, defaults to nonnumeric

Expand
Table 47.24. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

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

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