Last active
March 18, 2020 13:12
-
-
Save shift/2eec20b72b5e24717c7c5d5741d4b5b2 to your computer and use it in GitHub Desktop.
Prometheus CORVID-19 Berlin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: coronavirus_berlin_deaths | |
type: object | |
path: $.features[*] | |
labels: | |
district: $.attributes.GEN | |
values: | |
count: $.attributes.Death | |
- name: coronavirus_berlin_cases | |
type: object | |
path: $.features[*] | |
labels: | |
district: $.attributes.GEN | |
values: | |
count: $.attributes.Fallzahlen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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": 40, | |
"links": [], | |
"panels": [ | |
{ | |
"datasource": null, | |
"gridPos": { | |
"h": 4, | |
"w": 12, | |
"x": 0, | |
"y": 0 | |
}, | |
"id": 9, | |
"options": { | |
"colorMode": "value", | |
"fieldOptions": { | |
"calcs": [ | |
"mean" | |
], | |
"defaults": { | |
"mappings": [], | |
"thresholds": { | |
"mode": "absolute", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
}, | |
{ | |
"color": "red", | |
"value": 80 | |
} | |
] | |
} | |
}, | |
"overrides": [], | |
"values": false | |
}, | |
"graphMode": "area", | |
"justifyMode": "auto", | |
"orientation": "auto" | |
}, | |
"pluginVersion": "6.6.0", | |
"targets": [ | |
{ | |
"expr": "coronavirus_berlin_cases_count{german_district=\"Berlin Friedrichshain-Kreuzberg\"}", | |
"format": "table", | |
"refId": "A" | |
} | |
], | |
"timeFrom": null, | |
"timeShift": null, | |
"title": "Cases in Friedrichshain-Kreuzberg", | |
"type": "stat" | |
}, | |
{ | |
"datasource": null, | |
"gridPos": { | |
"h": 4, | |
"w": 12, | |
"x": 12, | |
"y": 0 | |
}, | |
"id": 10, | |
"options": { | |
"colorMode": "value", | |
"fieldOptions": { | |
"calcs": [ | |
"mean" | |
], | |
"defaults": { | |
"mappings": [], | |
"thresholds": { | |
"mode": "absolute", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
}, | |
{ | |
"color": "red", | |
"value": 80 | |
} | |
] | |
} | |
}, | |
"overrides": [], | |
"values": false | |
}, | |
"graphMode": "area", | |
"justifyMode": "auto", | |
"orientation": "auto" | |
}, | |
"pluginVersion": "6.6.0", | |
"targets": [ | |
{ | |
"expr": "coronavirus_berlin_deaths_count{german_district=\"Berlin Friedrichshain-Kreuzberg\"}", | |
"format": "table", | |
"refId": "A" | |
} | |
], | |
"timeFrom": null, | |
"timeShift": null, | |
"title": "Deaths in Friedrichshain-Kreuzberg", | |
"type": "stat" | |
}, | |
{ | |
"aliasColors": {}, | |
"bars": false, | |
"dashLength": 10, | |
"dashes": false, | |
"datasource": "VictoriaMetrics", | |
"decimals": 0, | |
"fill": 1, | |
"fillGradient": 0, | |
"gridPos": { | |
"h": 14, | |
"w": 24, | |
"x": 0, | |
"y": 4 | |
}, | |
"hiddenSeries": false, | |
"id": 7, | |
"legend": { | |
"alignAsTable": true, | |
"avg": false, | |
"current": true, | |
"max": false, | |
"min": false, | |
"rightSide": true, | |
"show": true, | |
"sort": "current", | |
"sortDesc": true, | |
"total": false, | |
"values": true | |
}, | |
"lines": true, | |
"linewidth": 1, | |
"nullPointMode": "null", | |
"options": { | |
"dataLinks": [] | |
}, | |
"percentage": false, | |
"pointradius": 2, | |
"points": false, | |
"renderer": "flot", | |
"seriesOverrides": [], | |
"spaceLength": 10, | |
"stack": true, | |
"steppedLine": false, | |
"targets": [ | |
{ | |
"expr": "sum(coronavirus_berlin_cases_count) by (german_district)", | |
"legendFormat": "{{german_district}}", | |
"refId": "A" | |
} | |
], | |
"thresholds": [], | |
"timeFrom": null, | |
"timeRegions": [], | |
"timeShift": null, | |
"title": "CORVID-19 Cases in Berlin by district", | |
"tooltip": { | |
"shared": true, | |
"sort": 0, | |
"value_type": "individual" | |
}, | |
"type": "graph", | |
"xaxis": { | |
"buckets": null, | |
"mode": "time", | |
"name": null, | |
"show": true, | |
"values": [] | |
}, | |
"yaxes": [ | |
{ | |
"decimals": 0, | |
"format": "people", | |
"label": "", | |
"logBase": 1, | |
"max": null, | |
"min": null, | |
"show": true | |
}, | |
{ | |
"decimals": null, | |
"format": "short", | |
"label": "", | |
"logBase": 1, | |
"max": null, | |
"min": null, | |
"show": true | |
} | |
], | |
"yaxis": { | |
"align": false, | |
"alignLevel": null | |
} | |
}, | |
{ | |
"cacheTimeout": null, | |
"datasource": null, | |
"gridPos": { | |
"h": 12, | |
"w": 12, | |
"x": 0, | |
"y": 18 | |
}, | |
"id": 4, | |
"interval": "", | |
"links": [], | |
"options": { | |
"colorMode": "value", | |
"fieldOptions": { | |
"calcs": [ | |
"mean" | |
], | |
"defaults": { | |
"links": [], | |
"mappings": [], | |
"thresholds": { | |
"mode": "absolute", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
}, | |
{ | |
"color": "#EAB839", | |
"value": 50 | |
}, | |
{ | |
"color": "#6ED0E0", | |
"value": 75 | |
}, | |
{ | |
"color": "#EF843C", | |
"value": 87.5 | |
}, | |
{ | |
"color": "#E24D42", | |
"value": 93.75 | |
} | |
] | |
} | |
}, | |
"overrides": [], | |
"values": false | |
}, | |
"graphMode": "area", | |
"justifyMode": "auto", | |
"orientation": "auto" | |
}, | |
"pluginVersion": "6.6.0", | |
"targets": [ | |
{ | |
"expr": "sensor_unit_people{entity=~'sensor.germany_coronavirus_.*'}", | |
"instant": true, | |
"legendFormat": "{{ friendly_name }}", | |
"refId": "A" | |
} | |
], | |
"timeFrom": null, | |
"timeShift": null, | |
"title": "Germany", | |
"type": "stat" | |
}, | |
{ | |
"cacheTimeout": null, | |
"datasource": null, | |
"gridPos": { | |
"h": 12, | |
"w": 12, | |
"x": 12, | |
"y": 18 | |
}, | |
"id": 5, | |
"interval": "", | |
"links": [], | |
"options": { | |
"colorMode": "value", | |
"fieldOptions": { | |
"calcs": [ | |
"mean" | |
], | |
"defaults": { | |
"links": [], | |
"mappings": [], | |
"thresholds": { | |
"mode": "absolute", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
}, | |
{ | |
"color": "red", | |
"value": 80 | |
}, | |
{ | |
"color": "#EAB839", | |
"value": 90 | |
}, | |
{ | |
"color": "#EF843C", | |
"value": 97.5 | |
} | |
] | |
} | |
}, | |
"overrides": [], | |
"values": false | |
}, | |
"graphMode": "area", | |
"justifyMode": "auto", | |
"orientation": "auto" | |
}, | |
"pluginVersion": "6.6.0", | |
"targets": [ | |
{ | |
"expr": "sensor_unit_people{entity=~'sensor.worldwide_coronavirus_.*'}", | |
"instant": true, | |
"legendFormat": "{{ friendly_name }}", | |
"refId": "A" | |
} | |
], | |
"timeFrom": null, | |
"timeShift": null, | |
"title": "Worldwide", | |
"type": "stat" | |
}, | |
{ | |
"aliasColors": {}, | |
"bars": false, | |
"dashLength": 10, | |
"dashes": false, | |
"datasource": "VictoriaMetrics", | |
"fill": 1, | |
"fillGradient": 0, | |
"gridPos": { | |
"h": 16, | |
"w": 24, | |
"x": 0, | |
"y": 30 | |
}, | |
"hiddenSeries": false, | |
"id": 2, | |
"legend": { | |
"alignAsTable": true, | |
"avg": false, | |
"current": true, | |
"max": false, | |
"min": false, | |
"rightSide": true, | |
"show": true, | |
"total": false, | |
"values": true | |
}, | |
"lines": true, | |
"linewidth": 1, | |
"nullPointMode": "null", | |
"options": { | |
"dataLinks": [] | |
}, | |
"percentage": false, | |
"pointradius": 2, | |
"points": false, | |
"renderer": "flot", | |
"seriesOverrides": [], | |
"spaceLength": 10, | |
"stack": false, | |
"steppedLine": false, | |
"targets": [ | |
{ | |
"expr": "sensor_unit_people{entity=~'sensor.worldwide_coronavirus_.*'}", | |
"legendFormat": "{{ friendly_name }}", | |
"refId": "B" | |
}, | |
{ | |
"expr": "sensor_unit_people{entity=~'sensor.germany_coronavirus_.*'}", | |
"legendFormat": "{{ friendly_name }}", | |
"refId": "A" | |
} | |
], | |
"thresholds": [], | |
"timeFrom": null, | |
"timeRegions": [], | |
"timeShift": null, | |
"title": "Germany vs Worldwide", | |
"tooltip": { | |
"shared": true, | |
"sort": 2, | |
"value_type": "individual" | |
}, | |
"type": "graph", | |
"xaxis": { | |
"buckets": null, | |
"mode": "time", | |
"name": null, | |
"show": true, | |
"values": [] | |
}, | |
"yaxes": [ | |
{ | |
"format": "short", | |
"label": null, | |
"logBase": 1, | |
"max": null, | |
"min": null, | |
"show": true | |
}, | |
{ | |
"format": "short", | |
"label": null, | |
"logBase": 1, | |
"max": null, | |
"min": null, | |
"show": true | |
} | |
], | |
"yaxis": { | |
"align": false, | |
"alignLevel": null | |
} | |
} | |
], | |
"refresh": "1m", | |
"schemaVersion": 22, | |
"style": "dark", | |
"tags": [], | |
"templating": { | |
"list": [] | |
}, | |
"time": { | |
"from": "now-6h", | |
"to": "now" | |
}, | |
"timepicker": { | |
"refresh_intervals": [ | |
"5s", | |
"10s", | |
"30s", | |
"1m", | |
"5m", | |
"15m", | |
"30m", | |
"1h", | |
"2h", | |
"1d" | |
] | |
}, | |
"timezone": "", | |
"title": "Coronavirus", | |
"uid": "9NlA0xlWz", | |
"version": 10 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
coronavirus_berlin_cases_count{german_district="Barnim"} 4 | |
coronavirus_berlin_cases_count{german_district="Berlin Charlottenburg-Wilmersdorf"} 47 | |
coronavirus_berlin_cases_count{german_district="Berlin Friedrichshain-Kreuzberg"} 22 | |
coronavirus_berlin_cases_count{german_district="Berlin Lichtenberg"} 8 | |
coronavirus_berlin_cases_count{german_district="Berlin Marzahn-Hellersdorf"} 4 | |
coronavirus_berlin_cases_count{german_district="Berlin Mitte"} 29 | |
coronavirus_berlin_cases_count{german_district="Berlin Neukölln"} 16 | |
coronavirus_berlin_cases_count{german_district="Berlin Pankow"} 26 | |
coronavirus_berlin_cases_count{german_district="Berlin Reinickendorf"} 11 | |
coronavirus_berlin_cases_count{german_district="Berlin Spandau"} 9 | |
coronavirus_berlin_cases_count{german_district="Berlin Steglitz-Zehlendorf"} 20 | |
coronavirus_berlin_cases_count{german_district="Berlin Tempelhof-Schöneberg"} 17 | |
coronavirus_berlin_cases_count{german_district="Berlin Treptow-Köpenick"} 7 | |
coronavirus_berlin_cases_count{german_district="Dahme-Spreewald"} 2 | |
coronavirus_berlin_cases_count{german_district="Havelland"} 2 | |
coronavirus_berlin_cases_count{german_district="Märkisch-Oderland"} 5 | |
coronavirus_berlin_cases_count{german_district="Oberhavel"} 2 | |
coronavirus_berlin_cases_count{german_district="Oder-Spree"} 4 | |
coronavirus_berlin_cases_count{german_district="Potsdam"} 0 | |
coronavirus_berlin_cases_count{german_district="Potsdam-Mittelmark"} 3 | |
coronavirus_berlin_cases_count{german_district="Teltow-Fläming"} 1 | |
# HELP coronavirus_berlin_deaths_count coronavirus_berlin_deaths - count | |
# TYPE coronavirus_berlin_deaths_count gauge | |
coronavirus_berlin_deaths_count{german_district="Barnim"} 0 | |
coronavirus_berlin_deaths_count{german_district="Berlin Charlottenburg-Wilmersdorf"} 0 | |
coronavirus_berlin_deaths_count{german_district="Berlin Friedrichshain-Kreuzberg"} 0 | |
coronavirus_berlin_deaths_count{german_district="Berlin Lichtenberg"} 0 | |
coronavirus_berlin_deaths_count{german_district="Berlin Marzahn-Hellersdorf"} 0 | |
coronavirus_berlin_deaths_count{german_district="Berlin Mitte"} 0 | |
coronavirus_berlin_deaths_count{german_district="Berlin Neukölln"} 0 | |
coronavirus_berlin_deaths_count{german_district="Berlin Pankow"} 0 | |
coronavirus_berlin_deaths_count{german_district="Berlin Reinickendorf"} 0 | |
coronavirus_berlin_deaths_count{german_district="Berlin Spandau"} 0 | |
coronavirus_berlin_deaths_count{german_district="Berlin Steglitz-Zehlendorf"} 0 | |
coronavirus_berlin_deaths_count{german_district="Berlin Tempelhof-Schöneberg"} 0 | |
coronavirus_berlin_deaths_count{german_district="Berlin Treptow-Köpenick"} 0 | |
coronavirus_berlin_deaths_count{german_district="Dahme-Spreewald"} 0 | |
coronavirus_berlin_deaths_count{german_district="Havelland"} 0 | |
coronavirus_berlin_deaths_count{german_district="Märkisch-Oderland"} 0 | |
coronavirus_berlin_deaths_count{german_district="Oberhavel"} 0 | |
coronavirus_berlin_deaths_count{german_district="Oder-Spree"} 0 | |
coronavirus_berlin_deaths_count{german_district="Potsdam"} 0 | |
coronavirus_berlin_deaths_count{german_district="Potsdam-Mittelmark"} 0 | |
coronavirus_berlin_deaths_count{german_district="Teltow-Fläming"} 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using https://github.com/kawamuray/prometheus-json-exporter to gather metrics into Prometheus on the Cornavirus | |
./prometheus-json-exporter 'https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/Kreisgrenzen_2018_mit_Einwohnerzahl/FeatureServer/0/query?f=json&where=1%3D1&returnGeometry=false&spatialRel=esriSpatialRelIntersects&geometry=%7B%22xmin%22%3A1455241.8820138844%2C%22ymin%22%3A6825620.1563203875%2C%22xmax%22%3A1521589.2225654097%2C%22ymax%22%3A6955257.356292032%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%2C%22latestWkid%22%3A3857%7D%7D&geometryType=esriGeometryEnvelope&inSR=102100&outFields=*&orderByFields=Fallzahlen%20desc&outSR=102100&resultOffset=0&resultRecordCount=1000' config.yml |
Nice one
Grafana dashboard and minimal helm chart or compose yml are outside of the gist's scope and left as an exercise to the reader? ;-)
I can publish the json for my dashboard. But yeah not covering Prometheus and Grafana as I already have them deployed in the apartment.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
well done ⭐