From 395a34b6f85cfc805ce8a5031aee91be65c931c7 Mon Sep 17 00:00:00 2001 From: Markus Opolka <7090372+martialblog@users.noreply.github.com> Date: Thu, 12 Mar 2026 14:35:57 +0100 Subject: [PATCH] Add example dashboard --- contrib/example-dashboard.json | 1180 ++++++++++++++++++++++++++++++++ 1 file changed, 1180 insertions(+) create mode 100644 contrib/example-dashboard.json diff --git a/contrib/example-dashboard.json b/contrib/example-dashboard.json new file mode 100644 index 0000000..bfc059e --- /dev/null +++ b/contrib/example-dashboard.json @@ -0,0 +1,1180 @@ +{ + "__inputs": [ + { + "name": "DS-PROMETHEUS", + "label": "prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "11.0.0" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 11, + "panels": [], + "title": "Icinga Overview", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 0, + "y": 1 + }, + "id": 1, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "expr": "{__name__=\"icinga2_num_services_critical\"}", + "range": true, + "refId": "A" + } + ], + "title": "Services Critical", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 3, + "y": 1 + }, + "id": 3, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_num_services_ok\"}", + "range": true, + "refId": "A" + } + ], + "title": "Services OK", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 6, + "y": 1 + }, + "id": 2, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "expr": "{__name__=\"icinga2_num_hosts_down\"}", + "range": true, + "refId": "A" + } + ], + "title": "Hosts Down", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 9, + "y": 1 + }, + "id": 4, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "expr": "{__name__=\"icinga2_num_hosts_up\"}", + "range": true, + "refId": "A" + } + ], + "title": "Hosts Up", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "displayName": "Connected API HTTP Clients", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 8, + "x": 12, + "y": 1 + }, + "id": 8, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "value_and_name", + "wideLayout": true + }, + "pluginVersion": "12.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "expr": "{__name__=\"icinga2_api_num_http_clients\"}", + "range": true, + "refId": "A" + } + ], + "title": "Icinga API HTTP Clients", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "left", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "footer": { + "reducers": [] + }, + "inspect": false, + "wrapHeaderText": false, + "wrapText": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 20, + "y": 1 + }, + "id": 7, + "options": { + "cellHeight": "sm", + "showHeader": false + }, + "pluginVersion": "12.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "expr": "{__name__=\"icinga2_version_info\"}", + "range": true, + "refId": "A" + } + ], + "title": "Icinga2 Version", + "transformations": [ + { + "id": "labelsToFields", + "options": { + "keepLabels": [ + "version" + ], + "mode": "rows" + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 6 + }, + "id": 5, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_avg_execution_time\"}", + "legendFormat": "avg", + "range": true, + "refId": "avg" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_min_execution_time\"}", + "legendFormat": "min", + "range": true, + "refId": "min" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_max_execution_time\"}", + "legendFormat": "max", + "range": true, + "refId": "max" + } + ], + "title": "Execution Time", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 6 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_avg_latency\"}", + "legendFormat": "avg", + "range": true, + "refId": "avg" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_min_latency\"}", + "legendFormat": "min", + "range": true, + "refId": "min" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_max_latency\"}", + "legendFormat": "max", + "range": true, + "refId": "max" + } + ], + "title": "Latency", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": 0 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 14 + }, + "id": 9, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "{__name__=\"icinga2_active_host_checks_5min\"}", + "format": "time_series", + "instant": false, + "legendFormat": "Hosts", + "range": true, + "refId": "Hosts" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_active_service_checks_5min\"}", + "legendFormat": "Services", + "range": true, + "refId": "Services" + } + ], + "title": "Active Checks Last 5 Minutes", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": 0 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 14 + }, + "id": 10, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_passive_host_checks_5min\"}", + "legendFormat": "Hosts", + "range": true, + "refId": "Hosts" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_passive_service_checks_5min\"}", + "legendFormat": "Services", + "range": true, + "refId": "Services" + } + ], + "title": "Passive Checks Last 5 Minutes", + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 17, + "panels": [], + "title": "Hosts and Services", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 18, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_num_hosts_in_downtime\"}", + "legendFormat": "Downtime", + "range": true, + "refId": "downtime" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_num_hosts_in_pending\"}", + "legendFormat": "Pending", + "range": true, + "refId": "pending" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_num_hosts_unreachable\"}", + "legendFormat": "Unreachable", + "range": true, + "refId": "unreachable" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_num_hosts_flapping\"}", + "legendFormat": "Flapping", + "range": true, + "refId": "flapping" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_num_hosts_problem\"}", + "legendFormat": "Problem", + "range": true, + "refId": "problem" + } + ], + "title": "Host State Overview", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 27 + }, + "id": 19, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_num_services_in_downtime\"}", + "legendFormat": "Downtime", + "range": true, + "refId": "downtime" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_num_services_in_pending\"}", + "legendFormat": "Pending", + "range": true, + "refId": "pending" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_num_services_unreachable\"}", + "legendFormat": "Unreachable", + "range": true, + "refId": "Unreachable" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_num_services_flapping\"}", + "legendFormat": "Flapping", + "range": true, + "refId": "flapping" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "{__name__=\"icinga2_num_services_problem\"}", + "legendFormat": "Problem", + "range": true, + "refId": "problem" + } + ], + "title": "Service State Overview", + "type": "timeseries" + } + ], + "preload": false, + "schemaVersion": 42, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-12h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Icinga2 (Prometheus)", + "uid": "adtr5m9", + "version": 2, + "weekStart": "" +}