# 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:

<table><thead><tr><th width="184">Field</th><th>Type</th><th width="260">Value restrictions</th><th width="113">Is required</th><th width="137">Default Value</th><th width="228">Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>string</td><td><br>no spaces are allowed<br></td><td>TRUE</td><td><br><br></td><td>The name of the metric</td></tr><tr><td><code>unit</code></td><td>string</td><td>A supported unit or a custom unit (see <a href="#supported-units-of-measure">supported units of measure</a>)</td><td></td><td></td><td>The unit of measure of the metric</td></tr><tr><td><code>description</code></td><td>string</td><td><br><br></td><td>TRUE</td><td><br><br></td><td>A description characterizing the metric</td></tr></tbody></table>

### Supported units of measure

The supported units of measure for metrics are:

<table><thead><tr><th width="263">Type</th><th>Units</th></tr></thead><tbody><tr><td>Temporal units</td><td>2ab74bf1d35847a3bc4fac993a60b071-23000ca395e34b07ad96955987a9dc53</td></tr><tr><td>Units of infomation</td><td>91179a9246d94fc795083b4bd7c1a71c-23000ca395e34b07ad96955987a9dc53</td></tr><tr><td>Others</td><td>percent</td></tr></tbody></table>

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).
