# Metric Collector Quick Start

## How to Set up

Collect monitoring metric data through the following steps:

* [Prerequisites](https://app.gitbook.com/s/-MTreeWoy3xuY-l6nGnL-2459025041/getting-started/metric-collector-quick-start.md#prerequisites)
* [Get API Key for SpaceONE Service Account](https://app.gitbook.com/s/-MTreeWoy3xuY-l6nGnL-2459025041/getting-started/metric-collector-quick-start.md#get-api-key-for-spaceone-service-account)
* [Register SpaceONE Service Account](https://app.gitbook.com/s/-MTreeWoy3xuY-l6nGnL-2459025041/getting-started/metric-collector-quick-start.md#register-spaceone-service-account-ex-metric-collector)
* [Monitoring Metric Information](https://app.gitbook.com/s/-MTreeWoy3xuY-l6nGnL-2459025041/getting-started/metric-collector-quick-start.md#monitoring-metric-information)&#x20;
* [Collecting Monitoring Metric Type](https://app.gitbook.com/s/-MTreeWoy3xuY-l6nGnL-2459025041/getting-started/metric-collector-quick-start.md#collecting-monitoring-metric-type)

## Prerequisites

Monitoring Metric Collector requires SpaceOne Service Account to collect various vendors includes AWS, Google Cloud, Azure, etc.

## Get API Key for SpaceONE Service Account

Before adding Service Account (SpaceONE), you need API Key for SpaceONE.

{% hint style="info" %}
**We currently provide API-Key via administrator only.**\
**Please, contact your domain administrator of SpaceONE If you don't have an API-Key for SpaceONE service account or send an e-mail for more support (*****<support@spaceone.dev>*****)**
{% endhint %}

## Register SpaceOne Service Account (Ex. Metric Collector)

Register SpaceONE service account, at **Identity** > **Service Account**

Select **SpaceONE** on Service Provider, and then click +**Add** button.

![](https://289087697-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MTreeWoy3xuY-l6nGnL%2F-MU72g6FHOODetU39KzG%2F-MU79tDalNdpqa3neFnC%2Fscreen-shot-2020-12-30-at-13.16.21.png?alt=media\&token=1731d28d-b9dd-4d81-a08f-dbb3a0425a6a)

Register SpaceONE Service Account with following steps,

1. Name Service account
2. Set User ID
3. Put Credentials (API Key info)

![](https://289087697-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MTreeWoy3xuY-l6nGnL%2F-MU72g6FHOODetU39KzG%2F-MU7A0BHPwhzgl4lEhrc%2Fscreen-shot-2020-12-30-at-13.27.39.png?alt=media\&token=0c45fbd4-23d8-4a51-8a2a-e17eccfa8651)

Configure credentials which has obtained from domain administrator after set service account name and user ID.

You will get a three following items as credential inputs

1. *API Key*
2. *API Key ID*
3. *Identity Endpoint*

All those fields are mandatory.

![](https://289087697-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MTreeWoy3xuY-l6nGnL%2F-MU72g6FHOODetU39KzG%2F-MU7A8jXF_g_Af_2VHUw%2Fimage%20\(81\).png?alt=media\&token=2606f5dc-6b10-46e8-b16a-572c1e46836d)

{% hint style="info" %}
**DO NOT assign a project for Monitoring Metric collector Service.**

You can SKIP this step.
{% endhint %}

## Monitoring Metric Information

You can check collected monitoring Metric data information at **Inventory** > **Server** list.\
**Note:** **Recommend Monitoring-metric-collector schedule is a once in day.**

![](https://289087697-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MTreeWoy3xuY-l6nGnL%2F-MU72g6FHOODetU39KzG%2F-MU7AL08Lc6T8ECF-kIM%2Fscreen-shot-2020-12-30-at-13.53.25.png?alt=media\&token=a5014806-844d-4a0e-9b26-b913f2dd3cd0)

Monitoring metric's values will be updated once collector's job has finished.

![](https://289087697-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MTreeWoy3xuY-l6nGnL%2F-MU72g6FHOODetU39KzG%2F-MU7AURv4CCHP5raEHX9%2Fscreen-shot-2020-12-30-at-14.41.37.png?alt=media\&token=87d0da6e-7725-49ca-998f-3342ab33b9a0)

Check all collected Monitoring data at **"Raw Data"** tab within path of ***Data -> Monitoring***

## Collecting Monitoring Metric Type

{% hint style="info" %}
Default metric type that collects via **version 1.5.3.**

**Note**: Monitoring Metric Type will keep updating.
{% endhint %}

### Default Metric Stat

| Stat for Metric | Key |      Description      |
| :-------------: | :-: | :-------------------: |
|       MAX       | max | Maximum value per day |
|     AVERAGE     | avg | Average value per day |

### Collecting Metrics

| Collecting Metric Type | Metric name / (Unit)                                                                                                                      |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **CPU**                | <ul><li>utilization (%)</li></ul>                                                                                                         |
| **Memory**             | <ul><li>usage (%)</li><li>total (bytes)</li><li>used (bytes)</li></ul>                                                                    |
| **Disk**               | <ul><li>write\_iops (counts)</li><li>write\_throughput (bytes)</li><li>read\_iops (counts)</li><li>read\_throughput (bytes)</li></ul>     |
| **Network**            | <ul><li>received\_throughput (bytes)</li><li>received\_pps (counts)</li><li>sent\_throughput (bytes)</li><li>sent\_pps (counts)</li></ul> |
