From 17761a538d5501b194ba03034baad27849963544 Mon Sep 17 00:00:00 2001 From: Spencer Torres Date: Thu, 29 Aug 2024 11:34:41 -0400 Subject: [PATCH] Update/fix missing `system.dashboards` dashboard (#954) Co-authored-by: Andreas Christou --- CHANGELOG.md | 1 + gen-db-dashboards.js | 4 +- src/dashboards/system-dashboards.json | 432 +++++++++++++++++++------- src/plugin.json | 5 + 4 files changed, 330 insertions(+), 112 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68f3f31d..c31e1039 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Added warning for when `uid` is missing in provisioned datasources. - Map filters in the query builder now correctly show the key instead of the column name +- Updated and fixed missing `system.dashboards` dashboard in list of dashboards ## 4.3.2 diff --git a/gen-db-dashboards.js b/gen-db-dashboards.js index d4819331..92d8aab6 100644 --- a/gen-db-dashboards.js +++ b/gen-db-dashboards.js @@ -267,9 +267,11 @@ async function main() { const clickHouseDashboards = await fetchDashboardsFromClickHouse(); const panels = generatePanels(clickHouseDashboards); const dashboard = generateDashboard(panels); + let fileData = JSON.stringify(dashboard, null, '\t'); + fileData += '\n'; try { - await fs.writeFile(OUTPUT_FILE, JSON.stringify(dashboard, null, '\t'), 'utf-8'); + await fs.writeFile(OUTPUT_FILE, fileData, 'utf-8'); } catch (err) { throw new Error('failed to write dashboard to file: ' + err); } diff --git a/src/dashboards/system-dashboards.json b/src/dashboards/system-dashboards.json index 800ee331..0b9a305a 100644 --- a/src/dashboards/system-dashboards.json +++ b/src/dashboards/system-dashboards.json @@ -21,7 +21,7 @@ "type": "datasource", "id": "grafana-clickhouse-datasource", "name": "ClickHouse", - "version": "4.3.0" + "version": "4.3.2" }, { "type": "panel", @@ -162,7 +162,7 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(ProfileEvent_Query)\nFROM merge('system', '^metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" @@ -267,7 +267,7 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(ProfileEvent_OSCPUVirtualTimeMicroseconds) / 1000000\nFROM merge('system', '^metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" @@ -372,7 +372,7 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(CurrentMetric_Query)\nFROM merge('system', '^metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" @@ -477,7 +477,7 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(CurrentMetric_Merge)\nFROM merge('system', '^metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" @@ -582,7 +582,7 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(ProfileEvent_SelectedBytes)\nFROM merge('system', '^metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" @@ -687,7 +687,7 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(ProfileEvent_OSIOWaitMicroseconds) / 1000000\nFROM merge('system', '^metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" @@ -792,7 +792,7 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(ProfileEvent_OSCPUWaitMicroseconds) / 1000000\nFROM merge('system', '^metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" @@ -897,7 +897,7 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(value)\nFROM merge('system', '^asynchronous_metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time) AND metric = 'OSUserTimeNormalized'\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" @@ -1002,7 +1002,7 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(value)\nFROM merge('system', '^asynchronous_metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time) AND metric = 'OSSystemTimeNormalized'\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" @@ -1107,7 +1107,7 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(ProfileEvent_OSReadBytes)\nFROM merge('system', '^metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" @@ -1212,7 +1212,7 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(ProfileEvent_OSReadChars)\nFROM merge('system', '^metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" @@ -1317,7 +1317,7 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(CurrentMetric_MemoryTracking)\nFROM merge('system', '^metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" @@ -1422,7 +1422,7 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(value)\nFROM merge('system', '^asynchronous_metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time) AND metric = 'LoadAverage15'\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" @@ -1527,7 +1527,7 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(ProfileEvent_SelectedRows)\nFROM merge('system', '^metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" @@ -1632,7 +1632,7 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(ProfileEvent_InsertedRows)\nFROM merge('system', '^metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" @@ -1737,7 +1737,7 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(value)\nFROM merge('system', '^asynchronous_metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time) AND metric = 'TotalPartsOfMergeTreeTables'\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" @@ -1842,7 +1842,7 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, max(value)\nFROM merge('system', '^asynchronous_metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time) AND metric = 'MaxPartCountForPartition'\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" @@ -1851,19 +1851,6 @@ "title": "Max Parts For Partition", "type": "timeseries" }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 64 - }, - "id": null, - "panels": [], - "title": "Cloud overview", - "type": "row" - }, { "datasource": { "type": "grafana-clickhouse-datasource", @@ -1960,15 +1947,28 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_Query) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n sum(CurrentMetric_TCPConnection) AS TCP_Connections,\n sum(CurrentMetric_MySQLConnection) AS MySQL_Connections,\n sum(CurrentMetric_HTTPConnection) AS HTTP_Connections\nFROM merge('system', '^metric_log')\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s", "refId": "A" } ], - "title": "Queries/second", + "title": "Concurrent network connections", "type": "timeseries" }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 72 + }, + "id": null, + "panels": [], + "title": "Cloud overview", + "type": "row" + }, { "datasource": { "type": "grafana-clickhouse-datasource", @@ -2065,13 +2065,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(metric) / 1000000\nFROM (\n SELECT event_time, sum(ProfileEvent_OSCPUVirtualTimeMicroseconds) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time) GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_Query) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "CPU Usage (cores)", + "title": "Queries/second", "type": "timeseries" }, { @@ -2170,13 +2170,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(CurrentMetric_Query) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(metric) / 1000000\nFROM (\n SELECT event_time, sum(ProfileEvent_OSCPUVirtualTimeMicroseconds) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time) GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "Queries Running", + "title": "CPU Usage (cores)", "type": "timeseries" }, { @@ -2275,13 +2275,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(CurrentMetric_Merge) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(CurrentMetric_Query) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "Merges Running", + "title": "Queries Running", "type": "timeseries" }, { @@ -2380,13 +2380,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_SelectedBytes) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(CurrentMetric_Merge) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "Selected Bytes/second", + "title": "Merges Running", "type": "timeseries" }, { @@ -2485,13 +2485,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_OSIOWaitMicroseconds) / 1000000 AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_SelectedBytes) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "IO Wait (local fs)", + "title": "Selected Bytes/second", "type": "timeseries" }, { @@ -2590,13 +2590,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_ReadBufferFromS3Microseconds) / 1000000 AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_OSIOWaitMicroseconds) / 1000000 AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "S3 read wait", + "title": "IO Wait (local fs)", "type": "timeseries" }, { @@ -2695,13 +2695,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_ReadBufferFromS3RequestsErrors) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_ReadBufferFromS3Microseconds) / 1000000 AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "S3 read errors/sec", + "title": "S3 read wait", "type": "timeseries" }, { @@ -2800,13 +2800,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_OSCPUWaitMicroseconds) / 1000000 AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_ReadBufferFromS3RequestsErrors) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "CPU Wait", + "title": "S3 read errors/sec", "type": "timeseries" }, { @@ -2905,13 +2905,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(value)\nFROM clusterAllReplicas(default, merge('system', '^asynchronous_metric_log'))\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nAND metric = 'OSUserTimeNormalized'\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_OSCPUWaitMicroseconds) / 1000000 AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "OS CPU Usage (Userspace, normalized)", + "title": "CPU Wait", "type": "timeseries" }, { @@ -3010,13 +3010,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(value)\nFROM clusterAllReplicas(default, merge('system', '^asynchronous_metric_log'))\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nAND metric = 'OSSystemTimeNormalized'\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(value)\nFROM clusterAllReplicas(default, merge('system', '^asynchronous_metric_log'))\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nAND metric = 'OSUserTimeNormalized'\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "OS CPU Usage (Kernel, normalized)", + "title": "OS CPU Usage (Userspace, normalized)", "type": "timeseries" }, { @@ -3115,13 +3115,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_OSReadBytes) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(value)\nFROM clusterAllReplicas(default, merge('system', '^asynchronous_metric_log'))\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nAND metric = 'OSSystemTimeNormalized'\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "Read From Disk (bytes/sec)", + "title": "OS CPU Usage (Kernel, normalized)", "type": "timeseries" }, { @@ -3220,13 +3220,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_OSReadChars) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_OSReadBytes) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "Read From Filesystem (bytes/sec)", + "title": "Read From Disk (bytes/sec)", "type": "timeseries" }, { @@ -3325,13 +3325,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(CurrentMetric_MemoryTracking) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_OSReadChars) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "Memory (tracked, bytes)", + "title": "Read From Filesystem (bytes/sec)", "type": "timeseries" }, { @@ -3430,13 +3430,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(value)\nFROM (\n SELECT event_time, sum(value) AS value\n FROM clusterAllReplicas(default, merge('system', '^asynchronous_metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n AND metric = 'LoadAverage15'\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(CurrentMetric_MemoryTracking) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "Load Average (15 minutes)", + "title": "Memory (tracked, bytes)", "type": "timeseries" }, { @@ -3535,13 +3535,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_SelectedRows) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(value)\nFROM (\n SELECT event_time, sum(value) AS value\n FROM clusterAllReplicas(default, merge('system', '^asynchronous_metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n AND metric = 'LoadAverage15'\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "Selected Rows/sec", + "title": "Load Average (15 minutes)", "type": "timeseries" }, { @@ -3640,13 +3640,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_InsertedRows) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_SelectedRows) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "Inserted Rows/sec", + "title": "Selected Rows/sec", "type": "timeseries" }, { @@ -3745,13 +3745,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, max(value)\nFROM clusterAllReplicas(default, merge('system', '^asynchronous_metric_log'))\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nAND metric = 'TotalPartsOfMergeTreeTables'\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_InsertedRows) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "Total MergeTree Parts", + "title": "Inserted Rows/sec", "type": "timeseries" }, { @@ -3850,13 +3850,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, max(value)\nFROM clusterAllReplicas(default, merge('system', '^asynchronous_metric_log'))\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nAND metric = 'MaxPartCountForPartition'\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, max(value)\nFROM clusterAllReplicas(default, merge('system', '^asynchronous_metric_log'))\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nAND metric = 'TotalPartsOfMergeTreeTables'\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "Max Parts For Partition", + "title": "Total MergeTree Parts", "type": "timeseries" }, { @@ -3955,13 +3955,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_ReadBufferFromS3Bytes) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, max(value)\nFROM clusterAllReplicas(default, merge('system', '^asynchronous_metric_log'))\nWHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\nAND metric = 'MaxPartCountForPartition'\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "Read From S3 (bytes/sec)", + "title": "Max Parts For Partition", "type": "timeseries" }, { @@ -4060,13 +4060,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(CurrentMetric_FilesystemCacheSize) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_ReadBufferFromS3Bytes) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "Filesystem Cache Size", + "title": "Read From S3 (bytes/sec)", "type": "timeseries" }, { @@ -4165,13 +4165,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_DiskS3PutObject + ProfileEvent_DiskS3UploadPart + ProfileEvent_DiskS3CreateMultipartUpload + ProfileEvent_DiskS3CompleteMultipartUpload) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(CurrentMetric_FilesystemCacheSize) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "Disk S3 write req/sec", + "title": "Filesystem Cache Size", "type": "timeseries" }, { @@ -4270,13 +4270,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_DiskS3GetObject + ProfileEvent_DiskS3HeadObject + ProfileEvent_DiskS3ListObjects) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_DiskS3PutObject + ProfileEvent_DiskS3UploadPart + ProfileEvent_DiskS3CreateMultipartUpload + ProfileEvent_DiskS3CompleteMultipartUpload) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "Disk S3 read req/sec", + "title": "Disk S3 write req/sec", "type": "timeseries" }, { @@ -4375,13 +4375,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_CachedReadBufferReadFromCacheBytes) / (sum(ProfileEvent_CachedReadBufferReadFromCacheBytes) + sum(ProfileEvent_CachedReadBufferReadFromSourceBytes)) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_DiskS3GetObject + ProfileEvent_DiskS3HeadObject + ProfileEvent_DiskS3ListObjects) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "FS cache hit rate", + "title": "Disk S3 read req/sec", "type": "timeseries" }, { @@ -4480,13 +4480,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, greatest(0, (sum(ProfileEvent_OSReadChars) - sum(ProfileEvent_OSReadBytes)) / (sum(ProfileEvent_OSReadChars) + sum(ProfileEvent_ReadBufferFromS3Bytes))) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, sum(ProfileEvent_CachedReadBufferReadFromCacheBytes) / (sum(ProfileEvent_CachedReadBufferReadFromCacheBytes) + sum(ProfileEvent_CachedReadBufferReadFromSourceBytes)) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "Page cache hit rate", + "title": "FS cache hit rate", "type": "timeseries" }, { @@ -4585,13 +4585,13 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", "queryType": "timeseries", - "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(value)\nFROM (\n SELECT event_time, sum(value) AS value\n FROM clusterAllReplicas(default, merge('system', '^asynchronous_metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n AND metric LIKE 'NetworkReceiveBytes%'\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "rawSql": "SELECT \n toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t,\n avg(metric)\nFROM (\n SELECT event_time, greatest(0, (sum(ProfileEvent_OSReadChars) - sum(ProfileEvent_OSReadBytes)) / (sum(ProfileEvent_OSReadChars) + sum(ProfileEvent_ReadBufferFromS3Bytes))) AS metric \n FROM clusterAllReplicas(default, merge('system', '^metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" } ], - "title": "Network receive bytes/sec", + "title": "Page cache hit rate", "type": "timeseries" }, { @@ -4690,7 +4690,112 @@ "table": "" } }, - "pluginVersion": "4.3.0", + "pluginVersion": "4.3.2", + "queryType": "timeseries", + "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(value)\nFROM (\n SELECT event_time, sum(value) AS value\n FROM clusterAllReplicas(default, merge('system', '^asynchronous_metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n AND metric LIKE 'NetworkReceiveBytes%'\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "refId": "A" + } + ], + "title": "Network receive bytes/sec", + "type": "timeseries" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "${the_datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 176 + }, + "id": 45, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "${the_datasource}" + }, + "editorType": "sql", + "format": 0, + "meta": { + "builderOptions": { + "columns": [], + "database": "", + "limit": 1000, + "mode": "list", + "queryType": "table", + "table": "" + } + }, + "pluginVersion": "4.3.2", "queryType": "timeseries", "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, avg(value)\nFROM (\n SELECT event_time, sum(value) AS value\n FROM clusterAllReplicas(default, merge('system', '^asynchronous_metric_log'))\n WHERE $__dateFilter(event_date) AND $__timeFilter(event_time)\n AND metric LIKE 'NetworkSendBytes%'\n GROUP BY event_time)\nGROUP BY t\nORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", "refId": "A" @@ -4698,6 +4803,111 @@ ], "title": "Network send bytes/sec", "type": "timeseries" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "${the_datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 12, + "y": 176 + }, + "id": 46, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "${the_datasource}" + }, + "editorType": "sql", + "format": 0, + "meta": { + "builderOptions": { + "columns": [], + "database": "", + "limit": 1000, + "mode": "list", + "queryType": "table", + "table": "" + } + }, + "pluginVersion": "4.3.2", + "queryType": "timeseries", + "rawSql": "SELECT toStartOfInterval(event_time, INTERVAL $__interval_s SECOND) AS t, max(TCP_Connections), max(MySQL_Connections), max(HTTP_Connections) FROM (SELECT event_time, sum(CurrentMetric_TCPConnection) AS TCP_Connections, sum(CurrentMetric_MySQLConnection) AS MySQL_Connections, sum(CurrentMetric_HTTPConnection) AS HTTP_Connections FROM clusterAllReplicas(default, merge('system', '^metric_log')) WHERE $__dateFilter(event_date) AND $__timeFilter(event_time) GROUP BY event_time) GROUP BY t ORDER BY t WITH FILL STEP $__interval_s SETTINGS skip_unavailable_shards = 1", + "refId": "A" + } + ], + "title": "Concurrent network connections", + "type": "timeseries" } ], "schemaVersion": 39, @@ -4715,4 +4925,4 @@ "uid": null, "version": 1, "weekStart": "" -} \ No newline at end of file +} diff --git a/src/plugin.json b/src/plugin.json index 8a25b9d9..d1ab6fa4 100644 --- a/src/plugin.json +++ b/src/plugin.json @@ -30,6 +30,11 @@ "type": "dashboard", "name": "ClickHouse OTel Dashboard", "path": "dashboards/opentelemetry-clickhouse.json" + }, + { + "type": "dashboard", + "name": "ClickHouse System Dashboards", + "path": "dashboards/system-dashboards.json" } ], "category": "sql",