openclaw-grafana-lens
Version:
OpenClaw plugin that gives AI agents full Grafana access — 18 composable tools for PromQL/LogQL/TraceQL queries, dashboard creation, alerting, SRE investigation, security monitoring, data collection pipeline management via Grafana Alloy (29 recipes), and
236 lines (235 loc) • 7.27 kB
JSON
{
"title": "Multi-KPI Overview",
"description": "4-metric KPI dashboard — pick any 4 metrics from dropdowns. Works for business, fitness, finance, IoT, or any domain.",
"tags": ["kpi", "grafana-lens", "generic"],
"timezone": "browser",
"editable": true,
"schemaVersion": 39,
"time": { "from": "now-24h", "to": "now" },
"refresh": "1m",
"templating": {
"list": [
{
"name": "datasource",
"type": "datasource",
"query": "prometheus",
"current": {},
"hide": 0
},
{
"name": "metric1",
"label": "Metric 1",
"type": "query",
"datasource": { "type": "prometheus", "uid": "$datasource" },
"query": "label_values(__name__)",
"refresh": 1,
"includeAll": false,
"current": {},
"hide": 0,
"sort": 1
},
{
"name": "metric2",
"label": "Metric 2",
"type": "query",
"datasource": { "type": "prometheus", "uid": "$datasource" },
"query": "label_values(__name__)",
"refresh": 1,
"includeAll": false,
"current": {},
"hide": 0,
"sort": 1
},
{
"name": "metric3",
"label": "Metric 3",
"type": "query",
"datasource": { "type": "prometheus", "uid": "$datasource" },
"query": "label_values(__name__)",
"refresh": 1,
"includeAll": false,
"current": {},
"hide": 0,
"sort": 1
},
{
"name": "metric4",
"label": "Metric 4",
"type": "query",
"datasource": { "type": "prometheus", "uid": "$datasource" },
"query": "label_values(__name__)",
"refresh": 1,
"includeAll": false,
"current": {},
"hide": 0,
"sort": 1
}
]
},
"panels": [
{
"id": 1,
"title": "KPI 1",
"type": "stat",
"gridPos": { "h": 4, "w": 6, "x": 0, "y": 0 },
"datasource": { "type": "prometheus", "uid": "$datasource" },
"targets": [
{
"expr": "$metric1",
"legendFormat": "{{ __name__ }}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "short"
}
}
},
{
"id": 2,
"title": "KPI 2",
"type": "stat",
"gridPos": { "h": 4, "w": 6, "x": 6, "y": 0 },
"datasource": { "type": "prometheus", "uid": "$datasource" },
"targets": [
{
"expr": "$metric2",
"legendFormat": "{{ __name__ }}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "short"
}
}
},
{
"id": 3,
"title": "KPI 3",
"type": "stat",
"gridPos": { "h": 4, "w": 6, "x": 12, "y": 0 },
"datasource": { "type": "prometheus", "uid": "$datasource" },
"targets": [
{
"expr": "$metric3",
"legendFormat": "{{ __name__ }}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "short"
}
}
},
{
"id": 4,
"title": "KPI 4",
"type": "stat",
"gridPos": { "h": 4, "w": 6, "x": 18, "y": 0 },
"datasource": { "type": "prometheus", "uid": "$datasource" },
"targets": [
{
"expr": "$metric4",
"legendFormat": "{{ __name__ }}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "short"
}
}
},
{
"id": 5,
"title": "Metric 1 Trend",
"type": "timeseries",
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 4 },
"datasource": { "type": "prometheus", "uid": "$datasource" },
"targets": [
{
"expr": "$metric1",
"legendFormat": "{{ __name__ }}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "short",
"custom": {
"fillOpacity": 10
}
}
}
},
{
"id": 6,
"title": "Metric 2 Trend",
"type": "timeseries",
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 4 },
"datasource": { "type": "prometheus", "uid": "$datasource" },
"targets": [
{
"expr": "$metric2",
"legendFormat": "{{ __name__ }}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "short",
"custom": {
"fillOpacity": 10
}
}
}
},
{
"id": 7,
"title": "Metric 3 Trend",
"type": "timeseries",
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 12 },
"datasource": { "type": "prometheus", "uid": "$datasource" },
"targets": [
{
"expr": "$metric3",
"legendFormat": "{{ __name__ }}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "short",
"custom": {
"fillOpacity": 10
}
}
}
},
{
"id": 8,
"title": "Metric 4 Trend",
"type": "timeseries",
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 12 },
"datasource": { "type": "prometheus", "uid": "$datasource" },
"targets": [
{
"expr": "$metric4",
"legendFormat": "{{ __name__ }}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "short",
"custom": {
"fillOpacity": 10
}
}
}
}
]
}