metric

metric definition create

Usage

  usage: symp metric definition create
[-f {adaptive_table,json,shell,table,value,yaml}]
                                       [-c COLUMN] [--max-width <integer>]
                                       [--noindent] [--prefix PREFIX]
                                       [-m [NAME=VALUE [NAME=VALUE ...]]]
                                       [--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.

Returns

Returns str: Metrics full name, used to submit the metric’s samples

Mandatory

positional arguments:
  resource              The measured resource ('cpu'/'memory'/'storage'/'rest')
  feature               The measured feature of the resource ('consumed'/'used'/'free'/'cached'/'received'/
                        'received_error'/'received_drop'/'transmitted'/'transmitted_error'/'transmitted_error'/'throughput'/
                        'latency'/'read_iops'/'write_iops'/'read_latency'/'write_latency'/'read_throughput'/'write_throughput'/
                        'error_rate'/'request_rate'/
  entity                The measured entity ('vm'/'project'/'tenant'/'user'/'node'/'cluster service'/'volume'/
                        'disk'/'storage pool'/'network interface')
  units                 The units of the measurement ('rate'/'MHz'/'MB'/'cores'/'byte'/'packet'/'IOPS'/
                        'ms'/'MBit_sec'/'sec'/

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

Description

Get the details of the requested metric.

Returns

Returns dict: The requested metric details

Mandatory

positional arguments:
  metric_name           Requested metric name

Optional

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

metric definition list

Usage

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

Description

Get a list of the metrics.

Returns

Returns list: List of metric details

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: symp metric queries
[-f {adaptive_table,json,shell,table,value,yaml}]
                             [-c COLUMN] [--max-width <integer>] [--noindent]
                             [--prefix PREFIX]
                             [-m [NAME=VALUE [NAME=VALUE ...]]]
                             queries

Description

Run multiple sample queries.

Returns

Returns dict: A map of result for each query. Map structure {<query identifier string>: <query result>}}

Mandatory

positional arguments:
  queries               A json representation of query commands map. Map structure,
                        {<query identifier string>: [<query type>, {<query param>: <query param value>}]}
                        Example:
                        {
                        'cpu_metric_query_top': ['query_top', {'metric_name': 'cpu_metric'}],
                        'memory_metric_query_history': ['query_history', {'metric_name': 'memory_metric', 'limit': 1, 'offset': 2}],
                        }

Optional

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

metric query bottom

Usage

  usage: symp metric query bottom
[-f {adaptive_table,csv,json,table,value,yaml}]
                                  [-c COLUMN] [--max-width <integer>]
                                  [--noindent]
                                  [--quote {all,minimal,none,nonnumeric}]
                                  [-m [NAME=VALUE [NAME=VALUE ...]]]
                                  [--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.

Returns

Returns list: Bottom samples

Mandatory

positional arguments:
  metric_name           Metric name to query

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

Description

Query first sample.

Returns

Returns list: First sample

Mandatory

positional arguments:
  metric_name           Metric name to query

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: symp metric query history
[-f {adaptive_table,csv,json,table,value,yaml}]
                                   [-c COLUMN] [--max-width <integer>]
                                   [--noindent]
                                   [--quote {all,minimal,none,nonnumeric}]
                                   [-m [NAME=VALUE [NAME=VALUE ...]]]
                                   [--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.

Returns

Returns list: Samples

Mandatory

positional arguments:
  metric_name           Metric name to query

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: symp metric query history_group_by_time
[-f {adaptive_table,csv,json,table,value,yaml}]
                                                 [-c COLUMN]
                                                 [--max-width <integer>]
                                                 [--noindent]
                                                 [--quote {all,minimal,none,nonnumeric}]
                                                 [-m [NAME=VALUE [NAME=VALUE ...]]]
                                                 [--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.

Returns

Returns list: Samples

Mandatory

positional arguments:
  metric_name           Metric name to query

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

Description

Query last sample.

Returns

Returns list: Last sample

Mandatory

positional arguments:
  metric_name           Metric name to query

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: symp metric query top
[-f {adaptive_table,csv,json,table,value,yaml}]
                               [-c COLUMN] [--max-width <integer>] [--noindent]
                               [--quote {all,minimal,none,nonnumeric}]
                               [-m [NAME=VALUE [NAME=VALUE ...]]]
                               [--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.

Returns

Returns list: Top samples

Mandatory

positional arguments:
  metric_name           Metric name to query

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)