> ## Documentation Index
> Fetch the complete documentation index at: https://inframan.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# The monitoring stack

> What runs in each infrastructure's monitoring stack, where it runs, how long it keeps data, and how to change retention.

The monitoring stack is one of the three platform apps every infrastructure has. It's installed with the infrastructure, can't be uninstalled, and is deleted with it.

## Components

| Component | Role |
| - | - |
| Prometheus, with the Prometheus operator | Stores metrics, scraped every 30 seconds |
| AlertManager | Evaluates alert rules and sends firing alerts to Inframan |
| node-exporter | Node metrics, on every node |
| kube-state-metrics | The state of Kubernetes objects, such as replica counts |
| Loki | Stores logs |
| Tempo | Stores traces |
| Alloy | Runs on every node. Collects container logs and receives OpenTelemetry traces. |

Each store runs as a single replica, sized for one infrastructure.

## Where it runs

* **Google Cloud:** on its own `monitoring-pool`, `e2-standard-2` Spot nodes, 1 to 2 of them, tainted so nothing else lands there.
* **AWS:** on the system pool, with `gp3` volumes.

Google Cloud's and AWS's own monitoring services aren't used for your workloads. On GKE, only Google's system components report to Cloud Logging and Cloud Monitoring.

## Retention and storage

| Store | Non-production | Production |
| - | - | - |
| Metrics | 3 days, 5 GiB | 15 days, 10 GiB |
| Logs | 72 hours, 5 GiB | 360 hours, 10 GiB |
| Traces | 24 hours, 5 GiB | 72 hours, 10 GiB |

## Change metrics retention

1. Open the **App Store** and select **Monitoring** under **Platform components**.
2. Select the **Configuration** tab.
3. Under **Metrics retention**, set **Retention**, for example `7d`, and save.

Inframan redeploys Prometheus with the new setting. Longer retention needs more disk, so watch the infrastructure's **Node disk** chart after a big increase.

The **Overview** tab of the Monitoring app shows the stack at a glance: where metrics, logs and traces are stored, which pool it runs on, and the current metrics retention.

## Footprint

The stack is sized small for non-production and grows only when it needs to: Inframan raises its memory and CPU automatically when a component runs short. See [Self-healing](https://inframan.mintlify.site/monitor/self-healing.md) and [A lean infrastructure](https://inframan.mintlify.site/optimize/lean-infrastructure.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.