Files
compliance-scanner-agent/dashboards/compliance-dashboard.json
Sharang Parnerkar f84f69d1ea
Some checks failed
CI / Clippy (push) Successful in 4m46s
CI / Tests (push) Successful in 5m32s
CI / Deploy Agent (push) Has been cancelled
CI / Deploy Dashboard (push) Has been cancelled
CI / Deploy Docs (push) Has been cancelled
CI / Deploy MCP (push) Has been cancelled
CI / Detect Changes (push) Has been cancelled
CI / Format (push) Successful in 41s
CI / Security Audit (push) Successful in 1m55s
feat: add SigNoz dashboard JSON configs for agent and dashboard monitoring
Two dashboards with ClickHouse queries matching our tracing instrumentation:
- compliance-agent: API handler latency/errors, scan pipeline stage durations,
  DAST/graph/chat API panels, and warn/error log tracking
- compliance-dashboard: server function performance, page load distribution,
  agent connectivity health, and error log monitoring

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 09:29:48 +01:00

239 lines
9.7 KiB
JSON

{
"title": "Compliance Dashboard (Frontend)",
"description": "Monitoring dashboard for the compliance-dashboard Dioxus SSR/WASM service — page loads, server functions, and error tracking",
"tags": ["compliance", "dashboard", "frontend"],
"layout": [
{
"id": "row-overview",
"type": "row",
"title": "Overview",
"collapsed": false
},
{
"id": "panel-request-rate",
"type": "graph",
"title": "Request Rate",
"description": "Requests per second to the compliance-dashboard service",
"gridPos": { "x": 0, "y": 1, "w": 8, "h": 8 },
"query": {
"clickhouse_sql": [
{
"name": "A",
"query": "SELECT toStartOfInterval(timestamp, INTERVAL 1 MINUTE) AS ts, count() / 60 AS rps FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND parentSpanID = '' AND timestamp >= now() - INTERVAL 1 HOUR GROUP BY ts ORDER BY ts"
}
]
},
"panelType": "time_series",
"unit": "ops/s"
},
{
"id": "panel-error-rate",
"type": "graph",
"title": "Error Rate",
"description": "Percentage of requests with errors",
"gridPos": { "x": 8, "y": 1, "w": 8, "h": 8 },
"query": {
"clickhouse_sql": [
{
"name": "A",
"query": "SELECT toStartOfInterval(timestamp, INTERVAL 1 MINUTE) AS ts, countIf(hasError = true) AS errors, count() AS total, if(total > 0, errors * 100.0 / total, 0) AS error_pct FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND timestamp >= now() - INTERVAL 1 HOUR GROUP BY ts ORDER BY ts"
}
]
},
"panelType": "time_series",
"unit": "%"
},
{
"id": "panel-latency",
"type": "graph",
"title": "Response Latency (p50 / p95 / p99)",
"description": "Response time percentiles for the dashboard service",
"gridPos": { "x": 16, "y": 1, "w": 8, "h": 8 },
"query": {
"clickhouse_sql": [
{
"name": "A",
"query": "SELECT toStartOfInterval(timestamp, INTERVAL 1 MINUTE) AS ts, quantile(0.5)(durationNano) / 1e6 AS p50_ms, quantile(0.95)(durationNano) / 1e6 AS p95_ms, quantile(0.99)(durationNano) / 1e6 AS p99_ms FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND parentSpanID = '' AND timestamp >= now() - INTERVAL 1 HOUR GROUP BY ts ORDER BY ts"
}
]
},
"panelType": "time_series",
"unit": "ms"
},
{
"id": "row-server-functions",
"type": "row",
"title": "Server Functions",
"collapsed": false
},
{
"id": "panel-server-fn-latency",
"type": "graph",
"title": "Server Function Latency by Name",
"description": "p95 latency for each Dioxus server function (fetch_repositories, fetch_findings, fetch_sbom, etc.)",
"gridPos": { "x": 0, "y": 10, "w": 12, "h": 10 },
"query": {
"clickhouse_sql": [
{
"name": "A",
"query": "SELECT toStartOfInterval(timestamp, INTERVAL 5 MINUTE) AS ts, name AS server_fn, quantile(0.95)(durationNano) / 1e6 AS p95_ms FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND timestamp >= now() - INTERVAL 3 HOUR GROUP BY ts, server_fn ORDER BY ts"
}
]
},
"panelType": "time_series",
"unit": "ms"
},
{
"id": "panel-server-fn-calls",
"type": "graph",
"title": "Server Function Call Volume",
"description": "Number of calls per server function over time",
"gridPos": { "x": 12, "y": 10, "w": 12, "h": 10 },
"query": {
"clickhouse_sql": [
{
"name": "A",
"query": "SELECT toStartOfInterval(timestamp, INTERVAL 5 MINUTE) AS ts, name AS server_fn, count() AS calls FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND timestamp >= now() - INTERVAL 3 HOUR GROUP BY ts, server_fn ORDER BY ts"
}
]
},
"panelType": "time_series",
"unit": ""
},
{
"id": "panel-server-fn-errors",
"type": "table",
"title": "Server Function Errors (Last 24h)",
"description": "Server functions with the most errors",
"gridPos": { "x": 0, "y": 20, "w": 12, "h": 8 },
"query": {
"clickhouse_sql": [
{
"name": "A",
"query": "SELECT name AS server_fn, count() AS total_calls, countIf(hasError = true) AS errors, round(errors * 100.0 / total_calls, 2) AS error_pct, quantile(0.95)(durationNano) / 1e6 AS p95_ms FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND timestamp >= now() - INTERVAL 24 HOUR GROUP BY server_fn HAVING total_calls > 0 ORDER BY errors DESC LIMIT 20"
}
]
},
"panelType": "table"
},
{
"id": "panel-slow-requests",
"type": "table",
"title": "Slowest Requests (Last 1h)",
"description": "Top 20 slowest individual requests",
"gridPos": { "x": 12, "y": 20, "w": 12, "h": 8 },
"query": {
"clickhouse_sql": [
{
"name": "A",
"query": "SELECT name AS operation, traceID, durationNano / 1e6 AS duration_ms, toString(timestamp) AS time, hasError FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND parentSpanID = '' AND timestamp >= now() - INTERVAL 1 HOUR ORDER BY durationNano DESC LIMIT 20"
}
]
},
"panelType": "table"
},
{
"id": "row-page-navigation",
"type": "row",
"title": "Page Navigation Patterns",
"collapsed": true
},
{
"id": "panel-page-hits",
"type": "graph",
"title": "Page Load Distribution",
"description": "Which dashboard pages are hit most frequently (by server function patterns)",
"gridPos": { "x": 0, "y": 29, "w": 12, "h": 8 },
"query": {
"clickhouse_sql": [
{
"name": "A",
"query": "SELECT CASE WHEN name LIKE '%repositor%' THEN 'Repositories' WHEN name LIKE '%finding%' THEN 'Findings' WHEN name LIKE '%sbom%' THEN 'SBOM' WHEN name LIKE '%dast%' THEN 'DAST' WHEN name LIKE '%graph%' THEN 'Graph' WHEN name LIKE '%chat%' THEN 'Chat' WHEN name LIKE '%scan%' THEN 'Scan Runs' WHEN name LIKE '%overview%' OR name LIKE '%stats%' THEN 'Overview' ELSE 'Other' END AS page, count() AS hits FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND timestamp >= now() - INTERVAL 24 HOUR GROUP BY page ORDER BY hits DESC"
}
]
},
"panelType": "bar"
},
{
"id": "panel-agent-connectivity",
"type": "graph",
"title": "Agent API Connectivity",
"description": "Success vs failure rate of dashboard→agent API calls",
"gridPos": { "x": 12, "y": 29, "w": 12, "h": 8 },
"query": {
"clickhouse_sql": [
{
"name": "A",
"query": "SELECT toStartOfInterval(timestamp, INTERVAL 5 MINUTE) AS ts, countIf(hasError = false) AS success, countIf(hasError = true) AS failed FROM signoz_traces.distributed_signoz_index_v3 WHERE serviceName = 'compliance-dashboard' AND timestamp >= now() - INTERVAL 6 HOUR GROUP BY ts ORDER BY ts"
}
]
},
"panelType": "time_series",
"unit": ""
},
{
"id": "row-logs",
"type": "row",
"title": "Logs",
"collapsed": false
},
{
"id": "panel-log-rate",
"type": "graph",
"title": "Log Volume by Severity",
"description": "Log entries per severity level over time",
"gridPos": { "x": 0, "y": 38, "w": 12, "h": 8 },
"query": {
"clickhouse_sql": [
{
"name": "A",
"query": "SELECT toStartOfInterval(timestamp, INTERVAL 5 MINUTE) AS ts, severity_text AS level, count() AS cnt FROM signoz_logs.distributed_logs_v2 WHERE resources_string['service.name'] = 'compliance-dashboard' AND timestamp >= now() - INTERVAL 6 HOUR GROUP BY ts, level ORDER BY ts"
}
]
},
"panelType": "time_series",
"unit": ""
},
{
"id": "panel-recent-errors",
"type": "list",
"title": "Recent Error Logs",
"description": "Last 50 ERROR-level log entries from the dashboard service",
"gridPos": { "x": 12, "y": 38, "w": 12, "h": 8 },
"query": {
"clickhouse_sql": [
{
"name": "A",
"query": "SELECT toString(timestamp) AS time, body AS message, trace_id FROM signoz_logs.distributed_logs_v2 WHERE resources_string['service.name'] = 'compliance-dashboard' AND severity_text = 'ERROR' AND timestamp >= now() - INTERVAL 24 HOUR ORDER BY timestamp DESC LIMIT 50"
}
]
},
"panelType": "list"
},
{
"id": "panel-warn-messages",
"type": "table",
"title": "Top Warning Messages (24h)",
"description": "Most frequent WARN messages — catches connectivity issues, deserialization failures, etc.",
"gridPos": { "x": 0, "y": 46, "w": 24, "h": 8 },
"query": {
"clickhouse_sql": [
{
"name": "A",
"query": "SELECT body AS message, count() AS occurrences, max(toString(timestamp)) AS last_seen FROM signoz_logs.distributed_logs_v2 WHERE resources_string['service.name'] = 'compliance-dashboard' AND severity_text = 'WARN' AND timestamp >= now() - INTERVAL 24 HOUR GROUP BY message ORDER BY occurrences DESC LIMIT 30"
}
]
},
"panelType": "table"
}
],
"variables": {
"time_range": {
"type": "custom",
"label": "Time Range",
"default": "1h",
"options": ["15m", "30m", "1h", "3h", "6h", "12h", "24h", "7d"]
}
}
}