> For the complete documentation index, see [llms.txt](https://docs.akamas.io/akamas-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.akamas.io/akamas-docs/reference/construct-templates/metric-template.md).

# Metric template

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

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

and properties:

| Field         | Type   | Value restrictions                                                                                | Is required | Default Value   | Description                             |
| ------------- | ------ | ------------------------------------------------------------------------------------------------- | ----------- | --------------- | --------------------------------------- |
| `name`        | string | No spaces are allowed                                                                             | 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 |                                                                                                   | 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      | w1oPwMpij4PI |
|                     |              |
| nanoseconds         |              |
| microseconds        |              |
| milliseconds        |              |
| seconds             |              |
| minutes             |              |
| hours               |              |
| Units of infomation | EhXvqwI94kQ7 |
|                     |              |
| bits                |              |
| kilobits            |              |
| megabits            |              |
| gigabit             |              |
| terabit             |              |
| petabit             |              |
| bytes               |              |
| kilobytes           |              |
| megabytes           |              |
| gigabytes           |              |
| terabytes           |              |
| petabytes           |              |
| 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).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.akamas.io/akamas-docs/reference/construct-templates/metric-template.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
