# Custom Key-Value Metrics

This view allows for browsing any key-value metric data collected by agents. In order to draw a graph for a selected metric, you must fill out the form below.&#x20;

## Search Form

First, you need to specify a pattern for agents, a time range, and a metric key. You can either specify the metric key manually or select one from the available metrics by clicking [`AVAILABLE KV METRICS`](#kv-metrics-tree) link.

![Key-Value Metric Form](https://3024459036-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpN7wUQHQSd7nz09yOW%2F-LwNwUmzhZ_8TEtro2RM%2F-LwNx5V_dyDaS_keX4Go%2FScreenshot%202019-12-18%20at%2013.20.47.png?alt=media\&token=960fd6a1-570c-42da-9759-4acb06ac21f7)

### KV Metrics Tree

This popup view contains a list of all available KV metrics in a form of a tree. You can always refresh the available metrics view by clicking `Refresh tree` button.

![Available Metrics](https://3024459036-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpN7wUQHQSd7nz09yOW%2F-Ly0Grf8KbIhZOdVvxuk%2F-Ly3zEQ4UOeug9ydWNXP%2FScreenshot%202020-01-08%20at%2012.44.09.png?alt=media\&token=54141135-4bff-43e9-be34-2aae6f9fc1a4)

## KV Graph

If you click `SEARCH` button, a graph will be drawn for the selected metric.&#x20;

![Exemplary key-value metric](https://3024459036-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpN7wUQHQSd7nz09yOW%2F-Ly40KiBqaLtqgJiEhqK%2F-Ly461iYt4IM60cksQXx%2FScreenshot%202020-01-08%20at%2013.22.32.png?alt=media\&token=0b6af9de-1a0a-4b13-8bac-e49b51673990)

If you want to preserve the graph, you can detach the window by clicking the icon in the top-right corner of the window.

### Context Menu

Each KV graph has a context menu with several actions.

![](https://3024459036-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpN7wUQHQSd7nz09yOW%2F-LzuxICHkG7uNM8F_Q-_%2F-LzuxLMNH4YvIKOzcLgm%2Fkv_ctx.png?alt=media\&token=73e81eaa-98a6-4251-b4e4-bf19da4ccb2f)

#### Agents

This submenu allows for selecting from which agents data should be visible.

#### Absolute

This option allows us to toggle between `Absolute` and `Relative` type of graph. `Absolute` graph means that raw data points are displayed, while `Relative` graph means that data points are displayed as a difference between two consecutive values. *Use `Relative` option if, for example, your KV metric is an additive one, i.e. its value always grows and you want to observe how much it increases at each collection time.*&#x20;

#### Add to Inspector

This action adds the [KV metric](https://docs.flopsar.com/3.0/data-inspector#kv-metrics) to the [Data Inspector](https://docs.flopsar.com/3.0/user-guide/data-inspector).

#### Save image as...

This action exports the graph to an image and saves it to a selected file.
