Official agent skill

Database Observability

by grafana in grafana/skills

Set up Grafana Cloud Database Observability for MySQL and PostgreSQL — enables pgstatstatements / Performance Schema, creates a least-privilege monitoring user, configures the…

OfficialApache-2.0Auto-check passedDevOps & Cloud

Install Database Observability

skills CLI
$ npx skills add grafana/skills --skill database-observability -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install grafana/skills database-observability --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/grafana/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/grafana-cloud/database-observability .claude/skills/database-observability && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
database-observability
GitHub stars
278
Token cost
~1.1k tokens
SKILL.md length
252 words
Files
3 (incl. references)
Skills in repo
51
Repo updated
First seen
Licence
Apache-2.0

At a glance

Set up Grafana Cloud Database Observability for MySQL and PostgreSQL — enables pgstatstatements / Performance Schema, creates a least-privilege monitoring user, configures the…

  • Works in 3 steps: Add the Alloy config block from… → Restart Alloy and wait ~60s for first… → Verify in Grafana Cloud → Database…
  • Monitoring database performance
  • SKILL.md covers Common Workflows, Supported databases, What you get and References
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Database Observability is an agent skill from grafana/skills, published by the product's own GitHub organization. Set up Grafana Cloud Database Observability for MySQL and PostgreSQL — enables pgstatstatements / Performance Schema, creates a least-privilege monitoring user, configures the databaseobservability.postgres / databaseobservability.mysql Alloy components, ships query samples + visual explain plans + RED metrics + schema details to Grafana Cloud, and correlates slow queries with application traces via db.statement / db.system OTel attributes. Use when monitoring database performance, diagnosing slow queries…

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/alloy-config.md` and `references/queries-alerts.md`).

It sits in DevOps & Cloud, covering Monitoring and alerting, Observability and Query optimization. It works with Grafana, PostgreSQL, MySQL and SQL. The licence is Apache-2.0.

When your agent uses it

  • Monitoring database performance
  • Diagnosing slow queries
  • Setting up DB observability for RDS / Aurora / Cloud SQL / Azure Database / self-managed instances
  • Correlating DB metrics with APM

Example prompts

  • “my database is slow”
  • “find the slow queries”
  • “monitor RDS”
  • “/database-observability”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Add the Alloy config block from references/alloy-config.md § PostgreSQL
  2. Restart Alloy and wait ~60s for first scrape
  3. Verify in Grafana Cloud → Database Observability — the instance should appear with non-empty db_query_total{db_instance="mydb"} series. If…

What it can do on your machine

Read from SKILL.md and the folder at commit 1ccacf2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are sql).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • grafana.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Database Observability loads about 1.1k tokens when it runs, and up to ~2k if it reads all its reference files. Until then it costs about 208 tokens; SKILL.md has 252 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~208
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from grafana/skills at commit 1ccacf2, republished under its Apache-2.0 licence (© grafana). 252 words, ~1,111 tokens.

Download SKILL.mdSave it as .claude/skills/database-observability/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
database-observability
description
Set up Grafana Cloud Database Observability for MySQL and PostgreSQL — enables `pg_stat_statements` / Performance Schema, creates a least-privilege monitoring user, configures the `database_observability.postgres` / `database_observability.mysql` Alloy components, ships query samples + visual explain plans + RED metrics + schema details to Grafana Cloud, and correlates slow queries with application traces via `db.statement` / `db.system` OTel attributes. Use when monitoring database performance, diagnosing slow queries, setting up DB observability for RDS / Aurora / Cloud SQL / Azure Database / self-managed instances, correlating DB metrics with APM, or alerting on query latency — even when the user says "my database is slow", "find the slow queries", or "monitor RDS" without saying "observability".
license
Apache-2.0

Grafana Cloud Database Observability

Docs: https://grafana.com/docs/grafana-cloud/monitor-applications/database-observability/

Query-level insights (RED metrics, query samples, explain plans) for MySQL and PostgreSQL without application code changes. GA since April 2026.

Common Workflows

PostgreSQL setup
sql
-- 1. Enable pg_stat_statements (requires restart)
--    In postgresql.conf:  shared_preload_libraries = 'pg_stat_statements'
--    Then restart PostgreSQL.

-- 2. Create a least-privilege monitoring user
CREATE USER grafana_monitoring WITH PASSWORD 'secret';
GRANT pg_monitor TO grafana_monitoring;
GRANT CONNECT ON DATABASE mydb TO grafana_monitoring;

-- 3. Enable the extension on each monitored DB
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;

-- 4. Verify
SELECT count(*) FROM pg_stat_statements;
-- Should return >= 0 (not an error). If "relation does not exist": step 3 didn't run.
  1. Add the Alloy config block from references/alloy-config.md § PostgreSQL
  2. Restart Alloy and wait ~60s for first scrape
  3. Verify in Grafana Cloud → Database Observability — the instance should appear with non-empty db_query_total{db_instance="mydb"} series. If empty after 2 minutes: check Alloy logs for connection errors, then re-verify pg_stat_statements permissions.
MySQL setup
sql
-- 1. Create least-privilege monitoring user
CREATE USER 'grafana_monitoring'@'%' IDENTIFIED BY 'secret';
GRANT SELECT, PROCESS, REPLICATION CLIENT ON *.* TO 'grafana_monitoring'@'%';
GRANT SELECT ON performance_schema.* TO 'grafana_monitoring'@'%';
FLUSH PRIVILEGES;

-- 2. Verify performance_schema is enabled (default in MySQL 8+)
SELECT @@performance_schema;
-- Returns 1 → enabled. 0 → set performance_schema=ON in my.cnf + restart.
  1. Add the Alloy config block from references/alloy-config.md § MySQL
  2. Restart Alloy, wait ~60s, verify the instance appears in Grafana Cloud → Database Observability

Supported databases

DatabaseVariants
MySQLSelf-managed, RDS MySQL, Aurora MySQL, Cloud SQL MySQL, Azure Database for MySQL
PostgreSQLSelf-managed, RDS PostgreSQL, Aurora PostgreSQL, Cloud SQL PostgreSQL, Azure Database for PostgreSQL

For managed databases (RDS / Cloud SQL / Azure), pg_stat_statements is preinstalled but disabled — enable it via the parameter group / flag, then re-create the extension at the DB level.

What you get

  • Query Performance dashboard (auto-provisioned): top queries by total time / call count / mean latency, sampled query texts with parameters, visual explain plans, RED metrics per query digest
  • APM correlation: drill from a slow service-latency span to the specific slow SQL via db.statement / db.system / db.name OTel attributes — see references/queries-alerts.md § Trace correlation
  • Alerting on query latency, error rate, and connection-pool saturation — full alert YAML in references/queries-alerts.md § Alert rules

References

  • references/alloy-config.md — full Alloy database_observability.postgres / database_observability.mysql config blocks + collector reference (pg_stat_statements, query_samples, schema_details, explain_plans)
  • references/queries-alerts.md — key PromQL queries, alert rule YAML, and trace-correlation setup

© grafana, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/grafana-cloud/database-observability of grafana/skills.

  • SKILL.md
  • references/alloy-config.md
  • references/queries-alerts.md

Open the folder on GitHubat commit 1ccacf2

Compare with similar skills

Database Observability next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Database Observability compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Database Observability this skillgrafana/skills278—~1.1kAutomated safety check: PassApache-2.0
Database ObservabilityKilo-Org/kilo-marketplace189—~1.4kAutomated safety check: PassApache-2.0
OpenTelemetry Pipeline Metrics Speccomet-ml/opik22k—~3.2kAutomated safety check: PassApache-2.0
Archestra Dev Observabilityarchestra-ai/archestra4.3k—~1.2kAutomated safety check: PassCustom licence
Frontmcp Observabilityagentfront/frontmcp146—~4.6kAutomated safety check: PassApache-2.0
Monitoring Observabilityahmedasmar/devops-claude-skills203—~3.9kAutomated safety check: PassNone

Similar skills

  • Database Observability

    Kilo-Org/kilo-marketplace

    Grafana Cloud Database Observability — query-level performance insights for MySQL and PostgreSQL.

    189 GitHub stars~1.4k tokensUpdated 8 days ago
    DevOps & CloudAuto-check passed
  • Specifies how to instrument an opik-backend pipeline with per-stage OpenTelemetry metrics for throughput, latency, errors and queue delay by workspace.

    22k GitHub stars~3.2k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Archestra Dev Observability

    archestra-ai/archestra

    A skill your agent uses when changing Archestra tracing, metrics, OpenTelemetry, Tempo, Grafana, Prometheus, LLM/MCP spans, observability labels, or local observability setup.

    4.3k GitHub stars~1.2k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Frontmcp Observability

    agentfront/frontmcp

    A skill your agent uses when adding tracing, structured logging, metrics, or monitoring to a FrontMCP server.

    146 GitHub stars~4.6k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Monitoring Observability

    ahmedasmar/devops-claude-skills

    Monitoring and observability strategy, implementation, and troubleshooting.

    203 GitHub stars~3.9k tokensUpdated 5 mo ago
    DevOps & CloudAuto-check passed
  • Mz Query Tracing

    MaterializeInc/materialize

    Debug SQL execution time via distributed tracing (OpenTelemetry / Tempo).

    6.4k GitHub stars~1.8k tokensUpdated today
    DevOps & CloudAuto-check passed

More from grafana/skills

All 51 skills in this repo
  • K6 Docs

    grafana/skills

    Official

    Write or review k6 documentation across the three k6 repositories - k6-DefinitelyTyped (TypeScript types), k6-docs (user documentation), and k6 (release notes / changelog).

    278 GitHub stars~678 tokensUpdated today
    Auto-check passed
  • Alerting Irm

    grafana/skills

    Official

    Configure Grafana Alerting, Incident Response Management (IRM), and SLOs end-to-end — provisions Grafana-managed and data-source-managed alert rules, contact points (Slack/PagerDuty/email/webhook)…

    278 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Dashboarding

    grafana/skills

    Official

    Build, modify, and ship Grafana dashboards as JSON via the HTTP API — panel types (timeseries / stat / gauge / table / heatmap / logs / traces / node-graph), gridPos 24-column layout, units…

    278 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • K6 Perf Test Website

    grafana/skills

    Official

    A skill your agent uses when the user wants to performance-test, load-test, or stress-test a public website end-to-end with k6.

    278 GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Promql

    grafana/skills

    Official

    Write, validate, and optimize PromQL for Prometheus / Grafana Mimir / Grafana Cloud Metrics.

    278 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Adaptive Metrics

    grafana/skills

    Official

    Cut Grafana Cloud Metrics cost by shrinking active-series count with Adaptive Metrics aggregation rules — auto-recommendations from query history, custom exact/regex rules, label-drop config…

    278 GitHub stars~1.3k tokensUpdated today
    Auto-check passed

Questions about Database Observability

What does Database Observability do?

Set up Grafana Cloud Database Observability for MySQL and PostgreSQL — enables pgstatstatements / Performance Schema, creates a least-privilege monitoring user, configures the…. Database Observability is an agent skill from grafana/skills, published by the product's own GitHub organization.system OTel attributes.

When should I use Database Observability?

Database Observability fits situations like: monitoring database performance; diagnosing slow queries; setting up DB observability for RDS / Aurora / Cloud SQL / Azure Database / self-managed instances; correlating DB metrics with APM.

How do I install Database Observability in Claude Code?

Run `npx skills add grafana/skills --skill database-observability -a claude-code`. Or copy the skill folder (skills/grafana-cloud/database-observability in grafana/skills) into .claude/skills/database-observability in your project. Claude Code loads it when a task matches its description.

How do I install Database Observability in Codex?

Run `npx skills add grafana/skills --skill database-observability -a codex`. Or copy the skill folder (skills/grafana-cloud/database-observability in grafana/skills) into .agents/skills/database-observability in your project. Codex loads it when a task matches its description.

Can I use Database Observability in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add grafana/skills --skill database-observability -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/database-observability, .gemini/skills/database-observability, .github/skills/database-observability and .opencode/skills/database-observability in your project.

What does Database Observability need to run?

SKILL.md names no scripts, command-line tools or credentials: Database Observability is instructions for the agent only.

Does Database Observability access the network?

SKILL.md names 1 domain. As links in the text: grafana.com. This is read from the text; nothing was executed.

Is Database Observability safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Database Observability use?

Database Observability is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Database Observability use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 871 tokens, read only when the agent opens those files.

What are the alternatives to Database Observability?

Skills that share tags, products or a category with Database Observability: Database Observability (Kilo-Org/kilo-marketplace, 189 stars), OpenTelemetry Pipeline Metrics Spec (comet-ml/opik, 22k stars), Archestra Dev Observability (archestra-ai/archestra, 4.3k stars) and Frontmcp Observability (agentfront/frontmcp, 146 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Database Observability?

grafana (a GitHub organization, an official publisher) maintains it in grafana/skills, which has 278 GitHub stars. The repository holds 51 skills in this directory. The repository was last updated on October 6, 2026.

Source: grafana/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.