Use infrastructure memory for context
Follow this guide to keep Grafana Assistant aware of your infrastructure layout. By refreshing and applying infrastructure memories, you ensure the Assistant and investigations answer with accurate service names, dependencies, and monitoring hints.
What you’ll achieve
- Run or schedule discovery scans across selected Prometheus data sources.
- Review generated infrastructure memories to confirm accuracy and completeness.
- Apply memories in chat and investigations so responses include precise topology context.
Before you begin
- Prometheus data sources: Discovery currently analyzes services by querying Prometheus.
- Investigations entitlement: Required to run discovery and retrieve memories.
Run a discovery scan
Start an infrastructure scan from Assistant settings so the memory store reflects your current services and labels.
- Navigate to Grafana Assistant > Settings > Infrastructure memory.
- Select the Prometheus data sources you want to scan. You can run multiple data sources in one job. Pick only what you need to keep the context window focused.
- Start the scan and monitor progress. Phase 1 discovers services; Phase 2 groups them and creates memories. Correct any data source selections by re-running the scan; you do not need to start a new conversation.
Warning
Running a new scan replaces the existing memories for the selected data sources. Schedule scans during low-impact windows.
Review memory quality
Inspect the generated memories to confirm they describe your services accurately and cover the details responders need.
- Use the memory list to spot-check key services. The Assistant stores sections for overview, infrastructure layout, dependencies, monitoring signals, labels, and triage checklists.
- Confirm that service names and labels match how your teams refer to them.
- Note any unsupported data sources or missing services. Document gaps so you can supplement the context manually during incidents.
Apply memories in chat and investigations
Reference memories during conversations and investigations so the Assistant responds with precise topology context.
- Mention a service by name and the Assistant retrieves the related memory automatically:
Tell me about the shopping cart service.
- Ask for intent-based retrieval when you do not know the exact group name:
Which services handle user authentication?
- When you launch an investigation, the agents pull relevant memories to plan tasks, understand dependencies, and avoid guesswork.
Refresh and maintain infrastructure context
Keep the memory set current by scheduling scans and documenting edge cases where automated discovery falls short.
- Schedule periodic scans or trigger one after major infrastructure changes.
- Track scan errors in the settings page; re-run with fewer data sources if a job fails.
- Capture known limitations, for example, non-Prometheus services, in your incident runbooks so responders can provide manual context.
- When answering questions, reference the memory by name and include examples (such as namespace or label values) so the Assistant knows exactly which group to analyze.
Keep infrastructure context current
You have up-to-date infrastructure memories stored in Grafana Assistant. These memories keep chat conversations and investigations anchored to real service names, labels, and dependencies, reducing guesswork during incidents.
Troubleshooting
- No memories appear: verify you enabled investigations and confirm the selected data sources contain recent Prometheus series.
- Outdated labels: run a fresh scan and check that the scrape configs expose accurate metadata.
- Excessive groups: refine your service taxonomy or use the
by_intent
mode to retrieve only the relevant portions of the memory.
Next steps
- Apply memories in Run a systematic investigation for context-aware troubleshooting.
- Explore Navigation workflows to find related dashboards and data sources.