Skip to content

Grafana-assembled rich reports (PNG export + narrative stitching) #36

Description

@tallpsmith

The Why

When Grafana is available and pmmcp has created a triage dashboard (#10), we have access to high-quality rendered chart images via mcp-grafana's get_panel_image and get_dashboard_image tools (requires Grafana Image Renderer plugin). These could be assembled into a portable, self-contained HTML/PDF report that combines real Grafana charts with Claude's narrative analysis — the best of both worlds.

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


Context from #10 Design

The #10 design established a visualisation fallback cascade:

  1. Grafana dashboard (primary)
  2. Claude-generated HTML file (fallback when no Grafana)
  3. Text/table output (existing behaviour)

This issue adds a hybrid tier between 1 and 2: when Grafana IS available, pull rendered PNGs from the dashboard we just created and assemble them into a rich report file.


Proposed Feature

After creating a triage dashboard in Grafana:

  1. Use mcp-grafana.get_panel_image to export each panel as PNG
  2. Claude assembles an HTML (or PDF) report combining:
    • Rendered chart images (base64-embedded in HTML)
    • Investigation narrative and interpretation
    • Statistical summaries (anomalies, correlations, comparisons)
    • Timeline of findings
  3. Save to PMMCP_REPORT_DIR (same config as External Integration Contracts (Grafana MCP, reporting strategy) #10's HTML fallback)

Use Cases

  • Post-incident reports for distribution (email to stakeholders, attach to Jira tickets)
  • Offline analysis — the report is self-contained, no Grafana access needed to view
  • Compliance/audit trail — portable artifact of what was investigated and found

Open Questions

  • HTML with embedded base64 PNGs vs actual PDF generation? HTML is simpler; PDF is more "official"
  • Should this be automatic ("here's your report") or on-demand ("generate a report from this investigation")?
  • Does Grafana Enterprise's built-in PDF reporting make this redundant for Enterprise users?
  • Image quality/resolution settings?
  • How large do these files get with multiple panels? Any size concerns?

Prerequisites

  • Grafana Image Renderer plugin must be installed on the user's Grafana instance
  • mcp-grafana must expose get_panel_image / get_dashboard_image (confirmed available as of 2026-03)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions