{ "__inputs": [ { "name": "DS_GRAFANA-CLICKHOUSE-DATASOURCE", "label": "grafana-clickhouse-datasource", "description": "", "type": "datasource", "pluginId": "grafana-clickhouse-datasource", "pluginName": "ClickHouse" } ], "__elements": {}, "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "11.4.0" }, { "type": "datasource", "id": "grafana-clickhouse-datasource", "name": "ClickHouse", "version": "4.5.1" }, { "type": "panel", "id": "timeseries", "name": "Time series", "version": "" } ], "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, "links": [], "panels": [ { "datasource": { "type": "grafana-clickhouse-datasource", "uid": "${DS_GRAFANA-CLICKHOUSE-DATASOURCE}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "barWidthFactor": 0.6, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 0 }, "id": 1, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "pluginVersion": "11.4.0", "targets": [ { "builderOptions": { "aggregates": [], "columns": [ { "alias": "user_id", "custom": false, "name": "user_id", "type": "String" } ], "database": "default", "filters": [], "groupBy": [ "user_id" ], "limit": 1000, "meta": {}, "mode": "aggregate", "orderBy": [], "queryType": "table", "table": "events" }, "datasource": { "type": "grafana-clickhouse-datasource", "uid": "${DS_GRAFANA-CLICKHOUSE-DATASOURCE}" }, "editorType": "sql", "format": 1, "meta": { "builderOptions": { "aggregates": [], "columns": [ { "alias": "user_id", "custom": false, "name": "user_id", "type": "String" } ], "database": "default", "filters": [], "groupBy": [ "user_id" ], "limit": 1000, "meta": {}, "mode": "aggregate", "orderBy": [], "queryType": "table", "table": "events" } }, "pluginVersion": "4.5.1", "queryType": "table", "rawSql": "SELECT \ntoStartOfHour(timestamp) as time,\ncount(DISTINCT user_id) as unique_pageviews\nFROM \"default\".\"events\" \nwhere event = '$pageview'\nGROUP BY time\norder by time", "refId": "A" } ], "title": "Panel Title", "type": "timeseries" } ], "schemaVersion": 40, "tags": [], "templating": { "list": [] }, "time": { "from": "now-6h", "to": "now" }, "timepicker": {}, "timezone": "browser", "title": "New dashboard", "uid": "ee6c3vm4x4dtsb", "version": 2, "weekStart": "" }