## Host Map

The **Host Map** panel displays host-level metrics in a color-coded grid layout.
Use it to monitor CPU, memory, disk, or other resource utilization across multiple hosts at a glance.

### Add a Host Map panel

1. Open the dashboard where you want the panel.
2. Click **Add Panel**.
3. In **Choose Visualization**, select **Host Map**.

4. Build your metric query in **Graph your data**.
5. Enter a descriptive **Title**.
6. Click **Save** to add the panel.

#### Build queries (Graph your data)

The **Graph your data** section defines which metrics are displayed and how they are processed before visualization.
These steps apply to most panel types in Kloudfuse.

1. Click **Add Query** to create a new query. Repeat to add multiple queries.
2. Click **Select a metric** to choose the metric name you want to query.
3. Use **From** to select the metric source or namespace.
4. Click **Add Label** to filter results by label values (for example: `pod=web`, `env=prod`).
5. Select an **Aggregation** (for example: `min`, `max`, `sum`, `avg`) to reduce raw samples to one value per time interval.
6. Use the **Select** dropdown (if available) to set the aggregation interval (for example: `1m`, `5m`).
7. Click **Add Functions** to apply transformations to your data.

Common examples:
\* `rate()` — Convert counters to rates.
\* `derivative()` — Show the rate of change.
\* `moving_avg()` — Smooth short-term fluctuations.
\* `scale()` — Multiply values by a constant.

|     |     |
| --- | --- |
|  | Query order determines formula identifiers: the first query = `a`, second = `b`, etc.<br>Assign aliases to queries for more readable formulas. |

#### Add formulas

Use formulas to create new series from existing queries.

1. Click **Add Formula** in **Graph your data**.
2. Reference queries by their letter (`a`, `b`, …) or alias.
3. Enter your expression and click **Apply**.

Example — double a series:

```
2*a
```

Example — percentage change between two queries:

```
((a - b) / b) * 100
```

|     |     |
| --- | --- |
|  | - Use parentheses to control precedence: `2*(a + b)` vs. `2*a + b`.<br>  <br>- If queries return different intervals, the formula engine aligns or interpolates values.<br>  <br>- Add a **Label** so the formula appears meaningfully in the legend. |

### Host Map–specific settings

Once your metric is selected:

- **Metric** — Choose the host-level metric to display, such as CPU usage, memory consumption, disk I/O, or network throughput.
- **Group by** — Group data by `host`, `cluster`, `availability_zone`, or other relevant labels.
- **Color scheme** — Map metric values to colors to highlight high/low usage.
- **Layout** — Adjust grid spacing, tile size, and sorting to improve readability.
- **Value display** — Show or hide numeric values on each tile.
- **Thresholds** — Add color-based thresholds to signal warning or critical conditions.

### Best practices

- Use consistent grouping (e.g., always group by `host`) to keep dashboards predictable.
- Keep tile counts reasonable — too many hosts in one panel may make patterns harder to spot.
- Pair **Host Map** with detailed **Timeseries** or **Top List** panels for drill-down analysis.
