Este conteúdo não está disponível no idioma selecionado.
Chapter 6. A time series storage and resources index service (gnocchi) command-line client
The gnocchi client is the command-line interface (CLI) for the A time series storage and resources index service (gnocchi) API and its extensions.
This chapter documents gnocchi
version 3.1.1
.
For help on a specific gnocchi
command, enter:
gnocchi help COMMAND
$ gnocchi help COMMAND
6.1. gnocchi usage Copiar o linkLink copiado para a área de transferência!
usage: gnocchi [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug] [--gnocchi-api-version GNOCCHI_API_VERSION] [--insecure] [--os-cacert <ca-certificate>] [--os-cert <certificate>] [--os-key <key>] [--timeout <seconds>] [--os-auth-type <name>] [--user <gnocchi user>] [--endpoint <gnocchi endpoint>]
usage: gnocchi [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug]
[--gnocchi-api-version GNOCCHI_API_VERSION] [--insecure]
[--os-cacert <ca-certificate>] [--os-cert <certificate>]
[--os-key <key>] [--timeout <seconds>] [--os-auth-type <name>]
[--user <gnocchi user>] [--endpoint <gnocchi endpoint>]
6.2. gnocchi optional arguments Copiar o linkLink copiado para a área de transferência!
--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.
-h, --help
- Show help message and exit.
--debug
- Show tracebacks on errors.
--gnocchi-api-version GNOCCHI_API_VERSION
-
Defaults to
env[GNOCCHI_API_VERSION]
or 1. --os-auth-type <name>, --os-auth-plugin <name>
- Authentication type to use
6.2.1. gnocchi archive-policy create Copiar o linkLink copiado para a área de transferência!
Create an archive policy
Positional arguments:
name
- name of the archive policy
Optional arguments:
-h, --help
- show this help message and exit
-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
6.2.2. gnocchi archive-policy delete Copiar o linkLink copiado para a área de transferência!
usage: gnocchi archive-policy delete [-h] name
usage: gnocchi archive-policy delete [-h] name
Delete an archive policy
Positional arguments:
name
- Name of the archive policy
Optional arguments:
-h, --help
- show this help message and exit
6.2.3. gnocchi archive-policy list Copiar o linkLink copiado para a área de transferência!
usage: gnocchi archive-policy list [-h] [-f {csv,html,json,table,value,yaml}] [-c COLUMN] [--max-width <integer>] [--print-empty] [--noindent] [--quote {all,minimal,none,nonnumeric}]
usage: gnocchi archive-policy list [-h] [-f {csv,html,json,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--print-empty] [--noindent]
[--quote {all,minimal,none,nonnumeric}]
List archive policies
Optional arguments:
-h, --help
- show this help message and exit
6.2.4. gnocchi archive-policy show Copiar o linkLink copiado para a área de transferência!
Show an archive policy
Positional arguments:
name
- Name of the archive policy
Optional arguments:
-h, --help
- show this help message and exit
6.2.5. gnocchi archive-policy update Copiar o linkLink copiado para a área de transferência!
Update an archive policy
Positional arguments:
name
- name of the archive policy
Optional arguments:
-h, --help
- show this help message and exit
-d <DEFINITION>, --definition <DEFINITION>
- two attributes (separated by ',') of an archive policy definition with its name and value separated with a ':'
6.2.6. gnocchi archive-policy-rule create Copiar o linkLink copiado para a área de transferência!
Create an archive policy rule
Positional arguments:
name
- Rule name
Optional arguments:
-h, --help
- show this help message and exit
-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
6.2.7. gnocchi archive-policy-rule delete Copiar o linkLink copiado para a área de transferência!
usage: gnocchi archive-policy-rule delete [-h] name
usage: gnocchi archive-policy-rule delete [-h] name
Delete an archive policy rule
Positional arguments:
name
- Name of the archive policy rule
Optional arguments:
-h, --help
- show this help message and exit
6.2.8. gnocchi archive-policy-rule list Copiar o linkLink copiado para a área de transferência!
usage: gnocchi archive-policy-rule list [-h] [-f {csv,html,json,table,value,yaml}] [-c COLUMN] [--max-width <integer>] [--print-empty] [--noindent] [--quote {all,minimal,none,nonnumeric}]
usage: gnocchi archive-policy-rule list [-h]
[-f {csv,html,json,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--print-empty] [--noindent]
[--quote {all,minimal,none,nonnumeric}]
List archive policy rules
Optional arguments:
-h, --help
- show this help message and exit
6.2.9. gnocchi archive-policy-rule show Copiar o linkLink copiado para a área de transferência!
Show an archive policy rule
Positional arguments:
name
- Name of the archive policy rule
Optional arguments:
-h, --help
- show this help message and exit
6.2.10. gnocchi benchmark measures add Copiar o linkLink copiado para a área de transferência!
Do benchmark testing of adding measurements
Positional arguments:
metric
- ID or name of the metric
Optional arguments:
-h, --help
- show this help message and exit
--resource-id RESOURCE_ID, -r RESOURCE_ID
- ID of the resource
--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
6.2.11. gnocchi benchmark measures show Copiar o linkLink copiado para a área de transferência!
Do benchmark testing of measurements show
Positional arguments:
metric
- ID or name of the metric
Optional arguments:
-h, --help
- show this help message and exit
--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
6.2.12. gnocchi benchmark metric create Copiar o linkLink copiado para a área de transferência!
Do benchmark testing of metric creation
Optional arguments:
-h, --help
- show this help message and exit
--resource-id RESOURCE_ID, -r RESOURCE_ID
- ID of the resource
--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
6.2.13. gnocchi benchmark metric show Copiar o linkLink copiado para a área de transferência!
Do benchmark testing of metric show
Positional arguments:
metric
- ID or name of the metrics
Optional arguments:
-h, --help
- show this help message and exit
--resource-id RESOURCE_ID, -r RESOURCE_ID
- ID of the resource
--workers WORKERS, -w WORKERS
- Number of workers to use
--count COUNT, -n COUNT
- Number of metrics to get
6.2.14. gnocchi capabilities list Copiar o linkLink copiado para a área de transferência!
usage: gnocchi capabilities list [-h] [-f {html,json,shell,table,value,yaml}] [-c COLUMN] [--max-width <integer>] [--print-empty] [--noindent] [--prefix PREFIX]
usage: gnocchi capabilities list [-h] [-f {html,json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--print-empty] [--noindent]
[--prefix PREFIX]
List capabilities
Optional arguments:
-h, --help
- show this help message and exit
6.2.15. gnocchi measures add Copiar o linkLink copiado para a área de transferência!
usage: gnocchi measures add [-h] [--resource-id RESOURCE_ID] -m MEASURE metric
usage: gnocchi measures add [-h] [--resource-id RESOURCE_ID] -m MEASURE metric
Add measurements to a metric
Positional arguments:
metric
- ID or name of the metric
Optional arguments:
-h, --help
- show this help message and exit
--resource-id RESOURCE_ID, -r RESOURCE_ID
- ID of the resource
-m MEASURE, --measure MEASURE
- timestamp and value of a measure separated with a '@'
6.2.16. gnocchi measures aggregation Copiar o linkLink copiado para a área de transferência!
Get measurements of aggregated metrics
Optional arguments:
-h, --help
- show this help message and exit
-m METRIC [METRIC …], --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'.
6.2.17. gnocchi measures batch-metrics Copiar o linkLink copiado para a área de transferência!
usage: gnocchi measures batch-metrics [-h] file
usage: gnocchi measures batch-metrics [-h] file
Positional arguments:
file
- File containing measurements to batch or - for stdin (see Gnocchi REST API docs for the format
Optional arguments:
-h, --help
- show this help message and exit
6.2.18. gnocchi measures batch-resources-metrics Copiar o linkLink copiado para a área de transferência!
usage: gnocchi measures batch-resources-metrics [-h] [--create-metrics] file
usage: gnocchi measures batch-resources-metrics [-h] [--create-metrics] file
Positional arguments:
file
- File containing measurements to batch or - for stdin (see Gnocchi REST API docs for the format
Optional arguments:
-h, --help
- show this help message and exit
--create-metrics
- Create unknown metrics
6.2.19. gnocchi measures show Copiar o linkLink copiado para a área de transferência!
Get measurements of a metric
Positional arguments:
metric
- ID or name of the metric
Optional arguments:
-h, --help
- show this help message and exit
--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)
6.2.20. gnocchi metric create Copiar o linkLink copiado para a área de transferência!
Create a metric
Positional arguments:
METRIC_NAME
- Name of the metric
Optional arguments:
-h, --help
- show this help message and exit
--resource-id RESOURCE_ID, -r RESOURCE_ID
- ID of the resource
--archive-policy-name ARCHIVE_POLICY_NAME, -a ARCHIVE_POLICY_NAME
- name of the archive policy
--unit UNIT, -u UNIT
- unit of the metric
6.2.21. gnocchi metric delete Copiar o linkLink copiado para a área de transferência!
usage: gnocchi metric delete [-h] [--resource-id RESOURCE_ID] metric [metric ...]
usage: gnocchi metric delete [-h] [--resource-id RESOURCE_ID]
metric [metric ...]
Delete a metric
Positional arguments:
metric
- IDs or names of the metric
Optional arguments:
-h, --help
- show this help message and exit
--resource-id RESOURCE_ID, -r RESOURCE_ID
- ID of the resource
6.2.22. gnocchi metric list Copiar o linkLink copiado para a área de transferência!
List metrics
Optional arguments:
-h, --help
- show this help message and exit
--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
6.2.23. gnocchi metric show Copiar o linkLink copiado para a área de transferência!
usage: gnocchi metric show [-h] [-f {html,json,shell,table,value,yaml}] [-c COLUMN] [--max-width <integer>] [--print-empty] [--noindent] [--prefix PREFIX] [--resource-id RESOURCE_ID] metric
usage: gnocchi metric show [-h] [-f {html,json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>] [--print-empty]
[--noindent] [--prefix PREFIX]
[--resource-id RESOURCE_ID]
metric
Show a metric
Positional arguments:
metric
- ID or name of the metric
Optional arguments:
-h, --help
- show this help message and exit
--resource-id RESOURCE_ID, -r RESOURCE_ID
- ID of the resource
6.2.24. gnocchi resource batch delete Copiar o linkLink copiado para a área de transferência!
Delete a batch of resources based on attribute values
Positional arguments:
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.
Optional arguments:
-h, --help
- show this help message and exit
--type RESOURCE_TYPE, -t RESOURCE_TYPE
- Type of resource
6.2.25. gnocchi resource create Copiar o linkLink copiado para a área de transferência!
Create a resource
Positional arguments:
resource_id
- ID of the resource
Optional arguments:
-h, --help
- show this help message and exit
--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
6.2.26. gnocchi resource delete Copiar o linkLink copiado para a área de transferência!
usage: gnocchi resource delete [-h] resource_id
usage: gnocchi resource delete [-h] resource_id
Delete a resource
Positional arguments:
resource_id
- ID of the resource
Optional arguments:
-h, --help
- show this help message and exit
6.2.27. gnocchi resource history Copiar o linkLink copiado para a área de transferência!
Show the history of a resource
Positional arguments:
resource_id
- ID of a resource
Optional arguments:
-h, --help
- show this help message and exit
--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
6.2.28. gnocchi resource list Copiar o linkLink copiado para a área de transferência!
List resources
Optional arguments:
-h, --help
- show this help message and exit
--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
6.2.29. gnocchi resource show Copiar o linkLink copiado para a área de transferência!
usage: gnocchi resource show [-h] [-f {html,json,shell,table,value,yaml}] [-c COLUMN] [--max-width <integer>] [--print-empty] [--noindent] [--prefix PREFIX] [--type RESOURCE_TYPE] resource_id
usage: gnocchi resource show [-h] [-f {html,json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--print-empty] [--noindent] [--prefix PREFIX]
[--type RESOURCE_TYPE]
resource_id
Show a resource
Positional arguments:
resource_id
- ID of a resource
Optional arguments:
-h, --help
- show this help message and exit
--type RESOURCE_TYPE, -t RESOURCE_TYPE
- Type of resource
6.2.30. gnocchi resource update Copiar o linkLink copiado para a área de transferência!
Update a resource
Positional arguments:
resource_id
- ID of the resource
Optional arguments:
-h, --help
- show this help message and exit
--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
6.2.31. gnocchi resource-type create Copiar o linkLink copiado para a área de transferência!
Create a resource type
Positional arguments:
name
- name of the resource type
Optional arguments:
-h, --help
- show this help message and exit
-a ATTRIBUTE, --attribute ATTRIBUTE
- attribute definition, attribute_name:attribute_type:at tribute_is_required:attribute_type_option_name=attribu te_type_option_value:… For example: display_name:string:true:max_length=255
6.2.32. gnocchi resource-type delete Copiar o linkLink copiado para a área de transferência!
usage: gnocchi resource-type delete [-h] name
usage: gnocchi resource-type delete [-h] name
Delete a resource type
Positional arguments:
name
- name of the resource type
Optional arguments:
-h, --help
- show this help message and exit
6.2.33. gnocchi resource-type list Copiar o linkLink copiado para a área de transferência!
usage: gnocchi resource-type list [-h] [-f {csv,html,json,table,value,yaml}] [-c COLUMN] [--max-width <integer>] [--print-empty] [--noindent] [--quote {all,minimal,none,nonnumeric}]
usage: gnocchi resource-type list [-h] [-f {csv,html,json,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--print-empty] [--noindent]
[--quote {all,minimal,none,nonnumeric}]
List resource types
Optional arguments:
-h, --help
- show this help message and exit
6.2.34. gnocchi resource-type show Copiar o linkLink copiado para a área de transferência!
usage: gnocchi resource-type show [-h] [-f {html,json,shell,table,value,yaml}] [-c COLUMN] [--max-width <integer>] [--print-empty] [--noindent] [--prefix PREFIX] name
usage: gnocchi resource-type show [-h] [-f {html,json,shell,table,value,yaml}]
[-c COLUMN] [--max-width <integer>]
[--print-empty] [--noindent]
[--prefix PREFIX]
name
Show a resource type
Positional arguments:
name
- name of the resource type
Optional arguments:
-h, --help
- show this help message and exit
6.2.35. gnocchi resource-type update Copiar o linkLink copiado para a área de transferência!
Positional arguments:
name
- name of the resource type
Optional arguments:
-h, --help
- show this help message and exit
-a ATTRIBUTE, --attribute ATTRIBUTE
- attribute definition, attribute_name:attribute_type:at tribute_is_required:attribute_type_option_name=attribu te_type_option_value:… For example: display_name:string:true:max_length=255
-r REMOVE_ATTRIBUTE, --remove-attribute REMOVE_ATTRIBUTE
- attribute name
6.2.36. gnocchi status Copiar o linkLink copiado para a área de transferência!
usage: gnocchi status [-h] [-f {html,json,shell,table,value,yaml}] [-c COLUMN] [--max-width <integer>] [--print-empty] [--noindent] [--prefix PREFIX]
usage: gnocchi status [-h] [-f {html,json,shell,table,value,yaml}] [-c COLUMN]
[--max-width <integer>] [--print-empty] [--noindent]
[--prefix PREFIX]
Show the status of measurements processing
Optional arguments:
-h, --help
- show this help message and exit