# Metric template

Metrics are defined using a YAML manifest with the following structure:

{% code lineNumbers="true" %}

```yaml
metrics:
  - name: "cpu_util"
    description: "cpu utilization"
    unit: "percent"
  - name: "mem_util"
    description: "memory utilization"
    unit: "percent"
```

{% endcode %}

and properties:

| Field         | Type   | Value restrictions                                                                                | Is required | Default Value   | Description                             |
| ------------- | ------ | ------------------------------------------------------------------------------------------------- | ----------- | --------------- | --------------------------------------- |
| `name`        | string | <p><br>no spaces are allowed<br></p>                                                              | TRUE        | <p><br><br></p> | The name of the metric                  |
| `unit`        | string | A supported unit or a custom unit (see [supported units of measure](#supported-units-of-measure)) |             |                 | The unit of measure of the metric       |
| `description` | string | <p><br><br></p>                                                                                   | TRUE        | <p><br><br></p> | A description characterizing the metric |

### Supported units of measure

The supported units of measure for metrics are:

| Type                | Units                                                             |
| ------------------- | ----------------------------------------------------------------- |
| Temporal units      | 2ab74bf1d35847a3bc4fac993a60b071-23000ca395e34b07ad96955987a9dc53 |
| Units of infomation | 91179a9246d94fc795083b4bd7c1a71c-23000ca395e34b07ad96955987a9dc53 |
| Others              | percent                                                           |

Notice that supported units of measure are automatically scaled for visualization purposes. In particular, for units of information, Akamas uses a base 2 scaling for bytes, i.e., 1 kilobyte = 1024 bytes, 1 megabyte = 1024 kilobytes, and so on. Other units of measure are only scaled up using millions or billions (e.g., 124000000 custom units become 124 Mln custom units).
