Rating service command-line clientThe cloudkitty client is the command-line
interface (CLI) for the Rating service API and its extensions.
This chapter documents cloudkitty version
0.4.1.
For help on a specific cloudkitty
command, enter:
$cloudkittyCOMMANDcloudkitty usageusage: cloudkitty [--version] [-d] [-v] [--timeout TIMEOUT]
[--cloudkitty-url <CLOUDKITTY_URL>]
[--cloudkitty-api-version CLOUDKITTY_API_VERSION]
[--os-tenant-id <tenant-id>]
[--os-region-name <region-name>]
[--os-auth-token <auth-token>]
[--os-service-type <service-type>]
[--os-endpoint-type <endpoint-type>] [--os-cacert <cacert>]
[--os-insecure <insecure>] [--os-cert-file <cert-file>]
[--os-key-file <key-file>] [--os-cert <cert>]
[--os-key <key>] [--os-project-name <project-name>]
[--os-project-id <project-id>]
[--os-user-domain-id <user-domain-id>]
[--os-user-domain-name <user-domain-name>]
[--os-endpoint <endpoint>] [--os-auth-system <auth-system>]
[--os-username <username>] [--os-password <password>]
[--os-tenant-name <tenant-name>] [--os-token <token>]
[--os-auth-url <auth-url>]
<subcommand> ...Subcommandsmodule-disable
Disable a module.
module-enable
Enable a module.
module-list
List the samples for this meters.
collector-mapping-createcollector-mapping-deletecollector-mapping-getcollector-mapping-listcollector-state-disablecollector-state-enablecollector-state-getreport-tenant-listtotal-getstorage-dataframe-listhashmap-field-create
Create a field.
hashmap-field-delete
Delete a field.
hashmap-field-list
Create a field.
hashmap-group-create
Create a group.
hashmap-group-delete
Delete a group.
hashmap-group-list
List groups.
hashmap-mapping-create
Create a mapping.
hashmap-mapping-delete
Delete a mapping.
hashmap-mapping-list
List mappings.
hashmap-mapping-update
Update a mapping.
hashmap-service-create
Create a service.
hashmap-service-delete
Delete a service.
hashmap-service-list
List services.
hashmap-threshold-create
Create a mapping.
hashmap-threshold-delete
Delete a threshold.
hashmap-threshold-get
Get a threshold.
hashmap-threshold-group
Get a threshold group.
hashmap-threshold-list
List thresholds.
hashmap-threshold-update
Update a threshold.
bash-completion
Prints all of the commands and options to
stdout.
help
Display help about this program or one of its
subcommands.
cloudkitty optional arguments--version
show program's version number and exit
-d, --debug
Defaults to env[CLOUDKITTYCLIENT_DEBUG].
-v, --verbose
Print more verbose output.
--timeout TIMEOUT
Number of seconds to wait for a response.
--cloudkitty-url <CLOUDKITTY_URL>DEPRECATED, use --os-endpoint instead.
Defaults to env[CLOUDKITTY_URL].
--cloudkitty-api-version CLOUDKITTY_API_VERSION
Defaults to env[CLOUDKITTY_API_VERSION] or 1.
--os-tenant-id <tenant-id>
Defaults to env[OS_TENANT_ID].
--os-region-name <region-name>
Defaults to env[OS_REGION_NAME].
--os-auth-token <auth-token>
Defaults to env[OS_AUTH_TOKEN].
--os-service-type <service-type>
Defaults to env[OS_SERVICE_TYPE].
--os-endpoint-type <endpoint-type>
Defaults to env[OS_ENDPOINT_TYPE].
--os-cacert <cacert>
Defaults to env[OS_CACERT].
--os-insecure <insecure>
Defaults to env[OS_INSECURE].
--os-cert-file <cert-file>
Defaults to env[OS_CERT_FILE].
--os-key-file <key-file>
Defaults to env[OS_KEY_FILE].
--os-cert <cert>
Defaults to env[OS_CERT].
--os-key <key>
Defaults to env[OS_KEY].
--os-project-name <project-name>
Defaults to env[OS_PROJECT_NAME].
--os-project-id <project-id>
Defaults to env[OS_PROJECT_ID].
--os-user-domain-id <user-domain-id>
Defaults to env[OS_USER_DOMAIN_ID].
--os-user-domain-name <user-domain-name>
Defaults to env[OS_USER_DOMAIN_NAME].
--os-endpoint <endpoint>
Defaults to env[OS_ENDPOINT].
--os-auth-system <auth-system>
Defaults to env[OS_AUTH_SYSTEM].
--os-username <username>
Defaults to env[OS_USERNAME].
--os-password <password>
Defaults to env[OS_PASSWORD].
--os-tenant-name <tenant-name>
Defaults to env[OS_TENANT_NAME].
--os-token <token>
Defaults to env[OS_TOKEN].
--os-auth-url <auth-url>
Defaults to env[OS_AUTH_URL].
cloudkitty collector-mapping-createusage: cloudkitty collector-mapping-create --collector COLLECTOR --service
SERVICEOptional arguments--collector COLLECTOR
Map a service to this collector. Required.
--service SERVICE
Map a collector to this service. Required.
cloudkitty collector-mapping-deleteusage: cloudkitty collector-mapping-delete --service SERVICEOptional arguments--service SERVICE
Filter on this service. Required.
cloudkitty collector-mapping-getusage: cloudkitty collector-mapping-get --service SERVICEOptional arguments--service SERVICE
Which service to get the mapping for. Required.
cloudkitty collector-mapping-listusage: cloudkitty collector-mapping-list [--collector COLLECTOR]Optional arguments--collector COLLECTOR
Collector name to filter on. Defaults to None.
cloudkitty collector-state-disableusage: cloudkitty collector-state-disable --name NAMEOptional arguments--name NAME
Name of the collector. Required.
cloudkitty collector-state-enableusage: cloudkitty collector-state-enable --name NAMEOptional arguments--name NAME
Name of the collector. Required.
cloudkitty collector-state-getusage: cloudkitty collector-state-get --name NAMEOptional arguments--name NAME
Name of the collector. Required.
cloudkitty hashmap-field-createusage: cloudkitty hashmap-field-create -n NAME -s SERVICE_ID
Create a field.
Optional arguments-n NAME, --name NAME
Field name Required.
-s SERVICE_ID, --service-id SERVICE_ID
Service id Required.
cloudkitty hashmap-field-deleteusage: cloudkitty hashmap-field-delete -f FIELD_ID
Delete a field.
Optional arguments-f FIELD_ID, --field-id FIELD_ID
Field uuid Required.
cloudkitty hashmap-field-listusage: cloudkitty hashmap-field-list -s SERVICE_ID
Create a field.
Optional arguments-s SERVICE_ID, --service-id SERVICE_ID
Service id Required.
cloudkitty hashmap-group-createusage: cloudkitty hashmap-group-create -n NAME
Create a group.
Optional arguments-n NAME, --name NAME
Group name Required.
cloudkitty hashmap-group-deleteusage: cloudkitty hashmap-group-delete -g GROUP_ID [-r RECURSIVE]
Delete a group.
Optional arguments-g GROUP_ID, --group-id GROUP_ID
Group uuid Required.
-r RECURSIVE, --recursive RECURSIVE
Delete the group's mappings Defaults to False.
cloudkitty hashmap-group-listusage: cloudkitty hashmap-group-list
List groups.
cloudkitty hashmap-mapping-createusage: cloudkitty hashmap-mapping-create -c COST [-v VALUE] [-t TYPE]
[-s SERVICE_ID] [-f FIELD_ID]
[-g GROUP_ID]
Create a mapping.
Optional arguments-c COST, --cost COST
Mapping cost Required.
-v VALUE, --value VALUE
Mapping value
-t TYPE, --type TYPE
Mapping type (flat, rate)
-s SERVICE_ID, --service-id SERVICE_ID
Service id
-f FIELD_ID, --field-id FIELD_ID
Field id
-g GROUP_ID, --group-id GROUP_ID
Group id
cloudkitty hashmap-mapping-deleteusage: cloudkitty hashmap-mapping-delete -m MAPPING_ID
Delete a mapping.
Optional arguments-m MAPPING_ID, --mapping-id MAPPING_ID
Mapping uuid Required.
cloudkitty hashmap-mapping-listusage: cloudkitty hashmap-mapping-list [-s SERVICE_ID] [-f FIELD_ID]
[-g GROUP_ID]
List mappings.
Optional arguments-s SERVICE_ID, --service-id SERVICE_ID
Service id
-f FIELD_ID, --field-id FIELD_ID
Field id
-g GROUP_ID, --group-id GROUP_ID
Group id
cloudkitty hashmap-mapping-updateusage: cloudkitty hashmap-mapping-update -m MAPPING_ID [-c COST] [-v VALUE]
[-t TYPE] [-g GROUP_ID]
Update a mapping.
Optional arguments-m MAPPING_ID, --mapping-id MAPPING_ID
Mapping id Required.
-c COST, --cost COST
Mapping cost
-v VALUE, --value VALUE
Mapping value
-t TYPE, --type TYPE
Mapping type (flat, rate)
-g GROUP_ID, --group-id GROUP_ID
Group id
cloudkitty hashmap-service-createusage: cloudkitty hashmap-service-create -n NAME
Create a service.
Optional arguments-n NAME, --name NAME
Service name Required.
cloudkitty hashmap-service-deleteusage: cloudkitty hashmap-service-delete -s SERVICE_ID
Delete a service.
Optional arguments-s SERVICE_ID, --service-id SERVICE_ID
Service uuid Required.
cloudkitty hashmap-service-listusage: cloudkitty hashmap-service-list
List services.
cloudkitty hashmap-threshold-createusage: cloudkitty hashmap-threshold-create -l LEVEL -c COST [-m MAP_TYPE]
[-s SERVICE_ID] [-f FIELD_ID]
[-g GROUP_ID]
Create a mapping.
Optional arguments-l LEVEL, --level LEVEL
Threshold level Required.
-c COST, --cost COST
Threshold cost Required.
-m MAP_TYPE, --map-type MAP_TYPE
Threshold type (flat, rate)
-s SERVICE_ID, --service-id SERVICE_ID
Service id
-f FIELD_ID, --field-id FIELD_ID
Field id
-g GROUP_ID, --group-id GROUP_ID
Group id
cloudkitty hashmap-threshold-deleteusage: cloudkitty hashmap-threshold-delete -t THRESHOLD_ID
Delete a threshold.
Optional arguments-t THRESHOLD_ID, --threshold-id THRESHOLD_ID
Threshold uuid Required.
cloudkitty hashmap-threshold-getusage: cloudkitty hashmap-threshold-get -t THRESHOLD_ID
Get a threshold.
Optional arguments-t THRESHOLD_ID, --threshold-id THRESHOLD_ID
Threshold uuid Required.
cloudkitty hashmap-threshold-groupusage: cloudkitty hashmap-threshold-group -t THRESHOLD_ID
Get a threshold group.
Optional arguments-t THRESHOLD_ID, --threshold-id THRESHOLD_ID
Threshold uuid Required.
cloudkitty hashmap-threshold-listusage: cloudkitty hashmap-threshold-list [-s SERVICE_ID] [-f FIELD_ID]
[-g GROUP_ID]
[--no-group {True,False}]
List thresholds.
Optional arguments-s SERVICE_ID, --service-id SERVICE_ID
Service id
-f FIELD_ID, --field-id FIELD_ID
Field id
-g GROUP_ID, --group-id GROUP_ID
Group id
--no-group {True,False}
If True, list only orhpaned thresholds
cloudkitty hashmap-threshold-updateusage: cloudkitty hashmap-threshold-update -t THRESHOLD_ID [-l LEVEL]
[-c COST] [-m MAP_TYPE]
[-g GROUP_ID]
Update a threshold.
Optional arguments-t THRESHOLD_ID, --threshold-id THRESHOLD_ID
Threshold id Required.
-l LEVEL, --level LEVEL
Threshold level
-c COST, --cost COST
Threshold cost
-m MAP_TYPE, --map-type MAP_TYPE
Threshold type (flat, rate)
-g GROUP_ID, --group-id GROUP_ID
Group id
cloudkitty module-disableusage: cloudkitty module-disable -n NAME
Disable a module.
Optional arguments-n NAME, --name NAME
Module name Required.
cloudkitty module-enableusage: cloudkitty module-enable -n NAME
Enable a module.
Optional arguments-n NAME, --name NAME
Module name Required.
cloudkitty module-listusage: cloudkitty module-list
List the samples for this meters.
cloudkitty report-tenant-listusage: cloudkitty report-tenant-listcloudkitty storage-dataframe-listusage: cloudkitty storage-dataframe-list --begin BEGIN --end END
[--tenant TENANT]
[--resource-type RESOURCE_TYPE]Optional arguments--begin BEGIN
Starting date/time (YYYY-MM-ddThh:mm:ss)
Required.
--end END
Ending date/time (YYYY-MM-ddThh:mm:ss)
Required.
--tenant TENANT
Tenant ID Defaults to None.
--resource-type RESOURCE_TYPE
Resource type (compute, image, ...) Defaults
to None.
cloudkitty total-getusage: cloudkitty total-get [-t TOTAL_TENANT_ID] [-b BEGIN] [-e END]Optional arguments-t TOTAL_TENANT_ID, --tenant-id TOTAL_TENANT_ID
Tenant id
-b BEGIN, --begin BEGIN
Begin timestamp
-e END, --end END
End timestamp