Skip to content

Instantly share code, notes, and snippets.

@Hualin-AUG
Created January 25, 2021 16:41
Show Gist options
  • Save Hualin-AUG/95c7e6b865a974f68f52e08ef2a6e5a3 to your computer and use it in GitHub Desktop.
Save Hualin-AUG/95c7e6b865a974f68f52e08ef2a6e5a3 to your computer and use it in GitHub Desktop.
Grafana World Map Freeze
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 12,
"links": [],
"panels": [
{
"datasource": "InfluxDB-Cloud-InfluxQL",
"fieldConfig": {
"defaults": {
"custom": {},
"mappings": [
{
"from": "",
"id": 1,
"text": "",
"to": "",
"type": 1
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "AQI"
},
"properties": [
{
"id": "min",
"value": 0
},
{
"id": "max",
"value": 500
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#6ED0E0",
"value": 100
},
{
"color": "#EAB839",
"value": 200
},
{
"color": "#EF843C",
"value": 300
},
{
"color": "#E24D42",
"value": 400
},
{
"color": "red",
"value": 500
}
]
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "CO"
},
"properties": [
{
"id": "min",
"value": 0
},
{
"id": "max",
"value": 4000
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#6ED0E0",
"value": 350
},
{
"color": "#EAB839",
"value": 1000
},
{
"color": "#EF843C",
"value": 2000
},
{
"color": "#E24D42",
"value": 3000
},
{
"color": "red",
"value": 4000
}
]
}
},
{
"id": "mappings",
"value": [
{
"from": "-100",
"id": 1,
"text": "Low",
"to": "50",
"type": 2
}
]
}
]
},
{
"matcher": {
"id": "byName",
"options": "Humidity"
},
"properties": [
{
"id": "min",
"value": 0
},
{
"id": "max",
"value": 100
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "super-light-blue",
"value": null
},
{
"color": "light-blue",
"value": 25
},
{
"color": "blue",
"value": 50
},
{
"color": "semi-dark-blue",
"value": 75
},
{
"color": "dark-blue",
"value": 100
}
]
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "NO"
},
"properties": [
{
"id": "min",
"value": 0
},
{
"id": "max",
"value": 120
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#6ED0E0",
"value": 20
},
{
"color": "#EAB839",
"value": 50
},
{
"color": "#EF843C",
"value": 80
},
{
"color": "#E24D42",
"value": 100
},
{
"color": "red",
"value": 120
}
]
}
},
{
"id": "mappings",
"value": [
{
"from": "-100",
"id": 1,
"text": "Low",
"to": "5",
"type": 2
}
]
}
]
},
{
"matcher": {
"id": "byName",
"options": "NO2"
},
"properties": [
{
"id": "min",
"value": 0
},
{
"id": "max",
"value": 240
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#6ED0E0",
"value": 50
},
{
"color": "#EAB839",
"value": 100
},
{
"color": "#EF843C",
"value": 160
},
{
"color": "#E24D42",
"value": 200
},
{
"color": "red",
"value": 240
}
]
}
},
{
"id": "mappings",
"value": [
{
"from": "-100",
"id": 1,
"text": "Low",
"to": "5",
"type": 2,
"value": ""
}
]
}
]
},
{
"matcher": {
"id": "byName",
"options": "O3"
},
"properties": [
{
"id": "min",
"value": 0
},
{
"id": "max",
"value": 240
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#6ED0E0",
"value": 20
},
{
"color": "#EAB839",
"value": 50
},
{
"color": "#EF843C",
"value": 100
},
{
"color": "#E24D42",
"value": 200
},
{
"color": "red",
"value": 240
}
]
}
},
{
"id": "mappings",
"value": [
{
"from": "-100",
"id": 1,
"text": "Low",
"to": "10",
"type": 2
}
]
}
]
},
{
"matcher": {
"id": "byName",
"options": "SO2"
},
"properties": [
{
"id": "min",
"value": 0
},
{
"id": "max",
"value": 120
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#6ED0E0",
"value": 20
},
{
"color": "#EAB839",
"value": 50
},
{
"color": "#EF843C",
"value": 90
},
{
"color": "#E24D42",
"value": 100
},
{
"color": "red",
"value": 120
}
]
}
},
{
"id": "mappings",
"value": [
{
"from": "-100",
"id": 1,
"text": "Low",
"to": "5",
"type": 2
}
]
}
]
},
{
"matcher": {
"id": "byName",
"options": "PM1"
},
"properties": [
{
"id": "min",
"value": 0
},
{
"id": "max",
"value": 120
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#6ED0E0",
"value": 10
},
{
"color": "#EAB839",
"value": 25
},
{
"color": "#EF843C",
"value": 60
},
{
"color": "#E24D42",
"value": 80
},
{
"color": "red",
"value": 120
}
]
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "PM10"
},
"properties": [
{
"id": "min",
"value": 0
},
{
"id": "max",
"value": 140
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#6ED0E0",
"value": 10
},
{
"color": "#EAB839",
"value": 50
},
{
"color": "#EF843C",
"value": 100
},
{
"color": "#E24D42",
"value": 120
},
{
"color": "red",
"value": 140
}
]
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "PM2.5"
},
"properties": [
{
"id": "min",
"value": 0
},
{
"id": "max",
"value": 120
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "#6ED0E0",
"value": 10
},
{
"color": "#EAB839",
"value": 25
},
{
"color": "#EF843C",
"value": 60
},
{
"color": "#E24D42",
"value": 80
},
{
"color": "red",
"value": 120
}
]
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Temperature"
},
"properties": [
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "dark-blue",
"value": null
},
{
"color": "super-light-blue",
"value": 0
},
{
"color": "#6ED0E0",
"value": 10
},
{
"color": "#EAB839",
"value": 25
},
{
"color": "red",
"value": 50
},
{
"color": "dark-red",
"value": 60
}
]
}
},
{
"id": "min",
"value": -25
},
{
"id": "max",
"value": 60
}
]
},
{
"matcher": {
"id": "byName",
"options": "Pressure"
},
"properties": [
{
"id": "min",
"value": 900
},
{
"id": "max",
"value": 1200
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "super-light-blue",
"value": null
},
{
"color": "light-blue",
"value": 950
},
{
"color": "semi-dark-blue",
"value": 1000
},
{
"color": "dark-blue",
"value": 1050
},
{
"color": "rgb(14, 10, 196)",
"value": 1100
}
]
}
}
]
}
]
},
"gridPos": {
"h": 23,
"w": 12,
"x": 0,
"y": 0
},
"id": 2,
"options": {
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "7.3.5",
"targets": [
{
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "Test",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT last(\"AQI\") AS \"AQI\", last(\"CO\") AS \"CO\", last(\"Humidity\") AS \"Humidity\", last(\"NO\") AS \"NO\", last(\"NO2\") AS \"NO2\", last(\"O3\") AS \"O3\", last(\"PM1\") AS \"PM1\", last(\"PM10\") AS \"PM10\", last(\"PM2_5\") AS \"PM2.5\", last(\"Pressure\") AS \"Pressure\", last(\"SO2\") AS \"SO2\", last(\"Temperature\") AS \"Temperature\" FROM \"Test\" WHERE $timeFilter ",
"rawQuery": true,
"refId": "A",
"resultFormat": "table",
"select": [
[
{
"params": [
"AQI"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
],
[
{
"params": [
"CO"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
],
[
{
"params": [
"Humidity"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
],
[
{
"params": [
"NO"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
],
[
{
"params": [
"NO2"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
],
[
{
"params": [
"O3"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
],
[
{
"params": [
"PM1"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
],
[
{
"params": [
"PM10"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
],
[
{
"params": [
"PM2_5"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
],
[
{
"params": [
"Pressure"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
],
[
{
"params": [
"SO2"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
],
[
{
"params": [
"Temperature"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": []
}
],
"timeFrom": null,
"timeShift": null,
"title": "Panel Title",
"type": "gauge"
},
{
"circleMaxSize": "10",
"circleMinSize": "10",
"colors": [
"#73BF69",
"#5794F2",
"#FADE2A",
"#FF9830",
"#B877D9",
"#F2495C"
],
"datasource": "InfluxDB-Cloud-InfluxQL",
"decimals": 0,
"esMetric": "Count",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 23,
"w": 12,
"x": 12,
"y": 0
},
"hideEmpty": false,
"hideZero": false,
"id": 4,
"initialZoom": "9",
"locationData": "table",
"mapCenter": "custom",
"mapCenterLatitude": "44",
"mapCenterLongitude": "-79",
"maxDataPoints": 1,
"mouseWheelZoom": true,
"pluginVersion": "7.2.2",
"showLegend": true,
"stickyLabels": true,
"tableQueryOptions": {
"geohashField": "geohash",
"labelField": "DeviceID",
"latitudeField": "Latitude",
"longitudeField": "Longitude",
"metricField": "AQI",
"queryType": "coordinates"
},
"targets": [
{
"groupBy": [
{
"params": [
"1h"
],
"type": "time"
},
{
"params": [
"none"
],
"type": "fill"
}
],
"measurement": "Test",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT last(\"AQI\") AS \"AQI\",\"Latitude\",\"Longitude\" FROM \"Test\" WHERE (\"DeviceID\" = 'AirSENCE-1120676240063') AND $timeFilter GROUP BY \"DeviceID\"",
"rawQuery": true,
"refId": "A",
"resultFormat": "table",
"select": [
[
{
"params": [
"AQI"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "DeviceID",
"operator": "=",
"value": "AirSENCE-1120676240063"
}
]
}
],
"thresholds": "100,200,300,400,500",
"timeFrom": null,
"timeShift": null,
"title": "Panel Title",
"type": "grafana-worldmap-panel",
"unitPlural": "",
"unitSingle": "",
"valueName": "avg"
}
],
"schemaVersion": 26,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "AirSENCE_Grafana_Demo",
"uid": "MDs6SWAGk",
"version": 4
}
Test,DeviceID=AirSENCE-1120676240063 AQI=207i, 1611592520000000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment