metric

metric definition create

Usage

usage: -c metric definition create [-h]
                                [-f {adaptive_table,json,shell,table,value,yaml}]
                                [-c COLUMN]
                                [-m [NAME=VALUE [NAME=VALUE ...]]]
                                [--max-width <integer>] [--noindent]
                                [--prefix PREFIX]
                                [--description DESCRIPTION]
                                [--metric-type METRIC_TYPE]
                                [--query-interval QUERY_INTERVAL]
                                [--display-name DISPLAY_NAME]
                                [--alias ALIAS] [--scope SCOPE]
                                resource feature entity units

Description

Register metric type.

Return

None

Optional

 optional arguments:
-h, --help            show this help message and exit
--description DESCRIPTION
                      Auxiliary description (default: '')
--metric-type METRIC_TYPE
                      The type of the metric ('None'(normal)/'cumulative'
--query-interval QUERY_INTERVAL
                      The interval between 2 consecutive samples in influx
--display-name DISPLAY_NAME
                      The display name for the metirc
--alias ALIAS         The name for AWS API
--scope SCOPE         The scope for this metric (system or user)

metric definition get

Usage

usage: -c metric definition get [-h]
                             [-f {adaptive_table,json,shell,table,value,yaml}]
                             [-c COLUMN] [-m [NAME=VALUE [NAME=VALUE ...]]]
                             [--max-width <integer>] [--noindent]
                             [--prefix PREFIX]
                             metric_name

Description

Get the details of the requested metric.

Return

Returns dict: The requested metric details

Optional

 optional arguments:
-h, --help            show this help message and exit

metric definition list

Usage

usage: -c metric definition list [-h]
                              [-f {adaptive_table,csv,json,table,value,yaml}]
                              [-c COLUMN]
                              [-m [NAME=VALUE [NAME=VALUE ...]]]
                              [--max-width <integer>] [--noindent]
                              [--quote {all,minimal,none,nonnumeric}]
                              [--filters FILTERS]

Description

Get a list of the metrics.

Return

None

Optional

 optional arguments:
-h, --help            show this help message and exit
--filters FILTERS     A json representation of a map from tag name to a list of tag values. For example,
                      {'resource': ['cpu', 'memory'], 'entity': ['vm']} (default: None)

metric queries

Usage

usage: -c metric queries [-h]
                      [-f {adaptive_table,json,shell,table,value,yaml}]
                      [-c COLUMN] [-m [NAME=VALUE [NAME=VALUE ...]]]
                      [--max-width <integer>] [--noindent]
                      [--prefix PREFIX]
                      queries

Description

Run multiple sample queries.

Return

Returns dict: A map of result for each query. Map structure

Optional

 optional arguments:
-h, --help            show this help message and exit

metric query bottom

Usage

usage: -c metric query bottom [-h]
                           [-f {adaptive_table,csv,json,table,value,yaml}]
                           [-c COLUMN] [-m [NAME=VALUE [NAME=VALUE ...]]]
                           [--max-width <integer>] [--noindent]
                           [--quote {all,minimal,none,nonnumeric}]
                           [--start-timestamp START_TIMESTAMP]
                           [--end-timestamp END_TIMESTAMP]
                           [--entity-ids [ENTITY_IDS [ENTITY_IDS ...]]]
                           [--limit LIMIT]
                           [--retention-policy RETENTION_POLICY]
                           metric_name

Description

Query bottom samples.

Return

None

Optional

 optional arguments:
-h, --help            show this help message and exit
--start-timestamp START_TIMESTAMP
                      Start of query period (seconds since epoch), by default - 5 minute back
--end-timestamp END_TIMESTAMP
                      End of query period (seconds since epoch), by default - now
--entity-ids [ENTITY_IDS [ENTITY_IDS ...]]
                      Entity ids related to the metric sample
--limit LIMIT         Amount of results to show (default: 1000)
--retention-policy RETENTION_POLICY
                      Retention policy to use (default will be chosen by end_timestamp - start_timestamp)

metric query first

Usage

usage: -c metric query first [-h]
                          [-f {adaptive_table,csv,json,table,value,yaml}]
                          [-c COLUMN] [-m [NAME=VALUE [NAME=VALUE ...]]]
                          [--max-width <integer>] [--noindent]
                          [--quote {all,minimal,none,nonnumeric}]
                          [--start-timestamp START_TIMESTAMP]
                          [--end-timestamp END_TIMESTAMP]
                          [--entity-ids [ENTITY_IDS [ENTITY_IDS ...]]]
                          [--retention-policy RETENTION_POLICY]
                          metric_name

Description

Query first sample.

Return

None

Optional

 optional arguments:
-h, --help            show this help message and exit
--start-timestamp START_TIMESTAMP
                      Start of query period (seconds since epoch), by default - 5 minute back
--end-timestamp END_TIMESTAMP
                      End of query period (seconds since epoch), by default - now
--entity-ids [ENTITY_IDS [ENTITY_IDS ...]]
                      Entity ids related to the metric sample
--retention-policy RETENTION_POLICY
                      Retention policy to use (default will be chosen by end_timestamp - start_timestamp)

metric query history

Usage

usage: -c metric query history [-h]
                            [-f {adaptive_table,csv,json,table,value,yaml}]
                            [-c COLUMN] [-m [NAME=VALUE [NAME=VALUE ...]]]
                            [--max-width <integer>] [--noindent]
                            [--quote {all,minimal,none,nonnumeric}]
                            [--start-timestamp START_TIMESTAMP]
                            [--end-timestamp END_TIMESTAMP]
                            [--entity-ids [ENTITY_IDS [ENTITY_IDS ...]]]
                            [--limit LIMIT] [--offset OFFSET]
                            [--select-columns [SELECT_COLUMNS [SELECT_COLUMNS ...]]]
                            [--filter-columns FILTER_COLUMNS]
                            [--retention-policy RETENTION_POLICY]
                            metric_name

Description

Query samples.

Return

None

Optional

 optional arguments:
-h, --help            show this help message and exit
--start-timestamp START_TIMESTAMP
                      Start of query period (seconds since epoch), by default - 1 hour back
--end-timestamp END_TIMESTAMP
                      End of query period (seconds since epoch), by default - now
--entity-ids [ENTITY_IDS [ENTITY_IDS ...]]
                      Entity ids related to the metric sample
--limit LIMIT         Number of samples to returned, ordered by timestamp (default: None)
--offset OFFSET       Offset to paginate the results (default: None)
--select-columns [SELECT_COLUMNS [SELECT_COLUMNS ...]]
                      List of columns to be returned in the result, by default ["entity_id", "value"]
--filter-columns FILTER_COLUMNS
                      Json map from key to a list of values that are allowed for that key. Project id
                      filter is applied by default for non admin users
--retention-policy RETENTION_POLICY
                      Retention policy to use (default will be chosen by end_timestamp - start_timestamp)

metric query history_group_by_time

Usage

usage: -c metric query history_group_by_time [-h]
                                          [-f {adaptive_table,csv,json,table,value,yaml}]
                                          [-c COLUMN]
                                          [-m [NAME=VALUE [NAME=VALUE ...]]]
                                          [--max-width <integer>]
                                          [--noindent]
                                          [--quote {all,minimal,none,nonnumeric}]
                                          [--start-timestamp START_TIMESTAMP]
                                          [--end-timestamp END_TIMESTAMP]
                                          [--entity-ids [ENTITY_IDS [ENTITY_IDS ...]]]
                                          [--limit LIMIT] [--offset OFFSET]
                                          [--select-columns [SELECT_COLUMNS [SELECT_COLUMNS ...]]]
                                          [--filter-columns FILTER_COLUMNS]
                                          [--statistic STATISTIC]
                                          [--interval INTERVAL]
                                          [--time-type TIME_TYPE]
                                          [--fill-type FILL_TYPE]
                                          [--fill-number FILL_NUMBER]
                                          [--rate RATE]
                                          [--retention-policy RETENTION_POLICY]
                                          metric_name

Description

Query samples.

Return

None

Optional

 optional arguments:
-h, --help            show this help message and exit
--start-timestamp START_TIMESTAMP
                      Start of query period (seconds since epoch), by default - 1 hour back
--end-timestamp END_TIMESTAMP
                      End of query period (seconds since epoch), by default - now
--entity-ids [ENTITY_IDS [ENTITY_IDS ...]]
                      Entity ids related to the metric sample
--limit LIMIT         Number of samples to returned, ordered by timestamp (default: None)
--offset OFFSET       Offset to paginate the results (default: None)
--select-columns [SELECT_COLUMNS [SELECT_COLUMNS ...]]
                      List of colums to be returned in the result, by default ["entity_id", "value"]
--filter-columns FILTER_COLUMNS
                      Json map from key to a list of values that are allowed for that key. Project id
                      filter is applied by default for non admin users
--statistic STATISTIC
                      Valid options: count, mean, sum, min and max
--interval INTERVAL   Time interval
--time-type TIME_TYPE
                      Valid options: seconds, minutes, hours, days and weeks
--fill-type FILL_TYPE
                      Valid options: none, null, number and previous
--fill-number FILL_NUMBER
                      Relevant only if fill type is number
--rate RATE           Relevant only if metric is derivative - rate of change between the field values in seconds
--retention-policy RETENTION_POLICY
                      Retention policy to use (default will be chosen by end_timestamp - start_timestamp)

metric query last

Usage

usage: -c metric query last [-h]
                         [-f {adaptive_table,csv,json,table,value,yaml}]
                         [-c COLUMN] [-m [NAME=VALUE [NAME=VALUE ...]]]
                         [--max-width <integer>] [--noindent]
                         [--quote {all,minimal,none,nonnumeric}]
                         [--start-timestamp START_TIMESTAMP]
                         [--end-timestamp END_TIMESTAMP]
                         [--entity-ids [ENTITY_IDS [ENTITY_IDS ...]]]
                         [--retention-policy RETENTION_POLICY]
                         metric_name

Description

Query last sample.

Return

None

Optional

 optional arguments:
-h, --help            show this help message and exit
--start-timestamp START_TIMESTAMP
                      Start of query period (seconds since epoch), by default - 5 minute back
--end-timestamp END_TIMESTAMP
                      End of query period (seconds since epoch), by default - now
--entity-ids [ENTITY_IDS [ENTITY_IDS ...]]
                      Entity ids related to the metric sample
--retention-policy RETENTION_POLICY
                      Retention policy to use (default will be chosen by end_timestamp - start_timestamp)

metric query top

Usage

usage: -c metric query top [-h]
                        [-f {adaptive_table,csv,json,table,value,yaml}]
                        [-c COLUMN] [-m [NAME=VALUE [NAME=VALUE ...]]]
                        [--max-width <integer>] [--noindent]
                        [--quote {all,minimal,none,nonnumeric}]
                        [--start-timestamp START_TIMESTAMP]
                        [--end-timestamp END_TIMESTAMP]
                        [--entity-ids [ENTITY_IDS [ENTITY_IDS ...]]]
                        [--limit LIMIT]
                        [--retention-policy RETENTION_POLICY]
                        metric_name

Description

Query top samples.

Return

None

Optional

 optional arguments:
-h, --help            show this help message and exit
--start-timestamp START_TIMESTAMP
                      Start of query period (seconds since epoch), by default - 5 minute back
--end-timestamp END_TIMESTAMP
                      End of query period (seconds since epoch), by default - now
--entity-ids [ENTITY_IDS [ENTITY_IDS ...]]
                      Entity ids related to the metric sample
--limit LIMIT         Amount of results to show
--retention-policy RETENTION_POLICY
                      Retention policy to use (default will be chosen by end_timestamp - start_timestamp)