From e7297bcc8d2fe107f1d4e7ab4dd9b0890ceb407e Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 2 Mar 2026 22:35:49 +0300 Subject: [PATCH] meta: provide sample grafana dashboard; basic promql docs Signed-off-by: NotAShelf Change-Id: Icb48454e2b0d37fea290c1681ccddcfe6a6a6964 --- contrib/grafana/README.md | 157 +++++ contrib/grafana/watchdog.json | 1192 +++++++++++++++++++++++++++++++++ 2 files changed, 1349 insertions(+) create mode 100644 contrib/grafana/README.md create mode 100644 contrib/grafana/watchdog.json diff --git a/contrib/grafana/README.md b/contrib/grafana/README.md new file mode 100644 index 0000000..f44c264 --- /dev/null +++ b/contrib/grafana/README.md @@ -0,0 +1,157 @@ +# Grafana Dashboard + +We provide a _sample_ Grafana dashboard for Watchdog, with complete support for +multi-host and multi-site deployments as much as possible. It should be noted, +however, that this is designed to be a _reference_ more than anything. Updates +cannot be provided, and it is recommended that you _write your own dashboard_ +while using this one as a reference. + +Nevertheless, here are some features provided by the sample dashboard at +`watchdog.json` that you may be interested in: + +- **Multi-Instance Support**: Filter and aggregate across multiple Watchdog + instances +- **Multi-Site Support**: Filter by domain for multi-site deployments +- **Real-time Metrics**: Auto-refresh every 30 seconds +- **Traffic Analysis**: Pageviews, unique visitors, device breakdown, geographic + distribution +- **Top Content**: Top pages, referrers, custom events +- **System Health**: Instance health, cardinality overflow monitoring, request + rates + +To import it, go to "Dashboards" on your Grafana instance then hit "Import". +Upload the JSON file, select your Prometheus data source (assuming you have a +scraper set up) and hit Import. + +## Dashboard Variables + +The dashboard includes three template variables for flexible filtering: + +### Data Source + +- **Variable**: `$datasource` +- **Type**: Data source selector +- **Default**: Prometheus +- **Usage**: Select which Prometheus instance to query + +### Instance + +- **Variable**: `$instance` +- **Type**: Multi-select query variable +- **Default**: All instances +- **Query**: `label_values(web_pageviews_total, instance)` +- **Usage**: Filter by specific Watchdog instances (e.g., `watchdog-1:8080`, + `watchdog-2:8080`) + +### Domain + +- **Variable**: `$domain` +- **Type**: Multi-select query variable +- **Default**: All domains +- **Query**: `label_values(web_pageviews_total{instance=~"$instance"}, domain)` +- **Usage**: Filter by specific domains for multi-site analytics + +**Example filters:** + +- View all sites across all instances: Instance=All, Domain=All +- View single site across all instances: Instance=All, Domain=example.com +- View single instance, all sites: Instance=watchdog-1:8080, Domain=All +- View single site on single instance: Instance=watchdog-1:8080, + Domain=example.com + +## Dashboard Sections + +### Overview Row + +- **Unique Visitors (Today)**: Current HyperLogLog estimate across selected + instances/domains +- **Pageviews/min**: Real-time pageview rate +- **Total Pageviews**: Total pageviews in selected time range +- **Cardinality Overflow/min**: Health indicator (should be ~0) +- **Pageviews by Domain**: Time series showing traffic per domain +- **Unique Visitors by Domain**: Time series showing unique visitors per domain + +### Traffic Analysis Row + +- **Device Breakdown**: Pie chart of mobile/tablet/desktop traffic +- **Top 10 Countries**: Geographic distribution of traffic +- **Top 20 Pages**: Most visited pages with heat map +- **Top 15 Referrers**: Traffic sources (excludes direct traffic) +- **Top 15 Custom Events**: Most triggered custom events + +### System Health Row + +- **Instance Health**: Uptime status for each Watchdog instance (1=up, 0=down) +- **Cardinality Overflow**: Rate of rejected metrics due to cardinality limits + (should be near zero) +- **Request Rate by Instance**: Request throughput per instance + +## Metrics Reference + +All metrics aggregated using `sum()` across selected instances: + +```promql +# Total unique visitors +sum(web_daily_unique_visitors{instance=~"$instance",domain=~"$domain"}) + +# Pageview rate +sum(rate(web_pageviews_total{instance=~"$instance",domain=~"$domain"}[$__rate_interval])) * 60 + +# Top pages +topk(20, sum(increase(web_pageviews_total{instance=~"$instance",domain=~"$domain"}[$__range])) by (path)) + +# Device breakdown +sum(increase(web_pageviews_total{instance=~"$instance",domain=~"$domain"}[$__range])) by (device) + +# Cardinality health +rate(web_path_overflow_total{instance=~"$instance"}[$__rate_interval]) * 60 +``` + +### Modify Time Range + +Default: Last 24 hours + +To change: + +1. Dashboard Settings -> Time Options +2. Set default time range +3. Save dashboard + +### Add Alerts + +Example alert for cardinality overflow: + +1. Edit "Cardinality Overflow" panel +2. Click **Alert** tab +3. Create alert rule: + - Condition: `WHEN max() OF query(A,5m,now) IS ABOVE 10` + - Message: "Cardinality limits are being hit - increase + max_paths/max_sources/max_custom_events" + +## Multi-Instance Aggregation + +When running multiple Watchdog instances, Prometheus automatically aggregates +metrics. You may use Prometheus' query language (Promql) to create some queries +to visualise data in various ways. Some examples would be: + +**Per-instance breakdown:** + +```promql +sum(rate(web_pageviews_total[$__rate_interval])) by (instance) +``` + +**Total across all instances:** + +```promql +sum(rate(web_pageviews_total[$__rate_interval])) +``` + +**Unique visitors (note: HLL counts don't sum directly):** + +```promql +# Approximate total - slight overcount due to HLL properties +sum(web_daily_unique_visitors) + +# Per-instance (accurate) +web_daily_unique_visitors +``` diff --git a/contrib/grafana/watchdog.json b/contrib/grafana/watchdog.json new file mode 100644 index 0000000..71c0fe5 --- /dev/null +++ b/contrib/grafana/watchdog.json @@ -0,0 +1,1192 @@ +{ + "apiVersion": "dashboard.grafana.app/v2beta1", + "kind": "Dashboard", + "metadata": { + "name": "watchdog-analytics", + "generation": 1, + "creationTimestamp": "2026-03-06T00:01:33Z", + "labels": {}, + "annotations": {} + }, + "spec": { + "annotations": [ + { + "kind": "AnnotationQuery", + "spec": { + "builtIn": true, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "query": { + "group": "grafana", + "kind": "DataQuery", + "spec": {}, + "version": "v0" + } + } + } + ], + "cursorSync": "Crosshair", + "editable": true, + "elements": { + "panel-1": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "sum(web_daily_unique_visitors{instance=~\"$instance\",domain=~\"$domain\"})" + }, + "version": "v0" + }, + "refId": "A" + } + } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "", + "id": 1, + "links": [], + "title": "Unique Visitors (Today)", + "vizConfig": { + "group": "stat", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + } + }, + "version": "12.3.3" + } + } + }, + "panel-10": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "topk(15, sum(increase(web_pageviews_total{instance=~\"$instance\",domain=~\"$domain\",referrer!=\"direct\"}[$__range])) by (referrer))", + "format": "table", + "instant": true + }, + "version": "v0" + }, + "refId": "A" + } + } + ], + "queryOptions": {}, + "transformations": [ + { + "kind": "organize", + "spec": { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": {}, + "renameByName": { + "referrer": "Referrer" + } + } + } + } + ] + } + }, + "description": "", + "id": 10, + "links": [], + "title": "Top 15 Referrers", + "vizConfig": { + "group": "table", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": {}, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [] + } + ] + }, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Pageviews" + } + ] + } + }, + "version": "12.3.3" + } + } + }, + "panel-11": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "topk(15, sum(increase(web_custom_events_total{instance=~\"$instance\"}[$__range])) by (event))", + "format": "table", + "instant": true + }, + "version": "v0" + }, + "refId": "A" + } + } + ], + "queryOptions": {}, + "transformations": [ + { + "kind": "organize", + "spec": { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": {}, + "renameByName": { + "event": "Event" + } + } + } + } + ] + } + }, + "description": "", + "id": 11, + "links": [], + "title": "Top 15 Custom Events", + "vizConfig": { + "group": "table", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": {}, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [] + } + ] + }, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Count" + } + ] + } + }, + "version": "12.3.3" + } + } + }, + "panel-12": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "up{job=\"watchdog\",instance=~\"$instance\"}", + "legendFormat": "{{instance}}" + }, + "version": "v0" + }, + "refId": "A" + } + } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "", + "id": 12, + "links": [], + "title": "Instance Health (1=up, 0=down)", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "last" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + } + }, + "version": "12.3.3" + } + } + }, + "panel-13": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "rate(web_path_overflow_total{instance=~\"$instance\"}[$__rate_interval]) * 60", + "legendFormat": "Path overflow - {{instance}}" + }, + "version": "v0" + }, + "refId": "A" + } + }, + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "rate(web_referrer_overflow_total{instance=~\"$instance\"}[$__rate_interval]) * 60", + "legendFormat": "Referrer overflow - {{instance}}" + }, + "version": "v0" + }, + "refId": "B" + } + }, + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "rate(web_event_overflow_total{instance=~\"$instance\"}[$__rate_interval]) * 60", + "legendFormat": "Event overflow - {{instance}}" + }, + "version": "v0" + }, + "refId": "C" + } + } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "", + "id": 13, + "links": [], + "title": "Cardinality Overflow (should be ~0)", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "last", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + } + }, + "version": "12.3.3" + } + } + }, + "panel-14": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "sum(rate(web_pageviews_total{instance=~\"$instance\"}[$__rate_interval])) by (instance)", + "legendFormat": "{{instance}}" + }, + "version": "v0" + }, + "refId": "A" + } + } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "", + "id": 14, + "links": [], + "title": "Request Rate by Instance", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "last", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + } + }, + "version": "12.3.3" + } + } + }, + "panel-2": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "sum(rate(web_pageviews_total{instance=~\"$instance\",domain=~\"$domain\"}[$__rate_interval])) * 60" + }, + "version": "v0" + }, + "refId": "A" + } + } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "", + "id": 2, + "links": [], + "title": "Pageviews/min", + "vizConfig": { + "group": "stat", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + } + }, + "version": "12.3.3" + } + } + }, + "panel-3": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "sum(increase(web_pageviews_total{instance=~\"$instance\",domain=~\"$domain\"}[$__range]))" + }, + "version": "v0" + }, + "refId": "A" + } + } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "", + "id": 3, + "links": [], + "title": "Total Pageviews", + "vizConfig": { + "group": "stat", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + } + }, + "version": "12.3.3" + } + } + }, + "panel-4": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "sum(rate(web_path_overflow_total{instance=~\"$instance\"}[$__rate_interval]) + rate(web_referrer_overflow_total{instance=~\"$instance\"}[$__rate_interval]) + rate(web_event_overflow_total{instance=~\"$instance\"}[$__rate_interval])) * 60" + }, + "version": "v0" + }, + "refId": "A" + } + } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "", + "id": 4, + "links": [], + "title": "Cardinality Overflow/min", + "vizConfig": { + "group": "stat", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + } + }, + "version": "12.3.3" + } + } + }, + "panel-5": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "sum(rate(web_pageviews_total{instance=~\"$instance\",domain=~\"$domain\"}[$__rate_interval])) by (domain) * 60", + "legendFormat": "{{domain}}" + }, + "version": "v0" + }, + "refId": "A" + } + } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "", + "id": 5, + "links": [], + "title": "Pageviews by Domain", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + } + }, + "version": "12.3.3" + } + } + }, + "panel-6": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "sum(web_daily_unique_visitors{instance=~\"$instance\",domain=~\"$domain\"}) by (domain)", + "legendFormat": "{{domain}}" + }, + "version": "v0" + }, + "refId": "A" + } + } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "", + "id": 6, + "links": [], + "title": "Unique Visitors by Domain", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + } + }, + "version": "12.3.3" + } + } + }, + "panel-7": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "sum(increase(web_pageviews_total{instance=~\"$instance\",domain=~\"$domain\"}[$__range])) by (device)", + "legendFormat": "{{device}}" + }, + "version": "v0" + }, + "refId": "A" + } + } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "", + "id": 7, + "links": [], + "title": "Device Breakdown", + "vizConfig": { + "group": "piechart", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "unit": "short" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value", + "percent" + ] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "sort": "desc", + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + } + }, + "version": "12.3.3" + } + } + }, + "panel-8": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "topk(10, sum(increase(web_pageviews_total{instance=~\"$instance\",domain=~\"$domain\"}[$__range])) by (country))", + "legendFormat": "{{country}}" + }, + "version": "v0" + }, + "refId": "A" + } + } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "", + "id": 8, + "links": [], + "title": "Top 10 Countries", + "vizConfig": { + "group": "piechart", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "unit": "short" + }, + "overrides": [] + }, + "options": { + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value", + "percent" + ] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "sort": "desc", + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + } + }, + "version": "12.3.3" + } + } + }, + "panel-9": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "topk(20, sum(increase(web_pageviews_total{instance=~\"$instance\",domain=~\"$domain\"}[$__range])) by (path))", + "format": "table", + "instant": true + }, + "version": "v0" + }, + "refId": "A" + } + } + ], + "queryOptions": {}, + "transformations": [ + { + "kind": "organize", + "spec": { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": {}, + "renameByName": { + "path": "Path" + } + } + } + } + ] + } + }, + "description": "", + "id": 9, + "links": [], + "title": "Top 20 Pages", + "vizConfig": { + "group": "table", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": {}, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [] + } + ] + }, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Pageviews" + } + ] + } + }, + "version": "12.3.3" + } + } + } + }, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [] + } + }, + "links": [], + "liveNow": false, + "preload": false, + "tags": [ + "watchdog", + "analytics" + ], + "timeSettings": { + "autoRefresh": "30s", + "autoRefreshIntervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "fiscalYearStartMonth": 0, + "from": "now-24h", + "hideTimepicker": false, + "timezone": "", + "to": "now" + }, + "title": "Watchdog Analytics", + "variables": [ + { + "kind": "DatasourceVariable", + "spec": { + "allowCustomValue": true, + "current": { + "text": "", + "value": "" + }, + "hide": "dontHide", + "includeAll": false, + "label": "Data Source", + "multi": false, + "name": "datasource", + "options": [], + "pluginId": "prometheus", + "refresh": "onDashboardLoad", + "regex": "", + "skipUrlSync": false + } + }, + { + "kind": "QueryVariable", + "spec": { + "allValue": ".*", + "allowCustomValue": true, + "current": { + "text": "", + "value": "" + }, + "definition": "label_values(web_pageviews_total, instance)", + "hide": "dontHide", + "includeAll": true, + "label": "Instance", + "multi": true, + "name": "instance", + "options": [], + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "query": "label_values(web_pageviews_total, instance)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "version": "v0" + }, + "refresh": "onDashboardLoad", + "regex": "", + "skipUrlSync": false, + "sort": "alphabeticalAsc" + } + }, + { + "kind": "QueryVariable", + "spec": { + "allValue": ".*", + "allowCustomValue": true, + "current": { + "text": "", + "value": "" + }, + "definition": "label_values(web_pageviews_total{instance=~\"$instance\"}, domain)", + "hide": "dontHide", + "includeAll": true, + "label": "Domain", + "multi": true, + "name": "domain", + "options": [], + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "query": "label_values(web_pageviews_total{instance=~\"$instance\"}, domain)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "version": "v0" + }, + "refresh": "onDashboardLoad", + "regex": "", + "skipUrlSync": false, + "sort": "alphabeticalAsc" + } + } + ] + }, + "status": {} +}