343 lines
8.9 KiB
JSON
343 lines
8.9 KiB
JSON
{
|
|
"annotations": {
|
|
"list": []
|
|
},
|
|
"editable": true,
|
|
"fiscalYearStartMonth": 0,
|
|
"graphTooltip": 1,
|
|
"id": null,
|
|
"links": [],
|
|
"liveNow": true,
|
|
"panels": [
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 },
|
|
"id": 100,
|
|
"title": "📌 Key Performance Indicators & Real-Time Queues",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 4, "w": 3, "x": 0, "y": 1 },
|
|
"id": 1,
|
|
"title": "Total Collected",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "sum(copykar_posts_collected_total) or vector(0)",
|
|
"legendFormat": "Collected",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"thresholds": { "mode": "absolute", "steps": [{ "color": "blue", "value": null }] }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 4, "w": 3, "x": 3, "y": 1 },
|
|
"id": 15,
|
|
"title": "📥 Redis Queue Depth",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "copykar_redis_queue_size or vector(0)",
|
|
"legendFormat": "Waiting Posts",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null },
|
|
{ "color": "orange", "value": 10 },
|
|
{ "color": "red", "value": 50 }
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 4, "w": 3, "x": 6, "y": 1 },
|
|
"id": 2,
|
|
"title": "Duplicates Blocked",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "sum(copykar_duplicates_detected_total) or vector(0)",
|
|
"legendFormat": "Duplicates",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"thresholds": { "mode": "absolute", "steps": [{ "color": "orange", "value": null }] }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 4, "w": 3, "x": 9, "y": 1 },
|
|
"id": 3,
|
|
"title": "Admin Approvals",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "sum(copykar_admin_actions_total{action=\"approved\"}) or vector(0)",
|
|
"legendFormat": "Approved",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 4, "w": 3, "x": 12, "y": 1 },
|
|
"id": 4,
|
|
"title": "Admin Rejections",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "sum(copykar_admin_actions_total{action=\"rejected\"}) or vector(0)",
|
|
"legendFormat": "Rejected",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"thresholds": { "mode": "absolute", "steps": [{ "color": "red", "value": null }] }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 4, "w": 3, "x": 15, "y": 1 },
|
|
"id": 5,
|
|
"title": "Posts Published",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "sum(copykar_posts_published_total) or vector(0)",
|
|
"legendFormat": "Published",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"thresholds": { "mode": "absolute", "steps": [{ "color": "purple", "value": null }] }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 4, "w": 3, "x": 18, "y": 1 },
|
|
"id": 6,
|
|
"title": "AI Requests Total",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "sum(copykar_ai_requests_total) or vector(0)",
|
|
"legendFormat": "AI Calls",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"thresholds": { "mode": "absolute", "steps": [{ "color": "cyan", "value": null }] }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 4, "w": 3, "x": 21, "y": 1 },
|
|
"id": 16,
|
|
"title": "Publish Queue Depth",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "copykar_posts_queue_gauge{status=\"approved\"} or vector(0)",
|
|
"legendFormat": "Approved Queued",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"thresholds": { "mode": "absolute", "steps": [{ "color": "yellow", "value": null }] }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 5 },
|
|
"id": 101,
|
|
"title": "📈 Pipeline Rates & Queue Depths",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 8, "w": 8, "x": 0, "y": 6 },
|
|
"id": 7,
|
|
"title": "Ingestion Rate by Source (posts/min)",
|
|
"type": "timeseries",
|
|
"targets": [
|
|
{
|
|
"expr": "rate(copykar_posts_collected_total[1m]) * 60",
|
|
"legendFormat": "Source: {{source_channel_id}}",
|
|
"refId": "A"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 8, "w": 8, "x": 8, "y": 6 },
|
|
"id": 8,
|
|
"title": "Publishing Rate by Target (posts/min)",
|
|
"type": "timeseries",
|
|
"targets": [
|
|
{
|
|
"expr": "rate(copykar_posts_published_total[1m]) * 60",
|
|
"legendFormat": "Target: {{target_channel_id}}",
|
|
"refId": "A"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 8, "w": 8, "x": 16, "y": 6 },
|
|
"id": 9,
|
|
"title": "Queue Depth Over Time",
|
|
"type": "timeseries",
|
|
"targets": [
|
|
{
|
|
"expr": "copykar_redis_queue_size",
|
|
"legendFormat": "Redis Incoming Queue (2m Pacing)",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "copykar_posts_queue_gauge",
|
|
"legendFormat": "State: {{status}}",
|
|
"refId": "B"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 14 },
|
|
"id": 102,
|
|
"title": "🤖 AI Operations & Deduplication Analytics",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 15 },
|
|
"id": 10,
|
|
"title": "Duplicates Intercepted by Method",
|
|
"type": "timeseries",
|
|
"targets": [
|
|
{
|
|
"expr": "sum by (method) (rate(copykar_duplicates_detected_total[1m]) * 60)",
|
|
"legendFormat": "Method: {{method}}",
|
|
"refId": "A"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 15 },
|
|
"id": 11,
|
|
"title": "AI Latency (p95 & Average Duration in sec)",
|
|
"type": "timeseries",
|
|
"targets": [
|
|
{
|
|
"expr": "histogram_quantile(0.95, sum(rate(copykar_ai_latency_seconds_bucket[5m])) by (le, action))",
|
|
"legendFormat": "p95: {{action}}",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "rate(copykar_ai_latency_seconds_sum[5m]) / rate(copykar_ai_latency_seconds_count[5m])",
|
|
"legendFormat": "Avg: {{action}}",
|
|
"refId": "B"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 23 },
|
|
"id": 103,
|
|
"title": "⚡ Container & System Telemetry",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 7, "w": 8, "x": 0, "y": 24 },
|
|
"id": 12,
|
|
"title": "Process CPU Usage (%)",
|
|
"type": "timeseries",
|
|
"targets": [
|
|
{
|
|
"expr": "rate(process_cpu_seconds_total{job=\"copykar\"}[1m]) * 100",
|
|
"legendFormat": "CPU Usage %",
|
|
"refId": "A"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 7, "w": 8, "x": 8, "y": 24 },
|
|
"id": 13,
|
|
"title": "Process RAM Usage (MB)",
|
|
"type": "timeseries",
|
|
"targets": [
|
|
{
|
|
"expr": "process_resident_memory_bytes{job=\"copykar\"} / 1024 / 1024",
|
|
"legendFormat": "Memory (MB)",
|
|
"refId": "A"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 7, "w": 8, "x": 16, "y": 24 },
|
|
"id": 14,
|
|
"title": "Active Threads & Open FDs",
|
|
"type": "timeseries",
|
|
"targets": [
|
|
{
|
|
"expr": "process_threads_total{job=\"copykar\"}",
|
|
"legendFormat": "Threads",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "process_open_fds{job=\"copykar\"}",
|
|
"legendFormat": "Open FDs",
|
|
"refId": "B"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"refresh": "5s",
|
|
"schemaVersion": 38,
|
|
"style": "dark",
|
|
"tags": ["copykar", "telegram", "ai", "telemetry", "redis"],
|
|
"time": {
|
|
"from": "now-1h",
|
|
"to": "now"
|
|
},
|
|
"timepicker": {},
|
|
"timezone": "browser",
|
|
"title": "Copykar Telegram Fleet Executive Dashboard",
|
|
"uid": "copykar-executive-dashboard",
|
|
"version": 3
|
|
}
|