Grafana dashboard: HTTP Server Overview
Description: A simple HTTP server overview dashboard based on data from the Blackbox Exporter module and Structr's Prometheus metrics endpoint.

This dashboard uses metrics from two Prometheus modules: Blackbox Exporter and Structr Prometheus Endpoint. See https://structr.com for more information about Structr.

{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "Prometheus with Blackbox Exporter",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__elements": {
    "QyHJrtmVz": {
      "name": "Navigation",
      "uid": "QyHJrtmVz",
      "kind": 1,
      "model": {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "description": "",
        "options": {
          "folderId": 0,
          "maxItems": 10,
          "query": "",
          "showHeadings": false,
          "showRecentlyViewed": false,
          "showSearch": true,
          "showStarred": false,
          "tags": []
        },
        "pluginVersion": "9.0.7",
        "title": "Navigation",
        "type": "dashlist"
      }
    },
    "tRlA-Km4k": {
      "name": "Status overview 1 day",
      "uid": "tRlA-Km4k",
      "kind": 1,
      "model": {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "continuous-GrYlRd"
            },
            "custom": {
              "fillOpacity": 70,
              "lineWidth": 0,
              "spanNulls": false
            },
            "mappings": [],
            "min": 200,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "red",
                  "value": null
                }
              ]
            }
          },
          "overrides": []
        },
        "hideTimeOverride": false,
        "options": {
          "alignValue": "center",
          "legend": {
            "displayMode": "hidden",
            "placement": "bottom"
          },
          "mergeValues": true,
          "rowHeight": 0.9,
          "showValue": "auto",
          "tooltip": {
            "mode": "single",
            "sort": "none"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_PROMETHEUS}"
            },
            "editorMode": "code",
            "exemplar": false,
            "expr": "probe_http_status_code",
            "instant": false,
            "interval": "",
            "legendFormat": "{{instance}}",
            "range": true,
            "refId": "A"
          }
        ],
        "timeFrom": "1d",
        "title": "Status overview",
        "type": "state-timeline"
      }
    },
    "_NW1aFm4z": {
      "name": "Status overview 1 month",
      "uid": "_NW1aFm4z",
      "kind": 1,
      "model": {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "continuous-GrYlRd"
            },
            "custom": {
              "fillOpacity": 70,
              "lineWidth": 0,
              "spanNulls": false
            },
            "mappings": [],
            "min": 200,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            }
          },
          "overrides": []
        },
        "hideTimeOverride": false,
        "options": {
          "alignValue": "center",
          "legend": {
            "displayMode": "table",
            "placement": "bottom"
          },
          "mergeValues": true,
          "rowHeight": 0.9,
          "showValue": "auto",
          "tooltip": {
            "mode": "single",
            "sort": "none"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_PROMETHEUS}"
            },
            "editorMode": "builder",
            "exemplar": false,
            "expr": "probe_http_status_code",
            "instant": false,
            "interval": "",
            "legendFormat": "{{instance}}",
            "range": true,
            "refId": "A"
          }
        ],
        "timeFrom": "1M",
        "title": "Status overview",
        "type": "state-timeline"
      }
    }
  },
  "__requires": [
    {
      "type": "panel",
      "id": "dashlist",
      "name": "Dashboard list",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "9.0.7"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "state-timeline",
      "name": "State timeline",
      "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",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "A simple HTTP server overview dashboard based on data from the Blackbox Exporter module and Structr's Prometheus metrics endpoint.",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "id": 162,
      "libraryPanel": {
        "uid": "QyHJrtmVz",
        "name": "Navigation"
      }
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": false,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Time"
            },
            "properties": [
              {
                "id": "custom.hidden",
                "value": true
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "job"
            },
            "properties": [
              {
                "id": "custom.hidden",
                "value": true
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "__name__"
            },
            "properties": [
              {
                "id": "custom.hidden",
                "value": true
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Last Response Time"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "color-text"
              },
              {
                "id": "max",
                "value": 1
              },
              {
                "id": "color",
                "value": {
                  "mode": "continuous-GrYlRd"
                }
              },
              {
                "id": "custom.align",
                "value": "center"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Certificate Validity"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "color-background-solid"
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "red",
                      "value": null
                    },
                    {
                      "color": "#EAB839",
                      "value": 14
                    },
                    {
                      "color": "green",
                      "value": 31
                    }
                  ]
                }
              },
              {
                "id": "custom.align",
                "value": "center"
              },
              {
                "id": "custom.width",
                "value": 150
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "HTTP Status Code"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "color-text"
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "red",
                      "value": null
                    },
                    {
                      "color": "green",
                      "value": 200
                    },
                    {
                      "color": "#EAB839",
                      "value": 300
                    },
                    {
                      "color": "red",
                      "value": 500
                    }
                  ]
                }
              },
              {
                "id": "custom.align",
                "value": "center"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Average 1 hour"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "gradient-gauge"
              },
              {
                "id": "max",
                "value": 1
              },
              {
                "id": "color",
                "value": {
                  "mode": "continuous-GrYlRd"
                }
              },
              {
                "id": "custom.align",
                "value": "center"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Average 1 day"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "gradient-gauge"
              },
              {
                "id": "max",
                "value": 1
              },
              {
                "id": "color",
                "value": {
                  "mode": "continuous-GrYlRd"
                }
              },
              {
                "id": "custom.align",
                "value": "center"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 27,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "id": 156,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": false,
            "displayName": "instance"
          }
        ]
      },
      "pluginVersion": "9.0.7",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "builder",
          "exemplar": false,
          "expr": "probe_http_status_code{instance=~\"$instance\"}",
          "format": "table",
          "instant": true,
          "legendFormat": "__auto",
          "range": false,
          "refId": "HTTP Status Code"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "(probe_ssl_earliest_cert_expiry{instance=~\"$instance\"} - time()) / (60*60*24)",
          "format": "table",
          "hide": false,
          "instant": true,
          "legendFormat": "__auto",
          "range": false,
          "refId": "Certificate Validity"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "probe_duration_seconds{instance=~\"$instance\"}",
          "format": "table",
          "hide": false,
          "instant": false,
          "legendFormat": "__auto",
          "range": true,
          "refId": "Last Response Time"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "avg_over_time(probe_duration_seconds{instance=~\"$instance\"}[1h])",
          "format": "table",
          "hide": false,
          "instant": false,
          "legendFormat": "__auto",
          "range": true,
          "refId": "Average Reponse Time 1 hour"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "avg_over_time(probe_duration_seconds{instance=~\"$instance\"}[1d])",
          "format": "table",
          "hide": false,
          "instant": false,
          "legendFormat": "__auto",
          "range": true,
          "refId": "Average Response Time 1 day"
        }
      ],
      "title": "Server status overview",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "instance"
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {},
            "renameByName": {
              "Value #A": "HTTP Status Code",
              "Value #Average Reponse Time 1 hour": "Average 1 hour",
              "Value #Average Response Time": "Response Time",
              "Value #Average Response Time 1 day": "Average 1 day",
              "Value #B": "Certificate Validity",
              "Value #Certificate Validity": "Certificate Validity",
              "Value #Current Response Time": "Last Reponse Time",
              "Value #HTTP Status Code": "HTTP Status Code",
              "Value #Last Response Time": "Last Response Time",
              "job 2": ""
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "",
      "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": 1,
            "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
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 0,
        "y": 5
      },
      "id": 166,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_PROMETHEUS}"
          },
          "editorMode": "code",
          "expr": "sum by(instance) (rate(structr_http_requests_total[1m])) > 0",
          "legendFormat": "__auto",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Traffic",
      "type": "timeseries"
    },
    {
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 11
      },
      "id": 158,
      "libraryPanel": {
        "uid": "tRlA-Km4k",
        "name": "Status overview 1 day"
      }
    },
    {
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 19
      },
      "id": 160,
      "libraryPanel": {
        "uid": "_NW1aFm4z",
        "name": "Status overview 1 month"
      }
    }
  ],
  "refresh": "10s",
  "schemaVersion": 36,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "definition": "label_values(instance)",
        "hide": 0,
        "includeAll": false,
        "multi": true,
        "name": "instance",
        "options": [],
        "query": {
          "query": "label_values(instance)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {
    "hidden": false,
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ],
    "type": "timepicker"
  },
  "timezone": "browser",
  "title": "HTTP Server Overview",
  "uid": "Wg3f4vi4z",
  "version": 75,
  "weekStart": "",
  "gnetId": 16770
}