> For the complete documentation index, see [llms.txt](https://docs.openg2p.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openg2p.org/platform/platform-services/system-monitoring/setup-and-configuration.md).

# Setup & Configuration

> Concepts are in the [System Monitoring overview](/platform/platform-services/system-monitoring.md). This is a how-to.

## Installation

The monitoring stack is **installed automatically** as part of the production deployment automation (the production `openg2p-prod` install) — no manual steps. The infra Helmfile creates the `observability` namespace and deploys the OTel collectors, Loki, its MinIO, the Grafana Loki datasource, the alert rules and the ready-made dashboard.

See the [Deployment documentation](https://docs.openg2p.org/operations/deployment) for the overall install.

## Configuration

Settings are provided in `prod-config.yaml` before install (all have sensible defaults). The main ones:

| Key                                     | Default            | Purpose                                              |
| --------------------------------------- | ------------------ | ---------------------------------------------------- |
| `loki_retention_hours`                  | `168`              | Log retention (168h = 7 days)                        |
| `loki_minio_root_user`                  | `loki`             | Loki object-store user                               |
| `loki_minio_root_password`              | *(auto-generated)* | Loki object-store password                           |
| `loki_minio_size`                       | `50Gi`             | Disk for Loki's MinIO                                |
| `alert_smtp_*`                          | *(blank)*          | Email alert channel (host, from, user, password, to) |
| `alert_slack_webhook_url`               | *(blank)*          | Slack / Mattermost / Rocket.Chat webhook             |
| `alert_telegram_bot_token` / `_chat_id` | *(blank)*          | Telegram channel                                     |
| `ai_enabled`                            | `false`            | Optional AI layer (off by default)                   |

Alert channels are **inert until you fill in their credentials** — see the [Operations Guide → Alerting](/platform/platform-services/system-monitoring/operations.md#alerting).

## Accessing Grafana

Grafana is reached through the **Rancher UI → cluster → Monitoring → Grafana** (it is not exposed on its own hostname). You are signed in automatically via your Rancher session as an **Editor** — no separate Grafana login.

> If a bookmarked Grafana URL shows "page not found", make sure it includes the Rancher cluster prefix: `…/k8s/clusters/local/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-grafana:80/proxy/`.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.openg2p.org/platform/platform-services/system-monitoring/setup-and-configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
