The gnocchi shell utility

The gnocchi shell utility interacts with Gnocchi from the command line. It supports the entirety of the Gnocchi API.

Authentication method

You’ll need to provide the authentication method and your credentials to gnocchi.

Basic authentication

If you’re using Gnocchi with basic authentication, export the following variables in your environment:

export OS_AUTH_TYPE=gnocchi-basic
export GNOCCHI_USER=<youruserid>
export GNOCCHI_ENDPOINT=http://urlofgnocchi

Note

OS_AUTH_TYPE is used globally by all clients supporting Keystone. Provide --os-auth-plugin gnocchi-basic to the client instead if other clients are used in session.

OpenStack Keystone authentication

If you’re using Gnocchi with Keystone authentication, export the following variables in your environment with the appropriate values:

export OS_AUTH_TYPE=password
export OS_USERNAME=user
export OS_PASSWORD=pass
export OS_TENANT_NAME=myproject
export OS_AUTH_URL=http://auth.example.com:5000/v2.0

The command line tool will attempt to reauthenticate using your provided credentials for every request. You can override this behavior by manually supplying an auth token using --endpoint and --os-auth-token. You can alternatively set these environment variables:

export GNOCCHI_ENDPOINT=http://gnocchi.example.org:8041
export OS_AUTH_PLUGIN=token
export OS_AUTH_TOKEN=3bcc3d3a03f44e3d8377f9247b0ad155

For more details, check the keystoneauth documentation.

Timestamps

By default, timestamps are displayed in local time zone. If you prefer to see timestamps dispalyed in UTC time zones, you can pass the –utc option to the command.

The gnocchi command line interface parses timestamps in the ISO8601 format. If no time zone is specified, timestamps are assumed to be in the local client time zone.

Commands descriptions

Gnocchi command line client

gnocchi
    [--version]
    [-v | -q]
    [--log-file LOG_FILE]
    [--debug]
    [--gnocchi-api-version GNOCCHI_API_VERSION]
    [--insecure]
    [--os-cacert <ca-certificate>]
    [--os-cert <certificate>]
    [--os-key <key>]
    [--timeout <seconds>]
    [--collect-timing]
    [--os-auth-type <name>]
    [--user <gnocchi user>]
    [--endpoint <gnocchi endpoint>]
--version

show program’s version number and exit

-v, --verbose

Increase verbosity of output. Can be repeated.

-q, --quiet

Suppress output except warnings and errors.

--log-file <LOG_FILE>

Specify a file to log output. Disabled by default.

--debug

Show tracebacks on errors.

--gnocchi-api-version <GNOCCHI_API_VERSION>

Defaults to env[GNOCCHI_API_VERSION] or 1.

--insecure

Explicitly allow client to perform “insecure” TLS (https) requests. The server’s certificate will not be verified against any certificate authorities. This option should be used with caution.

--os-cacert <ca-certificate>

Specify a CA bundle file to use in verifying a TLS (https) server certificate. Defaults to env[OS_CACERT].

--os-cert <certificate>

Defaults to env[OS_CERT].

--os-key <key>

Defaults to env[OS_KEY].

--timeout <seconds>

Set request timeout (in seconds).

--collect-timing

Collect per-API call timing information.

--os-auth-type <name>, --os-auth-plugin <name>

Authentication type to use

--user <gnocchi user>

User

--endpoint <gnocchi endpoint>

Gnocchi endpoint

aggregates

Get measurements of aggregated metrics.

gnocchi aggregates
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--quote {all,minimal,none,nonnumeric}]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--sort-column SORT_COLUMN]
    [--resource-type RESOURCE_TYPE]
    [--start START]
    [--stop STOP]
    [--granularity GRANULARITY]
    [--needed-overlap NEEDED_OVERLAP]
    [--groupby GROUPBY]
    [--fill FILL]
    operations
    [search]
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

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

--noindent

whether to disable indenting the JSON

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

--resource-type <RESOURCE_TYPE>

Resource type to query

--start <START>

beginning of the period

--stop <STOP>

end of the period

--granularity <GRANULARITY>

granularity to retrieve

--needed-overlap <NEEDED_OVERLAP>

percentage of overlap across datapoints

--groupby <GROUPBY>

Attribute to use to group resources

--fill <FILL>

Value to use when backfilling timestamps with missing values in a subset of series. Value should be a float or ‘null’.

operations

Operations to apply to time series

A query to filter resource. The syntax is a combination of attribute, operator and value. For example: id=90d58eea-70d7-4294-a49a-170dcdf44c3c would filter resource with a certain id. More complex queries can be built, e.g.: not (flavor_id!=”1” and memory>=24). Use “” to force data to be interpreted as string. Supported operators are: not, and, ∧ or, ∨, >=, <=, !=, >, <, =, ==, eq, ne, lt, gt, ge, le, in, like, ≠, ≥, ≤, like, in.

This command is provided by the gnocchiclient plugin.

archive-policy create

Create an archive policy.

gnocchi archive-policy create
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    -d <DEFINITION>
    [-b BACK_WINDOW]
    [-m AGGREGATION_METHODS]
    name
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

-d <DEFINITION>, --definition <DEFINITION>

two attributes (separated by ‘,’) of an archive policy definition with its name and value separated with a ‘:’

-b <BACK_WINDOW>, --back-window <BACK_WINDOW>

back window of the archive policy

-m <AGGREGATION_METHODS>, --aggregation-method <AGGREGATION_METHODS>

aggregation method of the archive policy

name

name of the archive policy

This command is provided by the gnocchiclient plugin.

archive-policy delete

Delete an archive policy.

gnocchi archive-policy delete name
name

Name of the archive policy

This command is provided by the gnocchiclient plugin.

archive-policy list

List archive policies.

gnocchi archive-policy list
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--quote {all,minimal,none,nonnumeric}]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--sort-column SORT_COLUMN]
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

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

--noindent

whether to disable indenting the JSON

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

This command is provided by the gnocchiclient plugin.

archive-policy show

Show an archive policy.

gnocchi archive-policy show
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    name
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

name

Name of the archive policy

This command is provided by the gnocchiclient plugin.

archive-policy update

Update an archive policy.

gnocchi archive-policy update
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    -d <DEFINITION>
    name
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

-d <DEFINITION>, --definition <DEFINITION>

two attributes (separated by ‘,’) of an archive policy definition with its name and value separated with a ‘:’

name

name of the archive policy

This command is provided by the gnocchiclient plugin.

archive-policy-rule create

Create an archive policy rule.

gnocchi archive-policy-rule create
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    -a ARCHIVE_POLICY_NAME
    -m METRIC_PATTERN
    name
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

-a <ARCHIVE_POLICY_NAME>, --archive-policy-name <ARCHIVE_POLICY_NAME>

Archive policy name

-m <METRIC_PATTERN>, --metric-pattern <METRIC_PATTERN>

Wildcard of metric name to match

name

Rule name

This command is provided by the gnocchiclient plugin.

archive-policy-rule delete

Delete an archive policy rule.

gnocchi archive-policy-rule delete name
name

Name of the archive policy rule

This command is provided by the gnocchiclient plugin.

archive-policy-rule list

List archive policy rules.

gnocchi archive-policy-rule list
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--quote {all,minimal,none,nonnumeric}]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--sort-column SORT_COLUMN]
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

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

--noindent

whether to disable indenting the JSON

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

This command is provided by the gnocchiclient plugin.

archive-policy-rule show

Show an archive policy rule.

gnocchi archive-policy-rule show
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    name
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

name

Name of the archive policy rule

This command is provided by the gnocchiclient plugin.

archive-policy-rule update

Update an archive policy rule.

gnocchi archive-policy-rule update
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    -n NEW_NAME
    name
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

-n <NEW_NAME>, --name <NEW_NAME>

New rule name

name

Rule name

This command is provided by the gnocchiclient plugin.

benchmark measures add

Do benchmark testing of adding measurements.

gnocchi benchmark measures add
    [--resource-id RESOURCE_ID]
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    [--workers WORKERS]
    --count COUNT
    [--batch BATCH]
    [--timestamp-start TIMESTAMP_START]
    [--timestamp-end TIMESTAMP_END]
    [--wait]
    metric
--resource-id <RESOURCE_ID>, -r <RESOURCE_ID>

ID of the resource

-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

--workers <WORKERS>, -w <WORKERS>

Number of workers to use

--count <COUNT>, -n <COUNT>

Number of total measures to send

--batch <BATCH>, -b <BATCH>

Number of measures to send in each batch

--timestamp-start <TIMESTAMP_START>, -s <TIMESTAMP_START>

First timestamp to use

--timestamp-end <TIMESTAMP_END>, -e <TIMESTAMP_END>

Last timestamp to use

--wait

Wait for all measures to be processed

metric

ID or name of the metric

This command is provided by the gnocchiclient plugin.

benchmark measures show

Do benchmark testing of measurements show.

gnocchi benchmark measures show
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    [--sort-column SORT_COLUMN]
    [--utc]
    [--resource-id RESOURCE_ID]
    [--aggregation AGGREGATION]
    [--start START]
    [--stop STOP]
    [--granularity GRANULARITY]
    [--refresh]
    [--resample RESAMPLE]
    [--workers WORKERS]
    --count COUNT
    metric
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

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

--utc

Return timestamps as UTC

--resource-id <RESOURCE_ID>, -r <RESOURCE_ID>

ID of the resource

--aggregation <AGGREGATION>

aggregation to retrieve

--start <START>

beginning of the period

--stop <STOP>

end of the period

--granularity <GRANULARITY>

granularity to retrieve

--refresh

force aggregation of all known measures

--resample <RESAMPLE>

granularity to resample time-series to (in seconds)

--workers <WORKERS>, -w <WORKERS>

Number of workers to use

--count <COUNT>, -n <COUNT>

Number of total measures to send

metric

ID or name of the metric

This command is provided by the gnocchiclient plugin.

benchmark metric create

Do benchmark testing of metric creation.

gnocchi benchmark metric create
    [--resource-id RESOURCE_ID]
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    [--archive-policy-name ARCHIVE_POLICY_NAME]
    [--workers WORKERS]
    --count COUNT
    [--keep]
--resource-id <RESOURCE_ID>, -r <RESOURCE_ID>

ID of the resource

-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

--archive-policy-name <ARCHIVE_POLICY_NAME>, -a <ARCHIVE_POLICY_NAME>

name of the archive policy

--workers <WORKERS>, -w <WORKERS>

Number of workers to use

--count <COUNT>, -n <COUNT>

Number of metrics to create

--keep, -k

Keep created metrics

This command is provided by the gnocchiclient plugin.

benchmark metric show

Do benchmark testing of metric show.

gnocchi benchmark metric show
    [--resource-id RESOURCE_ID]
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    [--workers WORKERS]
    --count COUNT
    metric
    [metric ...]
--resource-id <RESOURCE_ID>, -r <RESOURCE_ID>

ID of the resource

-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

--workers <WORKERS>, -w <WORKERS>

Number of workers to use

--count <COUNT>, -n <COUNT>

Number of metrics to get

metric

ID or name of the metrics

This command is provided by the gnocchiclient plugin.

capabilities list

List capabilities.

gnocchi capabilities list
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

This command is provided by the gnocchiclient plugin.

measures add

Add measurements to a metric.

gnocchi measures add [--resource-id RESOURCE_ID] -m MEASURE metric
--resource-id <RESOURCE_ID>, -r <RESOURCE_ID>

ID of the resource

-m <MEASURE>, --measure <MEASURE>

timestamp and value of a measure separated with a ‘@’

metric

ID or name of the metric

This command is provided by the gnocchiclient plugin.

measures aggregation

Get measurements of aggregated metrics.

gnocchi measures aggregation
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--quote {all,minimal,none,nonnumeric}]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--sort-column SORT_COLUMN]
    [--utc]
    -m METRIC
    [METRIC ...]
    [--aggregation AGGREGATION]
    [--reaggregation REAGGREGATION]
    [--start START]
    [--stop STOP]
    [--granularity GRANULARITY]
    [--needed-overlap NEEDED_OVERLAP]
    [--query QUERY]
    [--resource-type RESOURCE_TYPE]
    [--groupby GROUPBY]
    [--refresh]
    [--resample RESAMPLE]
    [--fill FILL]
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

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

--noindent

whether to disable indenting the JSON

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

--utc

Return timestamps as UTC

-m <METRIC>, --metric <METRIC>

metrics IDs or metric name

--aggregation <AGGREGATION>

granularity aggregation function to retrieve

--reaggregation <REAGGREGATION>

groupby aggregation function to retrieve

--start <START>

beginning of the period

--stop <STOP>

end of the period

--granularity <GRANULARITY>

granularity to retrieve

--needed-overlap <NEEDED_OVERLAP>

percent of datapoints in each metrics required

--query <QUERY>

A query to filter resource. The syntax is a combination of attribute, operator and value. For example: id=90d58eea-70d7-4294-a49a-170dcdf44c3c would filter resource with a certain id. More complex queries can be built, e.g.: not (flavor_id!=”1” and memory>=24). Use “” to force data to be interpreted as string. Supported operators are: not, and, ∧ or, ∨, >=, <=, !=, >, <, =, ==, eq, ne, lt, gt, ge, le, in, like, ≠, ≥, ≤, like, in.

--resource-type <RESOURCE_TYPE>

Resource type to query

--groupby <GROUPBY>

Attribute to use to group resources

--refresh

force aggregation of all known measures

--resample <RESAMPLE>

granularity to resample time-series to (in seconds)

--fill <FILL>

Value to use when backfilling timestamps with missing values in a subset of series. Value should be a float or ‘null’.

This command is provided by the gnocchiclient plugin.

measures batch-metrics

gnocchi measures batch-metrics file
file

File containing measurements to batch or - for stdin (see Gnocchi REST API docs for the format

This command is provided by the gnocchiclient plugin.

measures batch-resources-metrics

gnocchi measures batch-resources-metrics [--create-metrics] file
--create-metrics

Create unknown metrics

file

File containing measurements to batch or - for stdin (see Gnocchi REST API docs for the format

This command is provided by the gnocchiclient plugin.

measures show

Get measurements of a metric.

gnocchi measures show
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--quote {all,minimal,none,nonnumeric}]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--sort-column SORT_COLUMN]
    [--utc]
    [--resource-id RESOURCE_ID]
    [--aggregation AGGREGATION]
    [--start START]
    [--stop STOP]
    [--granularity GRANULARITY]
    [--refresh]
    [--resample RESAMPLE]
    metric
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

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

--noindent

whether to disable indenting the JSON

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

--utc

Return timestamps as UTC

--resource-id <RESOURCE_ID>, -r <RESOURCE_ID>

ID of the resource

--aggregation <AGGREGATION>

aggregation to retrieve

--start <START>

beginning of the period

--stop <STOP>

end of the period

--granularity <GRANULARITY>

granularity to retrieve

--refresh

force aggregation of all known measures

--resample <RESAMPLE>

granularity to resample time-series to (in seconds)

metric

ID or name of the metric

This command is provided by the gnocchiclient plugin.

metric create

Create a metric.

gnocchi metric create
    [--resource-id RESOURCE_ID]
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    [--archive-policy-name ARCHIVE_POLICY_NAME]
    [--unit UNIT]
    [METRIC_NAME]
--resource-id <RESOURCE_ID>, -r <RESOURCE_ID>

ID of the resource

-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

--archive-policy-name <ARCHIVE_POLICY_NAME>, -a <ARCHIVE_POLICY_NAME>

name of the archive policy

--unit <UNIT>, -u <UNIT>

unit of the metric

METRIC_NAME

Name of the metric

This command is provided by the gnocchiclient plugin.

metric delete

Delete a metric.

gnocchi metric delete [--resource-id RESOURCE_ID] metric [metric ...]
--resource-id <RESOURCE_ID>, -r <RESOURCE_ID>

ID of the resource

metric

IDs or names of the metric

This command is provided by the gnocchiclient plugin.

metric list

List metrics.

gnocchi metric list
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--quote {all,minimal,none,nonnumeric}]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--sort-column SORT_COLUMN]
    [--limit <LIMIT>]
    [--marker <MARKER>]
    [--sort <SORT>]
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

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

--noindent

whether to disable indenting the JSON

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

--limit <LIMIT>

Number of metrics to return (Default is server default)

--marker <MARKER>

Last item of the previous listing. Return the next results after this value

--sort <SORT>

Sort of metric attribute (example: user_id:desc-nullslast

This command is provided by the gnocchiclient plugin.

metric show

Show a metric.

gnocchi metric show
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    [--resource-id RESOURCE_ID]
    metric
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

--resource-id <RESOURCE_ID>, -r <RESOURCE_ID>

ID of the resource

metric

ID or name of the metric

This command is provided by the gnocchiclient plugin.

resource batch delete

Delete a batch of resources based on attribute values.

gnocchi resource batch delete
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    [--type RESOURCE_TYPE]
    query
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

--type <RESOURCE_TYPE>, -t <RESOURCE_TYPE>

Type of resource

query

A query to filter resource. The syntax is a combination of attribute, operator and value. For example: id=90d58eea-70d7-4294-a49a-170dcdf44c3c would filter resource with a certain id. More complex queries can be built, e.g.: not (flavor_id!=”1” and memory>=24). Use “” to force data to be interpreted as string. Supported operators are: not, and, ∧ or, ∨, >=, <=, !=, >, <, =, ==, eq, ne, lt, gt, ge, le, in, like, ≠, ≥, ≤, like, in.

This command is provided by the gnocchiclient plugin.

resource create

Create a resource.

gnocchi resource create
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    [--type RESOURCE_TYPE]
    [-a ATTRIBUTE]
    [-m ADD_METRIC]
    [-n CREATE_METRIC]
    resource_id
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

--type <RESOURCE_TYPE>, -t <RESOURCE_TYPE>

Type of resource

-a <ATTRIBUTE>, --attribute <ATTRIBUTE>

name and value of an attribute separated with a ‘:’

-m <ADD_METRIC>, --add-metric <ADD_METRIC>

name:id of a metric to add

-n <CREATE_METRIC>, --create-metric <CREATE_METRIC>

name:archive_policy_name of a metric to create

resource_id

ID of the resource

This command is provided by the gnocchiclient plugin.

resource delete

Delete a resource.

gnocchi resource delete resource_id
resource_id

ID of the resource

This command is provided by the gnocchiclient plugin.

resource history

Show the history of a resource.

gnocchi resource history
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--quote {all,minimal,none,nonnumeric}]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--sort-column SORT_COLUMN]
    [--details]
    [--limit <LIMIT>]
    [--marker <MARKER>]
    [--sort <SORT>]
    [--type RESOURCE_TYPE]
    resource_id
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

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

--noindent

whether to disable indenting the JSON

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

--details

Show all attributes of generic resources

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

--sort <SORT>

Sort of resource attribute (example: user_id:desc-nullslast

--type <RESOURCE_TYPE>, -t <RESOURCE_TYPE>

Type of resource

resource_id

ID of a resource

This command is provided by the gnocchiclient plugin.

resource list

List resources.

gnocchi resource list
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--quote {all,minimal,none,nonnumeric}]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--sort-column SORT_COLUMN]
    [--details]
    [--history]
    [--limit <LIMIT>]
    [--marker <MARKER>]
    [--sort <SORT>]
    [--type RESOURCE_TYPE]
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

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

--noindent

whether to disable indenting the JSON

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

--details

Show all attributes of generic resources

--history

Show history of the resources

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

--sort <SORT>

Sort of resource attribute (example: user_id:desc-nullslast

--type <RESOURCE_TYPE>, -t <RESOURCE_TYPE>

Type of resource

This command is provided by the gnocchiclient plugin.

resource show

Show a resource.

gnocchi resource show
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    [--type RESOURCE_TYPE]
    resource_id
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

--type <RESOURCE_TYPE>, -t <RESOURCE_TYPE>

Type of resource

resource_id

ID of a resource

This command is provided by the gnocchiclient plugin.

resource update

Update a resource.

gnocchi resource update
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    [--type RESOURCE_TYPE]
    [-a ATTRIBUTE]
    [-m ADD_METRIC]
    [-n CREATE_METRIC]
    [-d DELETE_METRIC]
    resource_id
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

--type <RESOURCE_TYPE>, -t <RESOURCE_TYPE>

Type of resource

-a <ATTRIBUTE>, --attribute <ATTRIBUTE>

name and value of an attribute separated with a ‘:’

-m <ADD_METRIC>, --add-metric <ADD_METRIC>

name:id of a metric to add

-n <CREATE_METRIC>, --create-metric <CREATE_METRIC>

name:archive_policy_name of a metric to create

-d <DELETE_METRIC>, --delete-metric <DELETE_METRIC>

Name of a metric to delete

resource_id

ID of the resource

This command is provided by the gnocchiclient plugin.

resource-type create

Create a resource type.

gnocchi resource-type create
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    [-a ATTRIBUTE]
    name
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

-a <ATTRIBUTE>, --attribute <ATTRIBUTE>

attribute definition, attribute_name:attribute_type:attribute_is_required:attribute_type_option_name=attribute_type_option_value:… For example: display_name:string:true:max_length=255

name

name of the resource type

This command is provided by the gnocchiclient plugin.

resource-type delete

Delete a resource type.

gnocchi resource-type delete name
name

name of the resource type

This command is provided by the gnocchiclient plugin.

resource-type list

List resource types.

gnocchi resource-type list
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--quote {all,minimal,none,nonnumeric}]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--sort-column SORT_COLUMN]
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

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

--noindent

whether to disable indenting the JSON

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

This command is provided by the gnocchiclient plugin.

resource-type show

Show a resource type.

gnocchi resource-type show
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    name
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

name

name of the resource type

This command is provided by the gnocchiclient plugin.

resource-type update

gnocchi resource-type update
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
    [-a ATTRIBUTE]
    [-r REMOVE_ATTRIBUTE]
    name
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

-a <ATTRIBUTE>, --attribute <ATTRIBUTE>

attribute definition, attribute_name:attribute_type:attribute_is_required:attribute_type_option_name=attribute_type_option_value:… For example: display_name:string:true:max_length=255

-r <REMOVE_ATTRIBUTE>, --remove-attribute <REMOVE_ATTRIBUTE>

attribute name

name

name of the resource type

This command is provided by the gnocchiclient plugin.

server version

Show the version of Gnocchi server.

gnocchi server version
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

This command is provided by the gnocchiclient plugin.

status

Show the status of measurements processing.

gnocchi status
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--prefix PREFIX]
    [--noindent]
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

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

--prefix <PREFIX>

add a prefix to all variable names

--noindent

whether to disable indenting the JSON

This command is provided by the gnocchiclient plugin.