-
What Grafana version and what operating system are you using?
8.5.2 on Windows Server 2019 -
What are you trying to achieve?
Graph showing whether a website is up or down on a 30s interval -
How are you trying to achieve it?
I’m using GitHub - cmjagtap/Website-Monitoring: This repository contains a grafana and prometheus setup to monitor running websites.. Blackbox_exporter and Prometheus are both Windows *.exe. All Grafana, Blackbox_exporter and Prometheus all run on a single Windows Server 2019 box. -
What happened?
The solution uses Blackbox_exporter and Prometheus. When I go to localhost@ port 9090 targets it shows 2 urls. However when I graph it using the provided json only one website is shown. It shows ‘All’ with a right down arrow which when chosen does not show the 2 urls -
What did you expect to happen?
2 sets of graphs one for the first website and one for the second website -
Can you copy/paste the configuration(s) that you are having problems with?
{
“annotations”: {
“list”: [
{
“builtIn”: 1,
“datasource”: “-- 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”: “Prometheus Blackbox Exporter Overview”,
“editable”: true,
“fiscalYearStartMonth”: 0,
“gnetId”: 7587,
“graphTooltip”: 0,
“id”: 1,
“iteration”: 1641099796275,
“links”: ,
“liveNow”: false,
“panels”: [
{
“aliasColors”: {},
“bars”: false,
“dashLength”: 10,
“dashes”: false,
“datasource”: {
“type”: “prometheus”
},
“fill”: 1,
“fillGradient”: 0,
“gridPos”: {
“h”: 8,
“w”: 24,
“x”: 0,
“y”: 0
},
“hiddenSeries”: false,
“id”: 138,
“legend”: {
“avg”: false,
“current”: false,
“max”: false,
“min”: false,
“show”: true,
“total”: false,
“values”: false
},
“lines”: true,
“linewidth”: 1,
“links”: ,
“nullPointMode”: “null”,
“options”: {
“alertThreshold”: true
},
“percentage”: false,
“pluginVersion”: “8.3.3”,
“pointradius”: 5,
“points”: false,
“renderer”: “flot”,
“seriesOverrides”: ,
“spaceLength”: 10,
“stack”: false,
“steppedLine”: false,
“targets”: [
{
“expr”: “probe_duration_seconds{instance=~”$target"}",
“format”: “time_series”,
“interval”: “$interval”,
“intervalFactor”: 1,
“legendFormat”: “{{ instance }}”,
“refId”: “A”
}
],
“thresholds”: ,
“timeRegions”: ,
“title”: “Global Probe Duration”,
“tooltip”: {
“shared”: true,
“sort”: 1,
“value_type”: “individual”
},
“type”: “graph”,
“xaxis”: {
“mode”: “time”,
“show”: true,
“values”:
},
“yaxes”: [
{
“format”: “s”,
“logBase”: 1,
“show”: true
},
{
“format”: “short”,
“logBase”: 1,
“show”: true
}
],
“yaxis”: {
“align”: false
}
},
{
“collapsed”: false,
“gridPos”: {
“h”: 1,
“w”: 24,
“x”: 0,
“y”: 8
},
“id”: 15,
“panels”: ,
“repeat”: “target”,
“title”: “$target status”,
“type”: “row”
},
{
“datasource”: {
“type”: “prometheus”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“mappings”: [
{
“options”: {
“0”: {
“text”: “DOWN”
},
“1”: {
“text”: “UP”
}
},
“type”: “value”
},
{
“options”: {
“match”: “null”,
“result”: {
“text”: “N/A”
}
},
“type”: “special”
}
],
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “#d44a3a”,
“value”: null
},
{
“color”: “rgba(237, 129, 40, 0.89)”,
“value”: 1
},
{
“color”: “#299c46”,
“value”: 1
}
]
},
“unit”: “none”
},
“overrides”:
},
“gridPos”: {
“h”: 2,
“w”: 4,
“x”: 0,
“y”: 9
},
“id”: 2,
“links”: ,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “background”,
“graphMode”: “none”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“reduceOptions”: {
“calcs”: [
“lastNotNull”
],
“fields”: “”,
“values”: false
},
“textMode”: “auto”
},
“pluginVersion”: “8.3.3”,
“repeatDirection”: “v”,
“targets”: [
{
“expr”: “probe_success{instance=~”$target"}",
“format”: “time_series”,
“interval”: “$interval”,
“intervalFactor”: 1,
“refId”: “A”
}
],
“title”: “Status”,
“type”: “stat”
},
{
“aliasColors”: {},
“bars”: false,
“dashLength”: 10,
“dashes”: false,
“datasource”: {
“type”: “prometheus”
},
“fill”: 1,
“fillGradient”: 0,
“gridPos”: {
“h”: 6,
“w”: 10,
“x”: 4,
“y”: 9
},
“hiddenSeries”: false,
“id”: 25,
“legend”: {
“avg”: false,
“current”: false,
“max”: false,
“min”: false,
“show”: true,
“total”: false,
“values”: false
},
“lines”: true,
“linewidth”: 1,
“links”: ,
“nullPointMode”: “null”,
“options”: {
“alertThreshold”: true
},
“percentage”: false,
“pluginVersion”: “8.3.3”,
“pointradius”: 5,
“points”: false,
“renderer”: “flot”,
“seriesOverrides”: ,
“spaceLength”: 10,
“stack”: false,
“steppedLine”: false,
“targets”: [
{
“expr”: “probe_http_duration_seconds{instance=~”$target"}",
“format”: “time_series”,
“interval”: “$interval”,
“intervalFactor”: 1,
“legendFormat”: “{{ phase }}”,
“refId”: “B”
}
],
“thresholds”: ,
“timeRegions”: ,
“title”: “HTTP Duration”,
“tooltip”: {
“shared”: true,
“sort”: 0,
“value_type”: “individual”
},
“type”: “graph”,
“xaxis”: {
“mode”: “time”,
“show”: true,
“values”:
},
“yaxes”: [
{
“format”: “s”,
“logBase”: 1,
“show”: true
},
{
“format”: “short”,
“logBase”: 1,
“show”: true
}
],
“yaxis”: {
“align”: false
}
},
{
“aliasColors”: {},
“bars”: false,
“dashLength”: 10,
“dashes”: false,
“datasource”: {
“type”: “prometheus”
},
“fill”: 1,
“fillGradient”: 0,
“gridPos”: {
“h”: 6,
“w”: 10,
“x”: 14,
“y”: 9
},
“hiddenSeries”: false,
“id”: 17,
“legend”: {
“avg”: false,
“current”: false,
“max”: false,
“min”: false,
“show”: true,
“total”: false,
“values”: false
},
“lines”: true,
“linewidth”: 1,
“links”: ,
“nullPointMode”: “null”,
“options”: {
“alertThreshold”: true
},
“percentage”: false,
“pluginVersion”: “8.3.3”,
“pointradius”: 5,
“points”: false,
“renderer”: “flot”,
“seriesOverrides”: ,
“spaceLength”: 10,
“stack”: false,
“steppedLine”: false,
“targets”: [
{
“expr”: “probe_duration_seconds{instance=~”$target"}",
“format”: “time_series”,
“interval”: “$interval”,
“intervalFactor”: 1,
“legendFormat”: “seconds”,
“refId”: “A”
}
],
“thresholds”: ,
“timeRegions”: ,
“title”: “Probe Duration”,
“tooltip”: {
“shared”: true,
“sort”: 0,
“value_type”: “individual”
},
“type”: “graph”,
“xaxis”: {
“mode”: “time”,
“show”: true,
“values”:
},
“yaxes”: [
{
“format”: “s”,
“logBase”: 1,
“show”: true
},
{
“format”: “short”,
“logBase”: 1,
“show”: true
}
],
“yaxis”: {
“align”: false
}
},
{
“datasource”: {
“type”: “prometheus”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“decimals”: 0,
“mappings”: [
{
“options”: {
“0”: {
“text”: “N/A”
},
“1”: {
“text”: “YES”
}
},
“type”: “value”
},
{
“options”: {
“match”: “null”,
“result”: {
“text”: “N/A”
}
},
“type”: “special”
}
],
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “#299c46”,
“value”: null
},
{
“color”: “rgba(237, 129, 40, 0.89)”,
“value”: 201
},
{
“color”: “#d44a3a”,
“value”: 399
}
]
},
“unit”: “none”
},
“overrides”:
},
“gridPos”: {
“h”: 2,
“w”: 4,
“x”: 0,
“y”: 11
},
“id”: 20,
“links”: ,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “none”,
“graphMode”: “none”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“reduceOptions”: {
“calcs”: [
“lastNotNull”
],
“fields”: “”,
“values”: false
},
“textMode”: “auto”
},
“pluginVersion”: “8.3.3”,
“repeatDirection”: “h”,
“targets”: [
{
“expr”: “probe_http_status_code{instance=~”$target"}",
“format”: “time_series”,
“interval”: “$interval”,
“intervalFactor”: 1,
“refId”: “A”
}
],
“title”: “HTTP Status Code”,
“type”: “stat”
},
{
“datasource”: {
“type”: “prometheus”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“mappings”: [
{
“options”: {
“match”: “null”,
“result”: {
“text”: “N/A”
}
},
“type”: “special”
}
],
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “green”,
“value”: null
},
{
“color”: “red”,
“value”: 80
}
]
},
“unit”: “none”
},
“overrides”:
},
“gridPos”: {
“h”: 2,
“w”: 4,
“x”: 0,
“y”: 13
},
“id”: 27,
“links”: ,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “none”,
“graphMode”: “none”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“reduceOptions”: {
“calcs”: [
“lastNotNull”
],
“fields”: “”,
“values”: false
},
“textMode”: “auto”
},
“pluginVersion”: “8.3.3”,
“targets”: [
{
“expr”: “probe_http_version{instance=~”$target"}",
“format”: “time_series”,
“intervalFactor”: 1,
“refId”: “A”
}
],
“title”: “HTTP Version”,
“type”: “stat”
},
{
“datasource”: {
“type”: “prometheus”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“mappings”: [
{
“options”: {
“0”: {
“text”: “NO”
},
“1”: {
“text”: “YES”
}
},
“type”: “value”
},
{
“options”: {
“match”: “null”,
“result”: {
“text”: “N/A”
}
},
“type”: “special”
}
],
“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”: 15
},
“id”: 18,
“links”: ,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “value”,
“graphMode”: “none”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“reduceOptions”: {
“calcs”: [
“lastNotNull”
],
“fields”: “”,
“values”: false
},
“textMode”: “auto”
},
“pluginVersion”: “8.3.3”,
“repeatDirection”: “v”,
“targets”: [
{
“expr”: “probe_http_ssl{instance=~”$target"}",
“format”: “time_series”,
“interval”: “$interval”,
“intervalFactor”: 1,
“refId”: “A”
}
],
“title”: “SSL”,
“type”: “stat”
},
{
“datasource”: {
“type”: “prometheus”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“decimals”: 2,
“mappings”: [
{
“options”: {
“0”: {
“text”: “NO”
},
“1”: {
“text”: “YES”
}
},
“type”: “value”
},
{
“options”: {
“match”: “null”,
“result”: {
“text”: “N/A”
}
},
“type”: “special”
}
],
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “#d44a3a”,
“value”: null
},
{
“color”: “rgba(237, 129, 40, 0.89)”,
“value”: 0
},
{
“color”: “#299c46”,
“value”: 1209600
}
]
},
“unit”: “dtdurations”
},
“overrides”:
},
“gridPos”: {
“h”: 2,
“w”: 10,
“x”: 4,
“y”: 15
},
“id”: 19,
“links”: ,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “value”,
“graphMode”: “none”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“reduceOptions”: {
“calcs”: [
“lastNotNull”
],
“fields”: “”,
“values”: false
},
“textMode”: “auto”
},
“pluginVersion”: “8.3.3”,
“repeatDirection”: “h”,
“targets”: [
{
“expr”: “probe_ssl_earliest_cert_expiry{instance=~”$target"} - time()",
“format”: “time_series”,
“interval”: “$interval”,
“intervalFactor”: 1,
“refId”: “A”
}
],
“title”: “SSL Expiry”,
“type”: “stat”
},
{
“datasource”: {
“type”: “prometheus”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“mappings”: [
{
“options”: {
“match”: “null”,
“result”: {
“text”: “N/A”
}
},
“type”: “special”
}
],
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “green”,
“value”: null
},
{
“color”: “red”,
“value”: 80
}
]
},
“unit”: “s”
},
“overrides”:
},
“gridPos”: {
“h”: 2,
“w”: 5,
“x”: 14,
“y”: 15
},
“id”: 23,
“links”: ,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “none”,
“graphMode”: “none”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“reduceOptions”: {
“calcs”: [
“lastNotNull”
],
“fields”: “”,
“values”: false
},
“textMode”: “auto”
},
“pluginVersion”: “8.3.3”,
“targets”: [
{
“expr”: “avg(probe_duration_seconds{instance=~”$target"})",
“format”: “time_series”,
“interval”: “$interval”,
“intervalFactor”: 1,
“refId”: “A”
}
],
“title”: “Average Probe Duration”,
“type”: “stat”
},
{
“datasource”: {
“type”: “prometheus”
},
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“mappings”: [
{
“options”: {
“match”: “null”,
“result”: {
“text”: “N/A”
}
},
“type”: “special”
}
],
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “green”,
“value”: null
},
{
“color”: “red”,
“value”: 80
}
]
},
“unit”: “s”
},
“overrides”:
},
“gridPos”: {
“h”: 2,
“w”: 5,
“x”: 19,
“y”: 15
},
“id”: 24,
“links”: ,
“maxDataPoints”: 100,
“options”: {
“colorMode”: “none”,
“graphMode”: “none”,
“justifyMode”: “auto”,
“orientation”: “horizontal”,
“reduceOptions”: {
“calcs”: [
“lastNotNull”
],
“fields”: “”,
“values”: false
},
“textMode”: “auto”
},
“pluginVersion”: “8.3.3”,
“repeatDirection”: “h”,
“targets”: [
{
“expr”: “avg(probe_dns_lookup_time_seconds{instance=~”$target"})",
“format”: “time_series”,
“interval”: “$interval”,
“intervalFactor”: 1,
“refId”: “A”
}
],
“title”: “Average DNS Lookup”,
“type”: “stat”
}
],
“refresh”: “10s”,
“schemaVersion”: 34,
“style”: “dark”,
“tags”: [
“blackbox”,
“prometheus”
],
“templating”: {
“list”: [
{
“auto”: true,
“auto_count”: 10,
“auto_min”: “10s”,
“current”: {
“selected”: false,
“text”: “1m”,
“value”: “1m”
},
“hide”: 0,
“label”: “Interval”,
“name”: “interval”,
“options”: [
{
“selected”: false,
“text”: “auto”,
“value”: “$__auto_interval_interval”
},
{
“selected”: false,
“text”: “5s”,
“value”: “5s”
},
{
“selected”: false,
“text”: “10s”,
“value”: “10s”
},
{
“selected”: false,
“text”: “30s”,
“value”: “30s”
},
{
“selected”: true,
“text”: “1m”,
“value”: “1m”
},
{
“selected”: false,
“text”: “10m”,
“value”: “10m”
},
{
“selected”: false,
“text”: “30m”,
“value”: “30m”
},
{
“selected”: false,
“text”: “1h”,
“value”: “1h”
},
{
“selected”: false,
“text”: “6h”,
“value”: “6h”
},
{
“selected”: false,
“text”: “12h”,
“value”: “12h”
},
{
“selected”: false,
“text”: “1d”,
“value”: “1d”
},
{
“selected”: false,
“text”: “7d”,
“value”: “7d”
},
{
“selected”: false,
“text”: “14d”,
“value”: “14d”
},
{
“selected”: false,
“text”: “30d”,
“value”: “30d”
}
],
“query”: “5s,10s,30s,1m,10m,30m,1h,6h,12h,1d,7d,14d,30d”,
“queryValue”: “”,
“refresh”: 2,
“skipUrlSync”: false,
“type”: “interval”
},
{
“current”: {
“selected”: true,
“text”: [
“All”
],
“value”: [
“$__all”
]
},
“datasource”: {
“type”: “prometheus”
},
“definition”: “”,
“hide”: 0,
“includeAll”: true,
“multi”: true,
“name”: “target”,
“options”: ,
“query”: {
“query”: “label_values(probe_success, instance)”,
“refId”: “Prometheus-target-Variable-Query”
},
“refresh”: 1,
“regex”: “”,
“skipUrlSync”: false,
“sort”: 0,
“tagValuesQuery”: “”,
“tagsQuery”: “”,
“type”: “query”,
“useTags”: false
}
]
},
“time”: {
“from”: “now-1h”,
“to”: “now”
},
“timepicker”: {
“refresh_intervals”: [
“5s”,
“10s”,
“30s”,
“1m”,
“5m”,
“15m”,
“30m”,
“1h”,
“2h”,
“1d”
],
“time_options”: [
“5m”,
“15m”,
“1h”,
“6h”,
“12h”,
“24h”,
“2d”,
“7d”,
“30d”
]
},
“timezone”: “”,
“title”: “Prometheus Blackbox Exporter”,
“uid”: “xtkCtBkiz”,
“version”: 1,
“weekStart”: “”
} -
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
No -
Did you follow any online instructions? If so, what is the URL?
Monitoring Websites using Grafana and Prometheus. | by Chandramohan Jagtap | Geek Culture | Medium