Przejdź do treści
Biblioteka skilli
DevOps i chmura · Budowanie i kod

central

/central

Wdraża i zarządza stosem metryk: OpenTelemetry Collector, Prometheus, Alertmanager i Grafana na serwerze RHEL 9.

Repozytorium
context-guru ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
12.11.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
2
Przestarzałość

Brak sygnałów. Repozytorium zmienione 12.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Wdraża i zarządza stosem metryk: OpenTelemetry Collector, Prometheus, Alertmanager i Grafana na serwerze RHEL 9.

Oryginalny opis (EN)

Deploy and manage the central metrics stack (OpenTelemetry Collector, Prometheus, Alertmanager, Grafana) on the RHEL 9 server. Use when asked to deploy, update, check or restart the central, set up its TLS, read its logs, or find out why a proxy's metrics do not arrive.

Jak działa

  1. Before you start
  2. Commands
  3. Rules
  4. Giving a machine its settings
  5. When metrics do not arrive
  6. Files
Sekcje z nagłówków SKILL.md, w oryginale · 82 linii, 735 słów
Podgląd SKILL.md
---
name: central
description: Deploy and manage the central metrics stack (OpenTelemetry Collector, Prometheus, Alertmanager, Grafana) on the RHEL 9 server. Use when asked to deploy, update, check or restart the central, set up its TLS, read its logs, or find out why a proxy's metrics do not arrive.
---

# Manage the central metrics stack

The stack lives in `deploy/central/`. `deploy/central/deploy.sh` runs it on the server over ssh. `install.sh`
in the same folder does the work on the server. Read `deploy/central/README.md` for the design.

Run every command from `deploy/central/` in the repo checkout, on the user's laptop.

## Before you start

1. Ask the user for the ssh target (`user@host`) if you do not know it. Use the same one for the whole session.
   If the user says not to use ssh, do not run `deploy.sh`. Give the user the commands to run instead.
2. For TLS, you need `CENTRAL_HOST` (the name the proxies use), and `TLS_CERT` and `TLS_KEY` (paths **on the
   server**, certificate chain first). The company certificate is the expected source. Never create a
   self-signed one unless the user asks.
3. The ssh user needs sudo on the server. `deploy.sh` uses `ssh -t`, so a sudo password prompt reaches the user.

## Commands

| Task | Command |
|---|---|
| First install or an update | `./deploy.sh --dry-run USER@HOST deploy`, show the user, then `./deploy.sh USER@HOST deploy` |
| TLS front end | `CENTRAL_HOST=... TLS_CERT=... TLS_KEY=... ./deploy.sh USER@HOST nginx` |
| Is it healthy? | `./deploy.sh USER@HOST status` |
| Is it reachable from here? | `CENTRAL_HOST=... ./deploy.sh USER@HOST check` (expect 200 on both paths) |
| Logs | `./deploy.sh USER@HOST logs collector\|prometheus\|alertmanager\|grafana` |
| Copy only, no install | `./deploy.sh USER@HOST stage` |
| Stop the stack | `./deploy.sh USER@HOST remove` (keeps the data) |

A deploy checks the folder first (the shell script, the dashboard JSON against its generator, and `promtool` if
it is installed). It stops if a check fails. Do not skip a failed check. Fix the cause.

## Rules

1. **Ask before you change the server.** `deploy`, `nginx` and `remove` change a shared server. Say what you will
   run, and wait for a yes. `status`, `check`, `logs` and `--dry-run` are safe to run without asking.
2. **Run `--dry-run` first** for `deploy` and `nginx`, and show the user what it will do.
3. **Never delete data.** Do not remove `/var/lib/central-metrics`, a container volume, or run
   `docker compose down -v` against the server. `remove` keeps the data on purpose.
4. **After a deploy, run `status`.** Report each line that has a cross. If `status` exits non-zero, the deploy is
   not done.
5. **Authentication is off.** The collector accepts any push that reaches it, so do not tell the user that a
   push proves which machine sent it. The `token` commands are off. The work to switch authentication on is
   tracked in rossoctl/context-guru#1130. Do not make tokens by hand.
6. **A redeploy restarts the collector** (about 1.5 seconds). A push in that gap fails, and the next push
   repairs it because proxies send running totals. Tell the user.

## Giving a machine its settings

An install needs only the URL:

| Proxy | URL | Setting |
|---|---|---|
| context-guru | `https://CENTRAL_HOST/context-guru` | `--metrics-push-url` or `METRICS_PUSH_URL` |
| Cortex | `https://CENTRAL_HOST/cortex` | the same setting (the Cortex side is not built yet) |

The proxy refuses plain `http` to a remote host. It trusts the system certificate store, so a company CA must
be installed on the machine.

## When metrics do not arrive

Work down this list and stop at the first cause.

1. `check` shows a TLS error: the certificate chain is incomplete, or the machine does not trust the CA.
2. `check` shows something other than 200: nginx is not forwarding. Run `nginx` again, then read the nginx error log.
3. The proxy log says `metrics push failed` with a reason: read the reason. `unauthorized` means the server
   still checks tokens, because it runs an older release. Redeploy.
4. The proxy log says nothing about metrics: the URL is empty. With no URL the proxy logs one warning and sends
   nothing.
5. Prometheus has the machine but a dashboard is empty: widen the time range. The `rate()` panels need about
   5 minutes of traffic.
6. A dashboard says "Dashboard not found": the dashboard folder on the server is empty or stale. Run `deploy`
   again, which recreates the containers.

## Files

- `deploy/central/deploy.sh`: the laptop side. It copies a release to `~/central-metrics-src/releases/<time>` on
  the server, keeps the last 5, and runs `install.sh`.
- `deploy/central/install.sh`: the server side (`install`, `status`, `nginx`, `remove`).
- `deploy/central/grafana/gen_dashboards.py`: change a dashboard here, run it, and commit the JSON.
- State: `/var/lib/central-metrics`. Config: `/etc/central-metrics`.

Wersje

W bazie nie ma innych skilli o nazwie central.

Migawka bazy z 13.11.2026 · wersja paczki d3d21297abbd (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100deploy-otel
    Wdraża stos observability OpenTelemetry (Prometheus, Grafana, OTEL Collector) w klastrze Kind do testowania telemetrii toolhive, przy konfiguracji monitoringu i zbierania metryk.
  • 95rhel-monitoring
    Konfiguruje monitoring i logowanie na RHEL 9: Prometheus, Grafana, Loki, ELK, Alertmanager, PCP i rsyslog.
  • 100prometheus-grafana
    Konfiguruje monitoring metryk w Prometheus, Alertmanager i Grafanie: instrumentację, wykrywanie celów w Kubernetes, zapytania PromQL i pulpity.
  • 100metrics-graphana
    Odpytuje i zarządza dashboardami Grafana i metrykami Prometheus dla infrastruktury Happy: grafanactl, zapytania Prometheus przez proxy Grafana i dashboardy jako kod.
  • 100observability-setup
    Konfiguruje logi, metryki, ślady i alerty w OpenTelemetry, Prometheus i Grafanie, pilnując, by dane osobowe i sekrety nie trafiały do telemetrii.
  • 100prometheus-alertmanager-webhooks
    Odbiera i uwierzytelnia webhooki Prometheus Alertmanager, sprawdza nagłówek Authorization i pomaga naprawić błędy 401.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.