Przejdź do treści
Biblioteka skilli
DevOps i chmura · Integracja z narzędziem

grafana

/grafana

Pomaga pracować z Grafana: dashboardy, zapytania LogQL do Loki, reguły alertów i panele monitoringu, także gdy użytkownik nie wymienia nazwy Grafana.

Repozytorium
agent-config ↗
Licencja
MIT
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

100/ 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ść35 / 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
0
Przestarzałość

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

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Pomaga pracować z Grafana: dashboardy, zapytania LogQL do Loki, reguły alertów i panele monitoringu, także gdy użytkownik nie wymienia nazwy Grafana.

Wyzwalacze z opisu

build me a dashboardquery the logs
Oryginalny opis (EN)

Use when working with Grafana — dashboards, Loki LogQL queries, alerting rules, monitoring panels — even when the user just says 'build me a dashboard' or 'query the logs' without naming Grafana.

Jak działa

  1. When to use
  2. Procedure: Create Grafana dashboard
  3. Dashboard conventions
  4. Loki LogQL
  5. Alerting
  6. Integration with logging
  7. Related
  8. Output format
  9. Gotcha
  10. Do NOT
Sekcje z nagłówków SKILL.md, w oryginale · 169 linii, 846 słów
Podgląd SKILL.md
---
model_tier: medium
name: grafana
description: "Use when working with Grafana — dashboards, Loki LogQL queries, alerting rules, monitoring panels — even when the user just says 'build me a dashboard' or 'query the logs' without naming Grafana."
domain: devops
workspaces:
  - engineering
packs:
  - engineering-base
---

# Grafana Skill

## When to use

Use this skill when:
- Creating or editing Grafana dashboards (JSON provisioning)
- Writing Loki LogQL queries for log analysis
- Configuring alerting rules or contact points
- Working on a Grafana module (if the project has one)
- Debugging log-based issues using Loki data

## Procedure: Create Grafana dashboard

1. **Inspect existing Grafana assets** — Check the project's Grafana location (Docker config, `dashboards/`, provisioning) and existing datasources (Loki, Prometheus) before adding panels.
2. **Decide signals and layout** — Pick the queries (LogQL / PromQL) and panel types per signal; reuse naming and label conventions below.
3. **Author the dashboard JSON** — Add provisioned JSON under the dashboards path; wire datasources and template variables.
4. **Verify** — Reload Grafana, confirm panels render against real data, and check alert rules fire on synthetic test inputs.

### Project setup

Check if the project has a dedicated Grafana module or Docker config. Typical structure:

```
{grafana-location}/
├── .docker/
│   ├── grafana/
│   │   ├── dashboards/              ← Dashboard JSON files (provisioned)
│   │   ├── provisioning/
│   │   │   ├── datasources/         ← Loki, Prometheus data sources
│   │   │   └── dashboards/          ← Dashboard provisioning config
│   │   └── alerting/                ← Alert rules, contact points, notification policies
│   └── loki/
│       └── loki-config.yml          ← Loki server configuration
├── App/
│   ├── Logging/                     ← Loki timestamp processors
│   └── Console/Commands/            ← GrafanaPushDashboardsCommand
├── Docs/
│   └── Loki.md                      ← Loki documentation
└── Routes/console.php
```

### Configuration

- **Grafana config:** `config/grafana.php`
- **Logging channels:** `config/logging.php` (Loki channels)
- **Loki package:** `itspire/monolog-loki` via Monolog handler

## Dashboard conventions

### JSON provisioning

Dashboards are stored as JSON in `.docker/grafana/dashboards/` and auto-provisioned.
Use `GrafanaPushDashboardsCommand` to push dashboards to remote Grafana instances.

### Panel rules

- **Always hide Loki metadata columns** in table panels:
  `labelTypes`, `traceID`, `traceID (field)` → add to `excludeByName` in the `organize` transformation.
- **Verify column names match data semantics:** If the timestamp represents `imported_at`,
  name the column "Imported", not "Uploaded".
- **Use consistent time ranges:** Default to "Last 24 hours" for operational dashboards.
- **Add variables** for customer FQDN, environment, and time range filters.

### Naming

| Element | Convention | Example |
|---|---|---|
| Dashboard title | Descriptive, Title Case | "Import Overview (Loki)" |
| Panel title | Short, descriptive | "Import Results by Status" |
| Variable names | lowercase, underscore | `$fqdn`, `$environment` |

## Loki LogQL

### Query patterns

```logql
# Filter by service and status
{service="import_result"} |= "DONE" | json | status = "DONE"

# Count by label
sum by (status) (count_over_time({service="import_result"} | json [$__interval]))

# Filter by customer FQDN
{service="import_result", fqdn=~"$fqdn"} | json
```

### Service labels

| Label | Purpose | Notes |
|---|---|---|
| `import_result` | Final import states (DONE, FAILED) | Use for result dashboards |
| `import_snapshot` | Cron-based status snapshots | Use for timeline dashboards |
| `service=import` | Legacy static label | Do NOT query — use specific labels above |

### Best practices

- Use `json` parser for structured log entries
- Use `line_format` for human-readable output in explore view
- Use `$__interval` for rate/count queries (auto-adjusts to time range)
- Filter early in the pipeline (labels before line filters before parsers)

## Alerting

### Structure

```
.docker/grafana/alerting/
├── alert-rules.yml          ← Alert conditions and thresholds
├── contact-points.yml       ← Notification targets (Slack, email)
└── notification-policies.yml ← Routing rules (which alerts → which contacts)
```

### Conventions

- Alert names: descriptive, include severity: "Import Failure Rate > 10% (Critical)"
- Use `for` duration to avoid flapping (e.g., `for: 5m`)
- Group related alerts by folder/namespace

## Integration with logging

The project uses structured logging via Monolog → Loki:

- **`LokiTimestampProcessor`** — Adds precise timestamps to log entries
- **`LokiTimestampChannelTap`** — Configures Loki channels with timestamp processing
- **Import events** are logged via `ImportEventLogger` service

When adding new log entries for Grafana visualization:
1. Use a dedicated log channel (defined in `config/logging.php`)
2. Log as JSON with consistent field names
3. Add appropriate Loki labels for filtering
4. Update or create a dashboard panel for the new data

## Related

- **Skill:** `logging-monitoring` — full monitoring stack overview
- **Skill:** `dashboard-design` — visualization selection, layout, KPI strategies
- **Skill:** `traefik` — HTTPS for Grafana embedding in the app
- Check the project for Grafana module or Docker config location
- **Config:** `config/grafana.php`, `config/logging.php` (if applicable)


## Output format

1. Grafana dashboard JSON or LogQL/PromQL queries
2. Panel configuration with data source and thresholds
3. Alert rule definitions where applicable

## Gotcha

- Loki queries use LogQL, not PromQL — the syntax is different despite looking similar.
- Don't create alerts without a clear notification channel — silent alerts are useless.
- Dashboard panels that query too much data (>7 days at full resolution) will timeout — use downsampling.

## Do NOT

- Do NOT create panels without proper units and labels.
- Do NOT use alerting rules without a notification channel.
- Do NOT hardcode datasource names — use variables.

## Auto-trigger keywords

- Grafana
- Loki
- dashboard
- log query
- alerting
- monitoring panel

Wersje

RepozytoriumWynikLicencja
Ta strona · event4u-app/agent-config100MIT
magnus919/agent-skills100MIT
nvidia/ai-factory-operations-agent100Apache-2.0
julianobarbosa/claude-code-skills100MIT
G1Joshi/Agent-Skills100MIT
chrishuffman5/domain-expert100MIT
poly-gents/syncolab-skills100Apache-2.0
chrishuffman5/domain-expert90MIT

Migawka bazy z 28.10.2026 · wersja paczki ff22854b823b (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

  • 100grafana-observability
    Obsługuje platformę Grafana (ponad 75 narzędzi): dashboardy, PromQL, LogQL w Loki, alerty, incydenty, grafiki OnCall, adnotacje, zapytania do źródeł danych i renderowanie paneli.
  • 100grafana-dashboard-builder
    Buduje dashboardy Grafana na Prometheusie, Loki i Tempo: zapytania PromQL i LogQL, zmienne szablonów, reguły alertów, dashboardy SLO oraz dashboardy jako kod przez Terraform i grafonnet.
  • 100loki-logging
    Konfiguruje Grafana Loki do agregacji i analizy logów: Promtail do zbierania, zapytania LogQL i integracja z Grafaną, zwłaszcza w Kubernetes.
  • 100logql-query-authoring
    Pisze i debuguje zapytania LogQL do Grafana Loki: selektory strumieni, filtry linii, parsery (json, logfmt, pattern, regexp), filtry etykiet i zapytania metryczne z logów, takie jak rate() i count_over_time().
  • 100logql-generator
    Generuje selektory etykiet, filtry linii, agregacje logów i zapytania metryczne w LogQL (Loki) do analizy logów, dashboardów i alertów.
  • 100grafana-helper
    Używa CLI Grafana GCX do dashboardów, źródeł danych, metryk Prometheus, logów Loki, śladów Tempo i reguł alertów, także w śledztwach obserwowalności.

Uwagi i zgłoszenia

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