CLI Reference¶
V1 Client¶
collector disable¶
(DEPRECATED) Disable a collector.
cloudkitty collector disable [-h] name
-
-h,--help¶ show this help message and exit
-
name¶ Name of the collector
collector enable¶
(DEPRECATED) Enable a collector.
cloudkitty collector enable [-h] name
-
-h,--help¶ show this help message and exit
-
name¶ Name of the collector
collector state get¶
(DEPRECATED) Get the state of a collector.
cloudkitty collector state get [-h] name
-
-h,--help¶ show this help message and exit
-
name¶ Name of the collector
collector-mapping create¶
(DEPRECATED) Create a service to collector mapping.
cloudkitty collector-mapping create [-h] service collector
-
-h,--help¶ show this help message and exit
-
service¶ Name of the service
-
collector¶ Name of the collector
collector-mapping delete¶
(DEPRECATED) Delete a service to collector mapping.
cloudkitty collector-mapping delete [-h] service
-
-h,--help¶ show this help message and exit
-
service¶ Name of the service
collector-mapping get¶
(DEPRECATED) Get a service to collector mapping.
cloudkitty collector-mapping get [-h] service
-
-h,--help¶ show this help message and exit
-
service¶ Name of the service to filter on
collector-mapping list¶
(DEPRECATED) List service to collector mappings.
cloudkitty collector-mapping list [-h] [--collector COLLECTOR]
-
-h,--help¶ show this help message and exit
-
--collector<COLLECTOR>¶ Name of the collector to filter on
dataframes get¶
List stored dataframes or generate CSV reports.
Dataframes can be filtered on resource_type and project_id. CSV reports can be generated with the ‘df-to-csv’ formatter. A config file may be provided to configure the output of that formatter. See documentation for more details.
cloudkitty dataframes get
[-h]
[-b BEGIN]
[-e END]
[-p TENANT_ID]
[-r RESOURCE_TYPE]
-
-h,--help¶ show this help message and exit
-
-b<BEGIN>,--begin<BEGIN>¶ Begin timestamp
-
-e<END>,--end<END>¶ End timestamp
-
-p<TENANT_ID>,--project-id<TENANT_ID>¶ Id of the tenant to filter on
-
-r<RESOURCE_TYPE>,--resource_type<RESOURCE_TYPE>¶ Resource type to filter on
hashmap field create¶
Create a hashmap field.
cloudkitty hashmap field create [-h] service_id name
-
-h,--help¶ show this help message and exit
-
service_id¶ Service ID
-
name¶ Field name
hashmap field delete¶
Delete a hashmap field.
cloudkitty hashmap field delete [-h] field_id
-
-h,--help¶ show this help message and exit
-
field_id¶ Field ID
hashmap field get¶
Get a Hashmap field.
cloudkitty hashmap field get [-h] field_id
-
-h,--help¶ show this help message and exit
-
field_id¶ Field ID
hashmap field list¶
List hashmap fields for the given service.
cloudkitty hashmap field list [-h] service_id
-
-h,--help¶ show this help message and exit
-
service_id¶ Service ID
hashmap group create¶
Create a Hashmap group.
cloudkitty hashmap group create [-h] name
-
-h,--help¶ show this help message and exit
-
name¶ Group Name
hashmap group delete¶
Create a Hashmap group.
cloudkitty hashmap group delete [-h] [--recursive] group_id
-
-h,--help¶ show this help message and exit
-
--recursive¶ Delete mappings recursively
-
group_id¶ Group ID
hashmap group list¶
List existing hashmap groups.
cloudkitty hashmap group list [-h]
-
-h,--help¶ show this help message and exit
hashmap group mappings get¶
Get all Hashmap mappings for the given group.
cloudkitty hashmap group mappings get [-h] group_id
-
-h,--help¶ show this help message and exit
-
group_id¶ Group ID
hashmap group thresholds get¶
Get all thresholds for the given group.
cloudkitty hashmap group thresholds get [-h] group_id
-
-h,--help¶ show this help message and exit
-
group_id¶ Group ID
hashmap mapping create¶
Create a Hashmap mapping.
cloudkitty hashmap mapping create
[-h]
[-s SERVICE_ID]
[-g GROUP_ID]
[--field-id FIELD_ID]
[-p TENANT_ID]
[-t TYPE]
[--value VALUE]
cost
-
-h,--help¶ show this help message and exit
-
-s<SERVICE_ID>,--service-id<SERVICE_ID>¶ Service ID
-
-g<GROUP_ID>,--group-id<GROUP_ID>¶ Group ID
-
--field-id<FIELD_ID>¶ Field ID
-
-p<TENANT_ID>,--project-id<TENANT_ID>¶ Project ID
-
-t<TYPE>,--type<TYPE>¶ Mapping type
-
--value<VALUE>¶ Value
-
cost¶ Cost
hashmap mapping delete¶
Delete a Hashmap mapping.
cloudkitty hashmap mapping delete [-h] mapping_id
-
-h,--help¶ show this help message and exit
-
mapping_id¶ Mapping ID
hashmap mapping get¶
Get a hashmap mapping.
cloudkitty hashmap mapping get [-h] mapping_id
-
-h,--help¶ show this help message and exit
-
mapping_id¶ Mapping ID to filter on
hashmap mapping list¶
List hashmap mappings.
cloudkitty hashmap mapping list
[-h]
[-s SERVICE_ID]
[-g GROUP_ID]
[--field-id FIELD_ID]
[-p TENANT_ID]
[--filter-tenant]
[--no-group]
-
-h,--help¶ show this help message and exit
-
-s<SERVICE_ID>,--service-id<SERVICE_ID>¶ Service ID to filter on
-
-g<GROUP_ID>,--group-id<GROUP_ID>¶ Group ID to filter on
-
--field-id<FIELD_ID>¶ Field ID to filter on
-
-p<TENANT_ID>,--project-id<TENANT_ID>¶ Project ID to filter on
-
--filter-tenant¶ Explicitly filter on given tenant (allows to filter on tenant being None)
-
--no-group¶ Filter on orphaned mappings
hashmap mapping update¶
Update a Hashmap mapping.
cloudkitty hashmap mapping update
[-h]
[-s SERVICE_ID]
[-g GROUP_ID]
[--field-id FIELD_ID]
[-p TENANT_ID]
[--value VALUE]
[--cost COST]
mapping_id
-
-h,--help¶ show this help message and exit
-
-s<SERVICE_ID>,--service-id<SERVICE_ID>¶ Service ID
-
-g<GROUP_ID>,--group-id<GROUP_ID>¶ Group ID
-
--field-id<FIELD_ID>¶ Field ID
-
-p<TENANT_ID>,--project-id<TENANT_ID>¶ Project ID
-
--value<VALUE>¶ Value
-
--cost<COST>¶ Cost
-
mapping_id¶ Mapping ID
hashmap mapping-types list¶
Get hashmap mapping types/
cloudkitty hashmap mapping-types list [-h]
-
-h,--help¶ show this help message and exit
hashmap service create¶
Create a hashmap service.
cloudkitty hashmap service create [-h] name
-
-h,--help¶ show this help message and exit
-
name¶ Service Name
hashmap service delete¶
Delete a hashmap service
cloudkitty hashmap service delete [-h] service_id
-
-h,--help¶ show this help message and exit
-
service_id¶ Service ID
hashmap service get¶
Get a hashmap service
cloudkitty hashmap service get [-h] service_id
-
-h,--help¶ show this help message and exit
-
service_id¶ Service ID
hashmap service list¶
List hashmap services.
cloudkitty hashmap service list [-h]
-
-h,--help¶ show this help message and exit
hashmap threshold create¶
Create a Hashmap threshold.
cloudkitty hashmap threshold create
[-h]
[-s SERVICE_ID]
[-g GROUP_ID]
[--field-id FIELD_ID]
[-p TENANT_ID]
[-t TYPE]
level
cost
-
-h,--help¶ show this help message and exit
-
-s<SERVICE_ID>,--service-id<SERVICE_ID>¶ Service ID
-
-g<GROUP_ID>,--group-id<GROUP_ID>¶ Group ID
-
--field-id<FIELD_ID>¶ Field ID
-
-p<TENANT_ID>,--project-id<TENANT_ID>¶ Project ID
-
-t<TYPE>,--type<TYPE>¶ Threshold type
-
level¶ Threshold level
-
cost¶ Cost
hashmap threshold delete¶
Delete a Hashmap threshold.
cloudkitty hashmap threshold delete [-h] threshold_id
-
-h,--help¶ show this help message and exit
-
threshold_id¶ Threshold ID
hashmap threshold get¶
Get a Hashmap threshold.
cloudkitty hashmap threshold get [-h] threshold_id
-
-h,--help¶ show this help message and exit
-
threshold_id¶ Threshold ID to filter on
hashmap threshold list¶
List Hashmap thresholds
cloudkitty hashmap threshold list
[-h]
[-s SERVICE_ID]
[-g GROUP_ID]
[--field-id FIELD_ID]
[-p TENANT_ID]
[--filter-tenant]
[--no-group]
-
-h,--help¶ show this help message and exit
-
-s<SERVICE_ID>,--service-id<SERVICE_ID>¶ Service ID to filter on
-
-g<GROUP_ID>,--group-id<GROUP_ID>¶ Group ID to filter on
-
--field-id<FIELD_ID>¶ Field ID to filter on
-
-p<TENANT_ID>,--project-id<TENANT_ID>¶ Project ID to filter on
-
--filter-tenant¶ Explicitly filter on given tenant (allows to filter on tenant being None)
-
--no-group¶ Filter on orphaned thresholds
hashmap threshold update¶
Update a Hashmap threshold.
cloudkitty hashmap threshold update
[-h]
[-s SERVICE_ID]
[-g GROUP_ID]
[--field-id FIELD_ID]
[-p TENANT_ID]
[-l LEVEL]
[--cost COST]
threshold_id
-
-h,--help¶ show this help message and exit
-
-s<SERVICE_ID>,--service-id<SERVICE_ID>¶ Service ID
-
-g<GROUP_ID>,--group-id<GROUP_ID>¶ Group ID
-
--field-id<FIELD_ID>¶ Field ID
-
-p<TENANT_ID>,--project-id<TENANT_ID>¶ Project ID
-
-l<LEVEL>,--level<LEVEL>¶ Threshold level
-
--cost<COST>¶ Cost
-
threshold_id¶ Threshold ID
info config get¶
Get information about the current configuration.
cloudkitty info config get [-h]
-
-h,--help¶ show this help message and exit
info metric get¶
Get information about current metrics.
cloudkitty info metric get [-h] metric_name
-
-h,--help¶ show this help message and exit
-
metric_name¶ Metric name
info metric list¶
Get information about a single metric.
cloudkitty info metric list [-h]
-
-h,--help¶ show this help message and exit
module disable¶
Disable a rating module.
cloudkitty module disable [-h] module_id
-
-h,--help¶ show this help message and exit
-
module_id¶ Module name
module enable¶
Enable a rating module.
cloudkitty module enable [-h] module_id
-
-h,--help¶ show this help message and exit
-
module_id¶ Module name
module get¶
Get a rating module or list loaded rating modules.
If module_id is not specified, returns a list of all loaded rating modules.
cloudkitty module get [-h] module_id
-
-h,--help¶ show this help message and exit
-
module_id¶ Module name
module list¶
List loaded rating modules.
cloudkitty module list [-h]
-
-h,--help¶ show this help message and exit
module set priority¶
Set the priority of a rating module.
cloudkitty module set priority [-h] module_id priority
-
-h,--help¶ show this help message and exit
-
module_id¶ Module name
-
priority¶ Priority (int)
pyscript create¶
Create a PyScript.
cloudkitty pyscript create [-h] name data
-
-h,--help¶ show this help message and exit
-
name¶ Script Name
-
data¶ Script Data or data file
pyscript delete¶
Delete a PyScript.
cloudkitty pyscript delete [-h] script_id
-
-h,--help¶ show this help message and exit
-
script_id¶ Script ID
pyscript get¶
Get a PyScript.
cloudkitty pyscript get [-h] script_id
-
-h,--help¶ show this help message and exit
-
script_id¶ Script ID
pyscript list¶
List existing PyScripts.
cloudkitty pyscript list [-h] [-n]
-
-h,--help¶ show this help message and exit
-
-n,--no-data¶ Set to true to remove script data from output
pyscript update¶
Update a PyScript.
cloudkitty pyscript update [-h] [-n NAME] [-d DATA] script_id
-
-h,--help¶ show this help message and exit
-
-n<NAME>,--name<NAME>¶ Script Name
-
-d<DATA>,--data<DATA>¶ Script Data or data file
-
script_id¶ Script ID
report tenant list¶
Get rated tenants for the given period.
Begin defaults to the beginning of the current month and end defaults to the beginning of the next month.
cloudkitty report tenant list [-h] [-b BEGIN] [-e END]
-
-h,--help¶ show this help message and exit
-
-b<BEGIN>,--begin<BEGIN>¶ Begin timestamp.
-
-e<END>,--end<END>¶ End timestamp.
summary get¶
Get a summary report.
cloudkitty summary get
[-h]
[-t TENANT_ID]
[-b BEGIN]
[-e END]
[-s SERVICE]
[-g GROUPBY [GROUPBY ...]]
[-a]
-
-h,--help¶ show this help message and exit
-
-t<TENANT_ID>,--tenant-id<TENANT_ID>¶ Tenant id.
-
-b<BEGIN>,--begin<BEGIN>¶ Begin timestamp.
-
-e<END>,--end<END>¶ End timestamp.
-
-s<SERVICE>,--service<SERVICE>¶ Service Type.
-
-g<GROUPBY>,--groupby<GROUPBY>¶ Fields to group by, space-separated. (res_type and tenant_id are supported for now)
-
-a,--all-tenants¶ Allows to get summary from all tenants (admin only). Defaults to False.
total get¶
(DEPRECATED) Get total reports.
cloudkitty total get
[-h]
[--prefix PREFIX]
[-t TENANT_ID]
[-b BEGIN]
[-e END]
[-s SERVICE]
[-g GROUPBY [GROUPBY ...]]
[-a]
-
-h,--help¶ show this help message and exit
-
--prefix<PREFIX>¶ add a prefix to all variable names
-
-t<TENANT_ID>,--tenant-id<TENANT_ID>¶ Tenant id.
-
-b<BEGIN>,--begin<BEGIN>¶ Begin timestamp.
-
-e<END>,--end<END>¶ End timestamp.
-
-s<SERVICE>,--service<SERVICE>¶ Service Type.
-
-g<GROUPBY>,--groupby<GROUPBY>¶ Fields to group by, space-separated. (res_type and tenant_id are supported for now)
-
-a,--all-tenants¶ Allows to get summary from all tenants (admin only). Defaults to False.
V2 Client¶
dataframes add¶
Add one or several DataFrame objects to the storage backend.
cloudkitty dataframes add [-h] datafile
-
-h,--help¶ show this help message and exit
-
datafile¶ File formatted as a JSON object having a DataFrame listunder a ‘dataframes’ key.’-‘ (hyphen) can be specified for using stdin.
scope state get¶
Get information about current state of several scopes.
cloudkitty scope state get
[-h]
[--scope-id SCOPE_ID]
[--scope-key SCOPE_KEY]
[--collector COLLECTOR]
[--fetcher FETCHER]
[--offset OFFSET]
[--limit LIMIT]
-
-h,--help¶ show this help message and exit
-
--scope-id<SCOPE_ID>¶ Optional filter on Scope ID
-
--scope-key<SCOPE_KEY>¶ Optional filter on Scope Key
-
--collector<COLLECTOR>¶ Optional filter on Collector
-
--fetcher<FETCHER>¶ Optional filter on Fetcher
-
--offset<OFFSET>¶ Index of the first scope
-
--limit<LIMIT>¶ Maximal number of scopes
summary get¶
Get a summary for a given period.
cloudkitty summary get
[-h]
[--offset OFFSET]
[--limit LIMIT]
[-g GROUPBY]
[--filter FILTER]
[-b BEGIN]
[-e END]
-
-h,--help¶ show this help message and exit
-
--offset<OFFSET>¶ Index of the first element
-
--limit<LIMIT>¶ Maximal number of elements
-
-g<GROUPBY>,--groupby<GROUPBY>¶ Attribute to group the summary by. Can be specified several times
-
--filter<FILTER>¶ Optional filter, in ‘key:value’ format. Can be specified several times.
-
-b<BEGIN>,--begin<BEGIN>¶ Start of the period to query, in iso8601 format. Example: 2019-05-01T00:00:00Z.
-
-e<END>,--end<END>¶ End of the period to query, in iso8601 format. Example: 2019-06-01T00:00:00Z.