diff --git a/grafana/dashboard.json b/grafana/dashboard.json index ae84598..017e08e 100644 --- a/grafana/dashboard.json +++ b/grafana/dashboard.json @@ -1,2169 +1,2755 @@ { - "__inputs": [ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": [], + "__requires": [ + { + "type": "panel", + "id": "bargauge", + "name": "Bar gauge", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "v1.0" + }, + { + "type": "panel", + "id": "piechart", + "name": "Pie chart", + "version": "" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ { - "name": "DS_PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" } - ], - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "v1.0" + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "iteration": 1662311765599, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 }, - { - "type": "panel", - "id": "piechart", - "name": "Pie chart", - "version": "" + "id": 16, + "panels": [], + "title": "General Information", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "index": 0, + "text": "Down" + }, + "1": { + "index": 1, + "text": "Up" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0 + }, + { + "color": "#299c46", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" + "gridPos": { + "h": 5, + "w": 4, + "x": 0, + "y": 1 }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "" + "id": 14, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ + "pluginVersion": "v1.0", + "targets": [ { - "builtIn": 1, "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "type": "dashboard" + "expr": "nagios_up", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{ legend }}", + "refId": "A" } - ] + ], + "title": "Status", + "transparent": true, + "type": "stat" }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "iteration": 1662221079141, - "links": [], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 16, - "panels": [], - "title": "General Information", - "type": "row" + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "index": 0, - "text": "Down" - }, - "1": { - "index": 1, - "text": "Up" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d44a3a", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 0 - }, - { - "color": "#299c46", - "value": 1 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 4, - "x": 0, - "y": 1 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "value" - }, - "pluginVersion": "v1.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "expr": "nagios_up", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{ legend }}", - "refId": "A" - } - ], - "title": "Status", - "transparent": true, - "type": "stat" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "gridPos": { + "h": 5, + "w": 4, + "x": 4, + "y": 1 + }, + "id": 24, + "options": { + "displayLabels": [], + "legend": { + "displayMode": "list", + "placement": "right", + "values": [ + "percent" + ] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [] - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 4, - "x": 4, - "y": 1 - }, - "id": 24, - "options": { - "displayLabels": [], - "legend": { - "displayMode": "list", - "placement": "right", - "values": [ - "percent" - ] + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "pieType": "pie", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } + "editorMode": "code", + "exemplar": false, + "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"ok\"}", + "instant": true, + "legendFormat": "{{status}}", + "range": false, + "refId": "A" }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"ok\"}", - "instant": true, - "legendFormat": "{{status}}", - "range": false, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"warn\"}", - "hide": false, - "legendFormat": "{{status}}", - "range": true, - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"critical\"}", - "hide": false, - "legendFormat": "{{status}}", - "range": true, - "refId": "B" + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"flapping\"}", - "hide": false, - "legendFormat": "{{status}}", - "range": true, - "refId": "D" - } - ], - "title": "Service Status", - "type": "piechart" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "editorMode": "code", + "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"warn\"}", + "hide": false, + "legendFormat": "{{status}}", + "range": true, + "refId": "C" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [] - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 4, - "x": 8, - "y": 1 - }, - "id": 26, - "options": { - "displayLabels": [], - "legend": { - "displayMode": "list", - "placement": "right", - "values": [ - "percent" - ] + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "pieType": "pie", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } + "editorMode": "code", + "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"critical\"}", + "hide": false, + "legendFormat": "{{status}}", + "range": true, + "refId": "B" }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"up\"}", - "instant": true, - "legendFormat": "{{status}}", - "range": false, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"down\"}", - "hide": false, - "legendFormat": "{{status}}", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"unreachable\"}", - "hide": false, - "legendFormat": "{{status}}", - "range": true, - "refId": "C" + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"flapping\"}", - "hide": false, - "legendFormat": "{{status}}", - "range": true, - "refId": "D" - } - ], - "title": "Host Status", - "type": "piechart" + "editorMode": "code", + "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"flapping\"}", + "hide": false, + "legendFormat": "{{status}}", + "range": true, + "refId": "D" + } + ], + "title": "Service Status", + "type": "piechart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [] - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 4, - "x": 12, - "y": 1 - }, - "id": 22, - "options": { - "displayLabels": [], - "legend": { - "displayMode": "list", - "placement": "right", - "values": [ - "percent" - ] + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } }, - "pieType": "pie", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } + "mappings": [] }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_hosts_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"active\"}", - "hide": false, - "legendFormat": "{{check_type}}", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "nagios_hosts_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"passive\"}", - "hide": false, - "instant": true, - "legendFormat": "{{check_type}}", - "range": false, - "refId": "B" - } - ], - "title": "Check Types for Hosts", - "type": "piechart" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "gridPos": { + "h": 5, + "w": 4, + "x": 8, + "y": 1 + }, + "id": 23, + "options": { + "displayLabels": [], + "legend": { + "displayMode": "list", + "placement": "right", + "values": [ + "percent" + ] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [] - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 4, - "x": 16, - "y": 1 - }, - "id": 23, - "options": { - "displayLabels": [], - "legend": { - "displayMode": "list", - "placement": "right", - "values": [ - "percent" - ] + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "pieType": "pie", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } + "editorMode": "code", + "exemplar": false, + "expr": "nagios_services_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"active\"}", + "hide": false, + "instant": true, + "legendFormat": "{{check_type}}", + "range": false, + "refId": "A" }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "nagios_services_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"active\"}", - "hide": false, - "instant": true, - "legendFormat": "{{check_type}}", - "range": false, - "refId": "A" + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_services_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"passive\"}", - "hide": false, - "legendFormat": "{{check_type}}", - "range": true, - "refId": "C" - } - ], - "title": "Check Types for Services", - "type": "piechart" + "editorMode": "code", + "expr": "nagios_services_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"passive\"}", + "hide": false, + "legendFormat": "{{check_type}}", + "range": true, + "refId": "C" + } + ], + "title": "Check Types for Services", + "type": "piechart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 1 + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "Infinity": { + "index": 0, + "text": "100%" } - ] + }, + "type": "value" } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 25 + }, + { + "color": "#EAB839", + "value": 50 + }, + { + "color": "green", + "value": 100 + } + ] }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 4, - "x": 20, - "y": 1 - }, - "id": 9, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "v1.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"flapping\"}", - "instant": true, - "legendFormat": "Services", - "range": false, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"flapping\"}", - "hide": false, - "instant": true, - "legendFormat": "Hosts", - "range": false, - "refId": "B" - } - ], - "title": "Flapping Hosts and Services", - "type": "stat" - }, - { - "datasource": { - "type": "grafana", - "uid": "grafana" - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 3 - }, - "id": 12, - "options": { - "content": "

${version}

", - "mode": "markdown" + "unit": "percent" }, - "pluginVersion": "v1.0", - "targets": [ - { - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "refId": "A" - } - ], - "title": "Nagios Version", - "transparent": true, - "type": "text" + "overrides": [] }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 6 - }, - "id": 11, - "panels": [], - "title": "Hosts and Services", - "type": "row" + "gridPos": { + "h": 5, + "w": 4, + "x": 12, + "y": 1 }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "id": 44, + "options": { + "displayMode": "gradient", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "v1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "(nagios_services_acknowledges_total{job=\"$job\", instance=\"$instance\"} / ignoring(status) (nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"critical\"} + ignoring(status) nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"unknown\"})) * 100", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Percent of Down Services Acknowledged", + "type": "bargauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "Infinity": { + "index": 0, + "text": "100%" + } + }, + "type": "value" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "red", + "value": null }, - "lineInterpolation": "linear", - "lineWidth": 4, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + { + "color": "orange", + "value": 25 }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + { + "color": "#EAB839", + "value": 50 }, - "thresholdsStyle": { - "mode": "off" + { + "color": "green", + "value": 100 } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } + ] }, - "overrides": [] + "unit": "percent" }, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 7 + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 16, + "y": 1 + }, + "id": 46, + "options": { + "displayMode": "gradient", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "v1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "tooltip": { - "mode": "single", - "sort": "none" + "editorMode": "code", + "expr": "(nagios_services_acknowledges_total{job=\"$job\", instance=\"$instance\"} / ignoring(status) (nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"warn\"})) * 100", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Percent of Warning Services Acknowledged", + "type": "bargauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_services_total{job=\"$job\", instance=\"$instance\"}", - "legendFormat": "Services", - "range": true, - "refId": "A" + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 20, + "y": 1 + }, + "id": 9, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "v1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_hosts_total{job=\"$job\", instance=\"$instance\"}", - "hide": false, - "legendFormat": "Hosts", - "range": true, - "refId": "B" - } - ], - "title": "Total Number of Hosts and Services", - "type": "timeseries" + "editorMode": "code", + "exemplar": false, + "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"flapping\"}", + "hide": false, + "instant": true, + "legendFormat": "Services", + "range": false, + "refId": "A" + } + ], + "title": "Flapping Services", + "type": "stat" + }, + { + "datasource": { + "type": "grafana", + "uid": "grafana" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "gridPos": { + "h": 5, + "w": 4, + "x": 0, + "y": 6 + }, + "id": 12, + "options": { + "content": "

${version}

", + "mode": "markdown" + }, + "pluginVersion": "v1.0", + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Nagios Version", + "transparent": true, + "type": "text" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 3, - "x": 6, - "y": 7 - }, - "id": 27, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "v1.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_services_total{job=\"$job\", instance=\"$instance\"}", - "legendFormat": "Services", - "range": true, - "refId": "A" + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 4, + "y": 6 + }, + "id": 26, + "options": { + "displayLabels": [], + "legend": { + "displayMode": "list", + "placement": "right", + "values": [ + "percent" + ] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_hosts_total{job=\"$job\", instance=\"$instance\"}", - "hide": false, - "legendFormat": "Hosts", - "range": true, - "refId": "B" - } - ], - "title": "Total Number", - "type": "stat" + "editorMode": "code", + "exemplar": false, + "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"up\"}", + "instant": true, + "legendFormat": "{{status}}", + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"down\"}", + "hide": false, + "legendFormat": "{{status}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"unreachable\"}", + "hide": false, + "legendFormat": "{{status}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"flapping\"}", + "hide": false, + "legendFormat": "{{status}}", + "range": true, + "refId": "D" + } + ], + "title": "Host Status", + "type": "piechart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 8, + "y": 6 + }, + "id": 22, + "options": { + "displayLabels": [], + "legend": { + "displayMode": "list", + "placement": "right", + "values": [ + "percent" + ] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_hosts_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"active\"}", + "hide": false, + "legendFormat": "{{check_type}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "nagios_hosts_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"passive\"}", + "hide": false, + "instant": true, + "legendFormat": "{{check_type}}", + "range": false, + "refId": "B" + } + ], + "title": "Check Types for Hosts", + "type": "piechart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "Infinity": { + "index": 0, + "text": "100%" } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 3, - "x": 9, - "y": 7 - }, - "id": 3, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "v1.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "nagios_services_downtime_total{job=\"$job\", instance=\"$instance\"}", - "instant": true, - "legendFormat": "Services", - "range": false, - "refId": "A" + }, + "type": "value" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "orange", + "value": 25 + }, + { + "color": "#EAB839", + "value": 50 + }, + { + "color": "green", + "value": 100 + } + ] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_hosts_downtime_total{job=\"$job\", instance=\"$instance\"}", - "hide": false, - "legendFormat": "Hosts", - "range": true, - "refId": "B" - } - ], - "title": "Downtime", - "type": "stat" + "unit": "percent" + }, + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "gridPos": { + "h": 5, + "w": 8, + "x": 12, + "y": 6 + }, + "id": 45, + "options": { + "displayMode": "gradient", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [ + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "v1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "(nagios_hosts_acknowledges_total{job=\"$job\", instance=\"$instance\"} / ignoring(status) (nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"down\"} + ignoring(status) nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"unreachable\"})) * 100", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Percent of Down Hosts Acknowledged", + "type": "bargauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ { - "options": { - "warn": { - "color": "yellow", - "index": 0 - } - }, - "type": "value" + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 7 - }, - "id": 30, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "v1.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"ok\"}", - "hide": false, - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" + ] } - ], - "title": "Services - OK", - "type": "stat" + }, + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "gridPos": { + "h": 5, + "w": 4, + "x": 20, + "y": 6 + }, + "id": 47, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [ + "textMode": "auto" + }, + "pluginVersion": "v1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"flapping\"}", + "hide": false, + "instant": true, + "legendFormat": "Hosts", + "range": false, + "refId": "B" + } + ], + "title": "Flapping Hosts", + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 11 + }, + "id": 11, + "panels": [], + "title": "Hosts and Services", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 4, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ { - "options": { - "warn": { - "color": "yellow", - "index": 0 - } - }, - "type": "value" + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "yellow", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 7 - }, - "id": 31, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "v1.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"warn\"}", - "hide": false, - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" + ] } - ], - "title": "Services - Warn", - "type": "stat" + }, + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 12 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_services_total{job=\"$job\", instance=\"$instance\"}", + "legendFormat": "Services", + "range": true, + "refId": "A" }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_hosts_total{job=\"$job\", instance=\"$instance\"}", + "hide": false, + "legendFormat": "Hosts", + "range": true, + "refId": "B" + } + ], + "title": "Total Number of Hosts and Services", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ { - "options": { - "warn": { - "color": "yellow", - "index": 0 - } - }, - "type": "value" + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 18, - "y": 7 - }, - "id": 33, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "v1.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"critical\"}", - "hide": false, - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "Services - Critical", - "type": "stat" + ] + }, + "unit": "short" + }, + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "gridPos": { + "h": 8, + "w": 3, + "x": 6, + "y": 12 + }, + "id": 27, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "v1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_services_total{job=\"$job\", instance=\"$instance\"}", + "legendFormat": "Services", + "range": true, + "refId": "A" }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_hosts_total{job=\"$job\", instance=\"$instance\"}", + "hide": false, + "legendFormat": "Hosts", + "range": true, + "refId": "B" + } + ], + "title": "Total Number", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ { - "options": { - "warn": { - "color": "yellow", - "index": 0 - } - }, - "type": "value" + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "orange", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 21, - "y": 7 - }, - "id": 32, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "v1.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"unknown\"}", - "hide": false, - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "Services - Unknown", - "type": "stat" + ] + }, + "unit": "short" + }, + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "gridPos": { + "h": 8, + "w": 3, + "x": 9, + "y": 12 + }, + "id": 3, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "v1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "nagios_services_downtime_total{job=\"$job\", instance=\"$instance\"}", + "instant": true, + "legendFormat": "Services", + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_hosts_downtime_total{job=\"$job\", instance=\"$instance\"}", + "hide": false, + "legendFormat": "Hosts", + "range": true, + "refId": "B" + } + ], + "title": "Downtime", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 12, + "y": 12 + }, + "id": 30, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [ + "textMode": "auto" + }, + "pluginVersion": "v1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"ok\"}", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Services - OK", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ { - "options": { - "warn": { - "color": "yellow", - "index": 0 - } - }, - "type": "value" + "color": "yellow", + "value": null } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 12, - "y": 11 - }, - "id": 34, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "v1.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"up\"}", - "hide": false, - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "Hosts - Up", - "type": "stat" + ] + }, + "unit": "short" + }, + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "gridPos": { + "h": 4, + "w": 3, + "x": 15, + "y": 12 + }, + "id": 31, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [ + "textMode": "auto" + }, + "pluginVersion": "v1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"warn\"}", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Services - Warn", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ { - "options": { - "warn": { - "color": "yellow", - "index": 0 - } - }, - "type": "value" + "color": "red", + "value": null } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 16, - "y": 11 - }, - "id": 35, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "v1.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"down\"}", - "hide": false, - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "Hosts - Down", - "type": "stat" + ] + }, + "unit": "short" + }, + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "gridPos": { + "h": 4, + "w": 3, + "x": 18, + "y": 12 + }, + "id": 33, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [ + "textMode": "auto" + }, + "pluginVersion": "v1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"critical\"}", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Services - Critical", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ { - "options": { - "warn": { - "color": "yellow", - "index": 0 - } - }, - "type": "value" + "color": "orange", + "value": null } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "orange", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 11 - }, - "id": 36, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "v1.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"unreachable\"}", - "hide": false, - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "Hosts - Unreachable", - "type": "stat" + ] + }, + "unit": "short" + }, + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "gridPos": { + "h": 4, + "w": 3, + "x": 21, + "y": 12 + }, + "id": 32, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 4, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "textMode": "auto" + }, + "pluginVersion": "v1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"unknown\"}", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Services - Unknown", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } + ] }, - "overrides": [] + "unit": "short" }, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 15 + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 12, + "y": 16 + }, + "id": 34, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "id": 7, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" + "textMode": "auto" + }, + "pluginVersion": "v1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "tooltip": { - "mode": "single", - "sort": "none" - } + "editorMode": "code", + "exemplar": false, + "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"up\"}", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Hosts - Up", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + } + ] + }, + "unit": "short" }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"ok\"}", - "legendFormat": "{{status}}", - "range": true, - "refId": "A" + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 16, + "y": 16 + }, + "id": 35, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "v1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"warn\"}", - "hide": false, - "legendFormat": "{{status}}", - "range": true, - "refId": "C" + "editorMode": "code", + "exemplar": false, + "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"down\"}", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Hosts - Down", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "orange", + "value": null + } + ] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"critical\"}", - "hide": false, - "legendFormat": "{{status}}", - "range": true, - "refId": "B" + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 20, + "y": 16 + }, + "id": 36, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "v1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"flapping\"}", - "hide": false, - "legendFormat": "{{status}}", - "range": true, - "refId": "D" + "editorMode": "code", + "exemplar": false, + "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"unreachable\"}", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Hosts - Unreachable", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 4, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } - ], - "title": "Service Status", - "type": "timeseries" + }, + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 20 + }, + "id": 7, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"ok\"}", + "legendFormat": "{{status}}", + "range": true, + "refId": "A" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 4, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"warn\"}", + "hide": false, + "legendFormat": "{{status}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"critical\"}", + "hide": false, + "legendFormat": "{{status}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"flapping\"}", + "hide": false, + "legendFormat": "{{status}}", + "range": true, + "refId": "D" + } + ], + "title": "Service Status", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 4, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, - "thresholdsStyle": { - "mode": "off" + { + "color": "red", + "value": 80 } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 20 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "overrides": [] + "editorMode": "code", + "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"up\"}", + "legendFormat": "{{status}}", + "range": true, + "refId": "A" }, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 15 + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"down\"}", + "hide": false, + "legendFormat": "{{status}}", + "range": true, + "refId": "C" }, - "id": 8, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "tooltip": { - "mode": "single", - "sort": "none" + "editorMode": "code", + "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"unreachable\"}", + "hide": false, + "legendFormat": "{{status}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"flapping\"}", + "hide": false, + "legendFormat": "{{status}}", + "range": true, + "refId": "D" + } + ], + "title": "Host Status", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 18, + "panels": [], + "title": "Checks", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 4, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"up\"}", - "legendFormat": "{{status}}", - "range": true, - "refId": "A" + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 0, + "y": 30 + }, + "id": 40, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"down\"}", - "hide": false, - "legendFormat": "{{status}}", - "range": true, - "refId": "C" + "editorMode": "code", + "expr": "nagios_host_checks_minutes_bucket{job=\"$job\", instance=\"$instance\",check_type=\"active\"}", + "hide": false, + "legendFormat": "{{check_type}} - {{le}} minutes", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"unreachable\"}", - "hide": false, - "legendFormat": "{{status}}", - "range": true, - "refId": "B" + "editorMode": "code", + "expr": "nagios_host_checks_minutes_bucket{job=\"$job\", instance=\"$instance\",check_type=\"passive\"}", + "hide": false, + "legendFormat": "{{check_type}} - {{le}} minutes", + "range": true, + "refId": "B" + } + ], + "title": "Host Checks Ran Over Time", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 4, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"flapping\"}", - "hide": false, - "legendFormat": "{{status}}", - "range": true, - "refId": "D" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } - ], - "title": "Host Status", - "type": "timeseries" + }, + "overrides": [] }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 24 - }, - "id": 18, - "panels": [], - "title": "Checks", - "type": "row" + "gridPos": { + "h": 9, + "w": 8, + "x": 8, + "y": 30 }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "id": 38, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_service_checks_minutes_bucket{job=\"$job\", instance=\"$instance\",check_type=\"active\"}", + "hide": false, + "legendFormat": "{{check_type}} - {{le}} minutes", + "range": true, + "refId": "A" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 4, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_service_checks_minutes_bucket{job=\"$job\", instance=\"$instance\",check_type=\"passive\"}", + "hide": false, + "legendFormat": "{{check_type}} - {{le}} minutes", + "range": true, + "refId": "B" + } + ], + "title": "Service Checks Ran Over Time", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 4, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, - "thresholdsStyle": { - "mode": "off" + { + "color": "red", + "value": 80 } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } + ] }, - "overrides": [] + "unit": "s" }, - "gridPos": { - "h": 9, - "w": 8, - "x": 0, - "y": 25 - }, - "id": 19, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 16, + "y": 30 + }, + "id": 42, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "tooltip": { - "mode": "single", - "sort": "none" - } + "editorMode": "code", + "expr": "nagios_host_checks_performance_seconds{job=\"$job\", instance=\"$instance\",check_type=\"active\", performance_type=\"execution\", operator=\"avg\"}", + "hide": false, + "legendFormat": "Host - {{operator}} {{performance_type}}", + "range": true, + "refId": "A" }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_services_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"active\"}", - "legendFormat": "{{check_type}} - services", - "range": true, - "refId": "A" + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_hosts_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"passive\"}", - "hide": false, - "legendFormat": "{{check_type}} - hosts", - "range": true, - "refId": "B" + "editorMode": "code", + "expr": "nagios_host_checks_performance_seconds{job=\"$job\", instance=\"$instance\",check_type=\"active\", performance_type=\"latency\", operator=\"avg\"}", + "hide": false, + "legendFormat": "Host - {{operator}} {{performance_type}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_services_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"passive\"}", - "hide": false, - "legendFormat": "{{check_type}} - services", - "range": true, - "refId": "C" + "editorMode": "code", + "expr": "nagios_service_checks_performance_seconds{job=\"$job\", instance=\"$instance\",check_type=\"active\", performance_type=\"latency\",operator=\"avg\"}", + "hide": false, + "legendFormat": "Service - {{operator}} {{performance_type}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_hosts_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"active\"}", - "hide": false, - "legendFormat": "{{check_type}} - hosts", - "range": true, - "refId": "D" - } - ], - "title": "Check Types for Hosts and Services", - "type": "timeseries" + "editorMode": "code", + "expr": "nagios_host_checks_performance_seconds{job=\"$job\", instance=\"$instance\",check_type=\"active\", performance_type=\"execution\", operator=\"avg\"}", + "hide": false, + "legendFormat": "Host - {{operator}} {{performance_type}}", + "range": true, + "refId": "D" + } + ], + "title": "Average Check Performance", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 4, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 4, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 8, - "x": 8, - "y": 25 + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, - "id": 21, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 0, + "y": 39 + }, + "id": 19, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "tooltip": { - "mode": "single", - "sort": "none" - } + "editorMode": "code", + "expr": "nagios_services_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"active\"}", + "legendFormat": "{{check_type}} - services", + "range": true, + "refId": "A" }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_services_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"passive\"}", - "hide": false, - "legendFormat": "{{check_type}}", - "range": true, - "refId": "B" + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_services_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"active\"}", - "hide": false, - "legendFormat": "{{check_type}}", - "range": true, - "refId": "D" + "editorMode": "code", + "expr": "nagios_hosts_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"passive\"}", + "hide": false, + "legendFormat": "{{check_type}} - hosts", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"critical\"}", - "hide": false, - "legendFormat": "{{status}}", - "range": true, - "refId": "E" + "editorMode": "code", + "expr": "nagios_services_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"passive\"}", + "hide": false, + "legendFormat": "{{check_type}} - services", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"unknown\"}", - "hide": false, - "legendFormat": "{{status}}", - "range": true, - "refId": "A" - } - ], - "title": "Services Critical/Unknown vs Check Types", - "type": "timeseries" + "editorMode": "code", + "expr": "nagios_hosts_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"active\"}", + "hide": false, + "legendFormat": "{{check_type}} - hosts", + "range": true, + "refId": "D" + } + ], + "title": "Check Types for Hosts and Services", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 4, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 4, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, - "gridPos": { - "h": 9, - "w": 8, - "x": 16, - "y": 25 + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 8, + "y": 39 + }, + "id": 21, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_services_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"passive\"}", + "hide": false, + "legendFormat": "{{check_type}}", + "range": true, + "refId": "B" }, - "id": 20, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "tooltip": { - "mode": "single", - "sort": "none" - } + "editorMode": "code", + "expr": "nagios_services_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"active\"}", + "hide": false, + "legendFormat": "{{check_type}}", + "range": true, + "refId": "D" }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_hosts_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"passive\"}", - "hide": false, - "legendFormat": "{{check_type}}", - "range": true, - "refId": "B" + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_hosts_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"active\"}", - "hide": false, - "legendFormat": "{{check_type}}", - "range": true, - "refId": "D" + "editorMode": "code", + "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"critical\"}", + "hide": false, + "legendFormat": "{{status}}", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"down\"}", - "hide": false, - "legendFormat": "{{status}}", - "range": true, - "refId": "E" + "editorMode": "code", + "expr": "nagios_services_status_total{job=\"$job\", instance=\"$instance\", status=\"unknown\"}", + "hide": false, + "legendFormat": "{{status}}", + "range": true, + "refId": "A" + } + ], + "title": "Services Critical/Unknown vs Check Types", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 4, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"unreachable\"}", - "hide": false, - "legendFormat": "{{status}}", - "range": true, - "refId": "A" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } - ], - "title": "Hosts Down/Unreachable vs Check Types", - "type": "timeseries" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": [], - "templating": { - "list": [ + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 16, + "y": 39 + }, + "id": 20, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ { - "current": { - "selected": false, - "text": "nagios", - "value": "nagios" + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "description": "job", - "hide": 2, - "includeAll": false, - "label": "job", - "multi": false, - "name": "job", - "options": [ - { - "selected": true, - "text": "nagios", - "value": "nagios" - } - ], - "query": "nagios", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" + "editorMode": "code", + "expr": "nagios_hosts_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"passive\"}", + "hide": false, + "legendFormat": "{{check_type}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "nagios_hosts_checked_total{job=\"$job\", instance=\"$instance\", check_type=\"active\"}", + "hide": false, + "legendFormat": "{{check_type}}", + "range": true, + "refId": "D" }, { - "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "definition": "label_values(nagios_up{job=\"$job\"}, instance)", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "instance", - "options": [], - "query": { - "query": "label_values(nagios_up{job=\"$job\"}, instance)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" + "editorMode": "code", + "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"down\"}", + "hide": false, + "legendFormat": "{{status}}", + "range": true, + "refId": "E" }, { - "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "definition": "label_values(nagios_version_info{instance=\"$instance\", job=\"$job\"},version)", - "description": "Nagios Version", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "version", - "options": [], - "query": { - "query": "label_values(nagios_version_info{instance=\"$instance\", job=\"$job\"},version)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" + "editorMode": "code", + "expr": "nagios_hosts_status_total{job=\"$job\", instance=\"$instance\", status=\"unreachable\"}", + "hide": false, + "legendFormat": "{{status}}", + "range": true, + "refId": "A" } - ] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Nagios Exporter", - "uid": "ujglLGMVz", - "version": 25, - "weekStart": "" - } + ], + "title": "Hosts Down/Unreachable vs Check Types", + "type": "timeseries" + } + ], + "schemaVersion": 36, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "nagios", + "value": "nagios" + }, + "description": "job", + "hide": 2, + "includeAll": false, + "label": "job", + "multi": false, + "name": "job", + "options": [ + { + "selected": true, + "text": "nagios", + "value": "nagios" + } + ], + "query": "nagios", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "definition": "label_values(nagios_up{job=\"$job\"}, instance)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "instance", + "options": [], + "query": { + "query": "label_values(nagios_up{job=\"$job\"}, instance)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "definition": "label_values(nagios_version_info{instance=\"$instance\", job=\"$job\"},version)", + "description": "Nagios Version", + "hide": 2, + "includeAll": false, + "multi": false, + "name": "version", + "options": [], + "query": { + "query": "label_values(nagios_version_info{instance=\"$instance\", job=\"$job\"},version)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Nagios Exporter", + "uid": "ujglLGMVz", + "version": 33, + "weekStart": "" +} diff --git a/img/grafana.png b/img/grafana.png index a2fb586..d30b655 100644 Binary files a/img/grafana.png and b/img/grafana.png differ