-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add allow sub-seconds time resolution with $timeSeriesMs and $timeFil…
- Loading branch information
Showing
8 changed files
with
396 additions
and
23 deletions.
There are no files selected for viewing
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
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
192 changes: 192 additions & 0 deletions
192
docker/grafana/dashboards/test_timeFilterMs_and_timeSeriesMs.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,192 @@ | ||
{ | ||
"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, | ||
"links": [], | ||
"panels": [ | ||
{ | ||
"alert": { | ||
"alertRuleTags": {}, | ||
"conditions": [ | ||
{ | ||
"evaluator": { | ||
"params": [ | ||
0 | ||
], | ||
"type": "gt" | ||
}, | ||
"operator": { | ||
"type": "and" | ||
}, | ||
"query": { | ||
"params": [ | ||
"A", | ||
"5m", | ||
"now" | ||
] | ||
}, | ||
"reducer": { | ||
"params": [], | ||
"type": "max" | ||
}, | ||
"type": "query" | ||
} | ||
], | ||
"executionErrorState": "alerting", | ||
"for": "5m", | ||
"frequency": "1m", | ||
"handler": 1, | ||
"name": "$timeSeriesMs and $timeFIlterMs alert", | ||
"noDataState": "no_data", | ||
"notifications": [] | ||
}, | ||
"aliasColors": {}, | ||
"bars": false, | ||
"dashLength": 10, | ||
"dashes": false, | ||
"datasource": "clickhouse", | ||
"description": "fix https://github.com/Altinity/clickhouse-grafana/issues/344 and https://github.com/Altinity/clickhouse-grafana/issues/398", | ||
"fieldConfig": { | ||
"defaults": {}, | ||
"overrides": [] | ||
}, | ||
"fill": 1, | ||
"fillGradient": 0, | ||
"gridPos": { | ||
"h": 9, | ||
"w": 12, | ||
"x": 0, | ||
"y": 0 | ||
}, | ||
"hiddenSeries": false, | ||
"id": 2, | ||
"legend": { | ||
"avg": false, | ||
"current": false, | ||
"max": false, | ||
"min": false, | ||
"show": true, | ||
"total": false, | ||
"values": false | ||
}, | ||
"lines": true, | ||
"linewidth": 1, | ||
"nullPointMode": "null", | ||
"options": { | ||
"alertThreshold": true | ||
}, | ||
"percentage": false, | ||
"pluginVersion": "7.5.16", | ||
"pointradius": 2, | ||
"points": false, | ||
"renderer": "flot", | ||
"seriesOverrides": [], | ||
"spaceLength": 10, | ||
"stack": false, | ||
"steppedLine": false, | ||
"targets": [ | ||
{ | ||
"database": "default", | ||
"dateColDataType": "", | ||
"dateLoading": false, | ||
"dateTimeColDataType": "d", | ||
"dateTimeType": "DATETIME64", | ||
"datetimeLoading": false, | ||
"extrapolate": true, | ||
"format": "time_series", | ||
"formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", | ||
"interval": "", | ||
"intervalFactor": 1, | ||
"query": "SELECT\n $timeSeriesMs as t,\n count()\nFROM $table\n\nWHERE $timeFilterMs\n\nGROUP BY t\n\nORDER BY t\n", | ||
"queryType": "randomWalk", | ||
"rawQuery": "SELECT\n (intDiv(toFloat64(\"d\") * 1000, 20000) * 20000) as t,\n count()\nFROM default.test_datetime64\n\nWHERE \"d\" >= toDateTime64(1654061632511/1000, 3) AND \"d\" <= toDateTime64(1654083232511/1000, 3)\n\nGROUP BY t\n\nORDER BY t", | ||
"refId": "A", | ||
"round": "0s", | ||
"skip_comments": true, | ||
"table": "test_datetime64", | ||
"tableLoading": false | ||
} | ||
], | ||
"thresholds": [ | ||
{ | ||
"colorMode": "critical", | ||
"fill": true, | ||
"line": true, | ||
"op": "gt", | ||
"value": 0, | ||
"visible": true | ||
} | ||
], | ||
"timeFrom": null, | ||
"timeRegions": [], | ||
"timeShift": null, | ||
"title": "$timeSeriesMs and $timeFIlterMs", | ||
"tooltip": { | ||
"shared": true, | ||
"sort": 0, | ||
"value_type": "individual" | ||
}, | ||
"type": "graph", | ||
"xaxis": { | ||
"buckets": null, | ||
"mode": "time", | ||
"name": null, | ||
"show": true, | ||
"values": [] | ||
}, | ||
"yaxes": [ | ||
{ | ||
"$$hashKey": "object:469", | ||
"format": "short", | ||
"label": null, | ||
"logBase": 1, | ||
"max": null, | ||
"min": null, | ||
"show": true | ||
}, | ||
{ | ||
"$$hashKey": "object:470", | ||
"format": "short", | ||
"label": null, | ||
"logBase": 1, | ||
"max": null, | ||
"min": null, | ||
"show": true | ||
} | ||
], | ||
"yaxis": { | ||
"align": false, | ||
"alignLevel": null | ||
} | ||
} | ||
], | ||
"refresh": false, | ||
"schemaVersion": 27, | ||
"style": "dark", | ||
"tags": [], | ||
"templating": { | ||
"list": [] | ||
}, | ||
"time": { | ||
"from": "now-6h", | ||
"to": "now" | ||
}, | ||
"timepicker": {}, | ||
"timezone": "", | ||
"title": "$timeFilterMs and $timeSeriesMs", | ||
"uid": "iVjWIx97k", | ||
"version": 2 | ||
} |
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
Oops, something went wrong.