Discover data sources and metrics
Run through this workflow to build a reliable inventory of data sources, label names, and metrics. It is especially useful when onboarding to a new environment or preparing to write queries and dashboards.
What you’ll achieve
- List data sources by type, name, or environment tag without navigating the Grafana settings pages.
- Surface metric names, label keys, and label values that matter to your use case.
- Capture the results in a format you can reuse for query building or documentation.
Before you begin
- Data source categories: Know whether you need metrics, logs, traces, profiles, k6 data, or SQL.
- Access to Grafana settings: You must have visibility into data source metadata.
List relevant data sources
Query the Assistant for data sources using names or tags so you can map what telemetry is available before diving into metrics.
- Ask for data sources by type or name pattern. Provide examples (like “prod” or “checkout”) so the Assistant can filter accurately.
List Prometheus data sources available to me.
- Filter by environment or naming convention when you have many results.
List Loki data sources with names containing "prod".
Explore metrics and labels
Drill into metric names and label sets that match your use case so you have concrete selectors ready for querying.
- Request metric name discovery to see what telemetry is available. If the Assistant drifts, restate the exact metric pattern or label you expect. It keeps the conversation context and adjusts accordingly.
Search for metrics matching cart.* error rates in @prometheus-ds.
- Ask for label names or values when you need to assemble selectors.
List label values for namespace in @prometheus-ds for the last six hours.
Capture findings for teammates
Format and share the inventory so everyone on the team relies on the same naming conventions and available signals.
- Ask the Assistant to format the data source list or metric inventory as a checklist or table.
- Share the results in your team wiki or runbooks so future prompts can refer to the same naming.
- When you finish the inventory and need to investigate an issue, start a new chat so the exploratory prompts do not mix with incident-related ones.
Share the data source catalog
You now have an up-to-date catalog of data sources and metrics. Save the output in your team workspace so future queries start from the same source of truth.
Troubleshooting
- Missing data source: confirm the data source exists and you have permissions.
- No metrics returned: adjust regex patterns or time ranges.
- Label discovery slow: narrow the timeframe or provide additional filters to reduce cardinality.
Next steps
- Learn Guide incident response to coordinate team navigation during outages.
- Build queries with Query assistance using discovered data sources.