{
  "dashboard": {
    "title": "Audit Log Service Dashboard",
    "uid": "audit-log-service",
    "panels": [
      {
        "title": "Total Audit Logs",
        "type": "stat",
        "gridPos": {"x": 0, "y": 0, "w": 6, "h": 4},
        "targets": [{"expr": "sum(audit_log_total)", "legendFormat": "Total"}]
      },
      {
        "title": "Sensitive Operations",
        "type": "stat",
        "gridPos": {"x": 6, "y": 0, "w": 6, "h": 4},
        "targets": [{"expr": "sum(audit_log_sensitive_total)", "legendFormat": "Sensitive"}]
      },
      {
        "title": "Failed Operations",
        "type": "stat",
        "gridPos": {"x": 12, "y": 0, "w": 6, "h": 4},
        "targets": [{"expr": "sum(audit_log_fail_total)", "legendFormat": "Failed"}]
      },
      {
        "title": "Average Response Time (ms)",
        "type": "graph",
        "gridPos": {"x": 0, "y": 4, "w": 12, "h": 8},
        "targets": [{"expr": "rate(audit_log_duration_seconds_sum[5m]) / rate(audit_log_duration_seconds_count[5m]) * 1000"}]
      },
      {
        "title": "Operations by Type",
        "type": "piechart",
        "gridPos": {"x": 12, "y": 4, "w": 12, "h": 8},
        "targets": [{"expr": "sum by (operation_type) (audit_log_total)"}]
      }
    ]
  }
}
