Skip to content

Dashboard lifecycle management (pruning, retention, keep-tagging) #35

Description

@tallpsmith

The Why

When pmmcp creates triage dashboards in Grafana (via #10), they accumulate over time in the pmmcp-triage folder. Without lifecycle management, the folder becomes a graveyard of stale incident dashboards that nobody prunes.

Depends on: #10 (Grafana integration must be working first)


Context from #10 Design

Dashboards created by pmmcp are semi-persistent — they live in a configurable Grafana folder (PMMCP_GRAFANA_FOLDER, default pmmcp-triage), tagged pmmcp-generated, named YYYY-MM-DD <short summary>. The user owns them from creation, but manual gardening gets tedious.


Proposed Feature

A new pmmcp tool (or prompt workflow) that can prune older auto-generated dashboards based on criteria:

  • Age-based: "Delete any pmmcp dashboard older than 7 days"
  • Tag-based exclusion: Dashboards tagged keep (or similar) are never pruned
  • User-confirmed: Claude lists candidates for deletion, user approves before anything is removed

Open Questions

  • Should this be a pmmcp tool (pcp_prune_dashboards) or a prompt workflow that uses mcp-grafana's search_dashboards + dashboard deletion?
  • What's the right default retention? 7 days? 30 days? No default (always ask)?
  • Should pmmcp track dashboard UIDs it created (in session DB or a persistent store) or rely on folder + tag discovery?
  • Could Grafana's own retention/cleanup features handle this instead?

Safety Considerations

  • Deletion is destructive and irreversible — must have user confirmation
  • Must only target dashboards in the pmmcp folder with the pmmcp-generated tag — never touch user-created dashboards
  • The keep tag (or equivalent) must be a hard exclusion — no "are you sure?" override

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions