diff options
Diffstat (limited to 'modules/services/blocky')
| -rw-r--r-- | modules/services/blocky/default.nix | 122 | ||||
| -rw-r--r-- | modules/services/blocky/grafana_blocky_rev3.json | 1959 |
2 files changed, 2081 insertions, 0 deletions
diff --git a/modules/services/blocky/default.nix b/modules/services/blocky/default.nix new file mode 100644 index 0000000..20fdefd --- /dev/null +++ b/modules/services/blocky/default.nix @@ -0,0 +1,122 @@ +{ config, lib, ... }: + +with lib; +let + cfg = config.modules.services.blocky; +in +{ + options.modules.services.blocky = { + enable = mkEnableOption ""; + }; + + config = mkIf cfg.enable { + services.blocky = { + enable = true; + settings = { + ports = { + dns = "127.0.0.1:53,[::1]:53,100.93.1.1:53"; + http = "127.0.0.1:4000"; + }; + + upstream.default = [ + "https://dns.quad9.net/dns-query" + "https://one.one.one.one/dns-query" + ]; + upstreamTimeout = "10s"; + + # For initially solving DoH/DoT Requests when no system Resolver is available + bootstrapDns = { + upstream = "https://dns.quad9.net/dns-query"; + ips = [ "9.9.9.9" "149.112.112.112" ]; + }; + + customDNS.mapping = { + "metrics.internal" = "100.93.1.1"; # kanata + }; + + caching = { + minTime = "0m"; + maxTime = "12h"; + cacheTimeNegative = "1m"; + prefetching = true; + }; + + prometheus.enable = true; + queryLog.type = "console"; + conditional = { + fallbackUpstream = true; + }; + + blocking = { + blackLists = { + ads = [ + "https://raw.githubusercontent.com/blocklistproject/Lists/master/ads.txt" + "https://raw.githubusercontent.com/blocklistproject/Lists/master/phishing.txt" + "https://raw.githubusercontent.com/blocklistproject/Lists/master/tracking.txt" + ]; + }; + + clientGroupsBlock = { + default = [ "ads" ]; + }; + }; + }; + }; + + services.prometheus = { + enable = true; + listenAddress = "127.0.0.1"; + port = 9000; + globalConfig.scrape_interval = "15s"; + globalConfig.evaluation_interval = "15s"; + scrapeConfigs = [{ + job_name = "blocky"; + static_configs = [{ targets = [ "127.0.0.1:4000" ]; }]; + }]; + }; + + services.grafana = { + enable = true; + settings = { + analytics.reporting_enabled = false; + server = { + domain = "100.93.1.1:3000"; + http_addr = "100.93.1.1"; + enable_gzip = true; + }; + # Required for blocky panel + panels.disable_sanitize_html = true; + }; + provision = { + enable = true; + datasources.settings = { + datasources = [{ + name = "Prometheus"; + type = "prometheus"; + access = "proxy"; + orgId = 1; + uid = "5Z0Y8D3GXAMDODSF"; + url = "http://127.0.0.1:9000"; + isDefault = true; + jsonData = { + graphiteVersion = "1.1"; + tlsAuth = false; + tlsAuthWithCACert = false; + }; + version = 1; + editable = true; + }]; + }; + dashboards.settings = { + providers = [{ name = "My Dashboards"; options.path = "/etc/grafana-dashboards"; }]; + }; + }; + }; + + environment.etc."grafana-dashboards/blocky_rev3.json" = { + source = ./grafana_blocky_rev3.json; + group = "grafana"; + user = "grafana"; + }; + }; +} diff --git a/modules/services/blocky/grafana_blocky_rev3.json b/modules/services/blocky/grafana_blocky_rev3.json new file mode 100644 index 0000000..e4e837c --- /dev/null +++ b/modules/services/blocky/grafana_blocky_rev3.json @@ -0,0 +1,1959 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + }, + { + "name": "VAR_BLOCKY_URL", + "type": "constant", + "label": "blocky API URL", + "value": "", + "description": "" + } + ], + "__elements": [], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.3.3" + }, + { + "type": "panel", + "id": "heatmap", + "name": "Heatmap", + "version": "" + }, + { + "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": [ + { + "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" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "iteration": 1641070862290, + "links": [ + { + "icon": "external link", + "tags": [], + "title": "blocky @ GitHub", + "tooltip": "open GitHub repo", + "type": "link", + "url": "https://github.com/0xERR0R/blocky" + } + ], + "liveNow": false, + "panels": [ + { + "description": "current service state", + "fieldConfig": { + "defaults": { + "mappings": [ + { + "options": { + "0": { + "text": "down" + }, + "1": { + "text": "up" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 1 + }, + { + "color": "#299c46", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "id": 26, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5Z0Y8D3GXAMDODSF" + }, + "exemplar": false, + "expr": "sum(up{job=\"blocky\"})", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "State", + "transparent": true, + "type": "stat" + }, + { + "description": "Is blocking enabled?", + "fieldConfig": { + "defaults": { + "mappings": [ + { + "options": { + "0": { + "text": "off" + }, + "1": { + "text": "on" + } + }, + "type": "value" + } + ], + "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": 3, + "w": 6, + "x": 6, + "y": 0 + }, + "id": 43, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5Z0Y8D3GXAMDODSF" + }, + "exemplar": false, + "expr": "blocky_blocking_enabled", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Blocking", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "5Z0Y8D3GXAMDODSF" + }, + "description": "Enable Ad disable blocking", + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 42, + "options": { + "content": "<style>\n\n.blocky_btn {\n border: none;\n cursor: pointer; \n padding: 12px;\n font-size: 16px;\n min-width: 100px\n}\n\n.blocky_greenbtn { \n background-color: #4CAF50;\n color: white;\n}\n\n.blocky_redbtn { \n background-color: #AF504C;\n color: white;\n}\n\n\n.blocky_alert {\n font-size: 14px\n}\n</style>\n<div class=\"blocky_alert blocky_alert-warning fade in\">\n <a href=\"#\" class=\"close\" data-dismiss=\"blocky_alert\" aria-label=\"close\" style=\"text-decoration:none\">×</a>Done!\n</div>\n<div>\n <button class=\"blocky_btn blocky_greenbtn\" onclick=\"blocky_status_enable()\">On</button>\n <button class=\"blocky_btn blocky_redbtn\" onclick=\"blocky_status_disable5m()\">Off 5m</button>\n <button class=\"blocky_btn blocky_redbtn\" onclick=\"blocky_status_disable30m()\">Off 30m</button>\n<div>\n\n\n<script type=\"text/javascript\">\n\nfunction blocky_status_disable() {\n blocky_status_switch(false, 0)\n}\n\nfunction blocky_status_disable5m() {\n blocky_status_switch(false, 5*60)\n}\n\nfunction blocky_status_disable30m() {\n blocky_status_switch(false, 30*60)\n}\n\nfunction blocky_status_enable() {\n blocky_status_switch(true, 0)\n}\n\nfunction blocky_status_switch(enable, duration) {\n var url = '$blocky_url';\n op = enable ? 'enable' : 'disable?duration='+duration+\"s\"\n $.get(url + '/api/blocking/'+op, function(data) {\n showAlert()\n })\n .fail(function() {\n alert( \"error\" );\n })\n}\n\nvar showAlert = function() {\n\t// first show the alert\n $('.blocky_alert').show().fadeTo(500, 1);\n \n // Now set a timeout to hide it\n window.setTimeout(function() {\n $(\".blocky_alert\").fadeTo(500, 0).slideUp(500, function() {\n $(this).hide();\n });\n }, 3000);\n}\n\n// start with the alert hidden\n$('.blocky_alert').hide();\n\n</script>", + "mode": "html" + }, + "pluginVersion": "8.3.3", + "title": "Blocking status", + "transparent": true, + "type": "text" + }, + { + "description": "Blocky [version](https://github.com/0xERR0R/blocky) number", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 3 + }, + "id": 55, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^version$/", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.3", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5Z0Y8D3GXAMDODSF" + }, + "exemplar": false, + "expr": "blocky_build_info ", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Version", + "transformations": [ + { + "id": "labelsToFields", + "options": {} + }, + { + "id": "merge", + "options": {} + } + ], + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "5Z0Y8D3GXAMDODSF" + }, + "description": "Average query response time for all query types", + "fieldConfig": { + "defaults": { + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 3 + }, + "id": 24, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5Z0Y8D3GXAMDODSF" + }, + "exemplar": true, + "expr": "sum(increase(blocky_request_duration_ms_sum[$__range])) / sum(increase(blocky_request_duration_ms_count[$__range]))", + "format": "table", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Avg response time", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "5Z0Y8D3GXAMDODSF" + }, + "description": "Number of blacklist entries", + "fieldConfig": { + "defaults": { + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 5 + }, + "id": 30, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5Z0Y8D3GXAMDODSF" + }, + "exemplar": true, + "expr": "sum(blocky_blacklist_cache) / sum(up{job=\"blocky\"})", + "format": "table", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Blacklist entries total", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "5Z0Y8D3GXAMDODSF" + }, + "fieldConfig": { + "defaults": { + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 5 + }, + "id": 28, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5Z0Y8D3GXAMDODSF" + }, + "exemplar": true, + "expr": "sum(go_memstats_sys_bytes{job=\"blocky\"})/sum(up{job=\"blocky\"})", + "format": "table", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Memory allocated", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "5Z0Y8D3GXAMDODSF" + }, + "description": "Percentage of blocked queries", + "fieldConfig": { + "defaults": { + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 6 + }, + "id": 34, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5Z0Y8D3GXAMDODSF" + }, + "exemplar": true, + "expr": "sum(increase(blocky_response_total{response_type=\"BLOCKED\"}[$__range])) / sum(increase(blocky_query_total[$__range])) ", + "format": "table", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Queries blocked", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "5Z0Y8D3GXAMDODSF" + }, + "description": "Number of all queries. Shows the last value", + "fieldConfig": { + "defaults": { + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 6 + }, + "hideTimeOverride": true, + "id": 4, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5Z0Y8D3GXAMDODSF" + }, + "exemplar": true, + "expr": "ceil(sum(increase(blocky_query_total[$__range]))) ", + "format": "table", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Query Count Total", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "5Z0Y8D3GXAMDODSF" + }, + "description": "Number of entries in the cache. Shows the last value", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 8 + }, + "id": 45, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5Z0Y8D3GXAMDODSF" + }, + "exemplar": true, + "expr": "sum(blocky_cache_entry_count)/ sum(up{job=\"blocky\"})", + "format": "table", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Cache entries count", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "5Z0Y8D3GXAMDODSF" + }, + "description": "Cache Hit/Miss ratio. 100 % means, all queries could be answered from the cache, 0% - all queries must be resolved via external DNS", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 8 + }, + "id": 47, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5Z0Y8D3GXAMDODSF" + }, + "exemplar": true, + "expr": "sum(increase(blocky_cache_hit_count[$__range])) / (sum(increase(blocky_cache_hit_count[$__range])) + sum(increase(blocky_cache_miss_count[$__range])))", + "format": "table", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Cache Hit/Miss ratio", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "5Z0Y8D3GXAMDODSF" + }, + "description": "Number of occured errors", + "fieldConfig": { + "defaults": { + "decimals": 0, + "mappings": [ + { + "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": 1 + }, + { + "color": "#d44a3a" + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 9 + }, + "id": 36, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5Z0Y8D3GXAMDODSF" + }, + "exemplar": true, + "expr": "sum(increase(blocky_error_total[$__range]))", + "format": "table", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Error count", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "5Z0Y8D3GXAMDODSF" + }, + "description": "Amount of performed DNS queries to prefetch cached queries", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 9 + }, + "id": 53, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5Z0Y8D3GXAMDODSF" + }, + "exemplar": true, + "expr": "ceil(sum(increase(blocky_prefetch_count[$__range])))", + "format": "table", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Prefetch count", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "5Z0Y8D3GXAMDODSF" + }, + "description": "Amount of prefetch queries per minute", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 11 + }, + "id": 51, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5Z0Y8D3GXAMDODSF" + }, + "exemplar": true, + "expr": "sum(rate(blocky_prefetch_count[5m])) * 60", + "format": "table", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Prefetch rate per min", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "5Z0Y8D3GXAMDODSF" + }, + "description": "How many of cached entries were prefetched automatically", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 11 + }, + "id": 58, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { |
