# Metric

A Metric is a monitoring metric data delivered from an external cloud service via a DataSource.

> **Package : spaceone.api.monitoring.plugin**

\
\


## Metric

**Metric Methods:**

| Method                                                                                                                       | Request                                                                                                                                   | Response                                                                                                                            |
| ---------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| [**list**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/plugin/Metric/README.md#list)          | [MetricRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/plugin/Metric/README.md#metricrequest)         | [MetricsInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/plugin/Metric/README.md#metricsinfo)       |
| [**get\_data**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/plugin/Metric/README.md#get_data) | [MetricDataRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/plugin/Metric/README.md#metricdatarequest) | [MetricDataInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/plugin/Metric/README.md#metricdatainfo) |

\


### list

Gets a list of all Metrics from a specific cloud service. You can use the method to list up the Metrics to collect before using the `get_data` method to collect the Metrics.

\


### get\_data

Gets a Metric from a specific cloud service resource `instance`. By specifying the time period to collect the Metric, the Metric data value of the `instance` during the period is returned.

\
\


## Message

### MetricDataInfo

* **labels** (ListValue) `Required`
*   **values** (Struct) `Required`

    \


### MetricDataRequest

* **options** (Struct) `Required`
* **secret\_data** (Struct) `Required`
* **metric\_query** (Struct) `Required`
*   **metric** (string) `Required`

    _metric identifier in case of requested metric info is not a single._
* **start** (string) `Required`
* **end** (string) `Required`
* **period** (int32)
* **stat** (string)
*   **schema** (string)

    \


### MetricInfo

* **key** (string) `Required`
* **name** (string) `Required`
* **group** (string) `Required`
* **unit** (Struct) `Required`
*   **metric\_query** (Struct) `Required`

    \


### MetricRequest

* **options** (Struct) `Required`
* **secret\_data** (Struct) `Required`
* **query** (Struct) `Required`
*   **schema** (string)

    \


### MetricsInfo

*   **metrics** (MetricInfo) `Repeated` `Required`

    \
