From ea76d5a4fc4dff231b9fc23f7268996b2de40035 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 6 Apr 2024 19:08:46 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- dashboards/jupyterhub.jsonnet | 22 +++++++------- dashboards/usage-report.jsonnet | 6 ++-- global-dashboards/global-usage-stats.jsonnet | 32 ++++++++++---------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/dashboards/jupyterhub.jsonnet b/dashboards/jupyterhub.jsonnet index c5a5d32..1abcf52 100755 --- a/dashboards/jupyterhub.jsonnet +++ b/dashboards/jupyterhub.jsonnet @@ -119,7 +119,7 @@ local monthlyActiveUsers = + prometheus.withLegendFormat('{{ namespace }}'), ]); -local userMemoryDistribution = +local userMemoryDistribution = common.heatmapOptions + heatmap.new('User memory usage distribution') // xBucketSize and interval must match to get correct values out of heatmaps @@ -140,12 +140,12 @@ local userMemoryDistribution = ) by (pod) ||| % jupyterhub.onComponentLabel('singleuser-server', group_left='container'), - ) + ), // interval='600s', // intervalFactor=1, ]); -local userCPUDistribution = +local userCPUDistribution = common.heatmapOptions + heatmap.new('User CPU usage distribution') // xBucketSize and interval must match to get correct values out of heatmaps @@ -166,12 +166,12 @@ local userCPUDistribution = ) by (pod) ||| % jupyterhub.onComponentLabel('singleuser-server', group_left='container'), - ) + ), // interval='600s', // intervalFactor=1, ]); -local userAgeDistribution = +local userAgeDistribution = common.heatmapOptions + heatmap.new('User active age distribution') // xBucketSize and interval must match to get correct values out of heatmaps @@ -192,7 +192,7 @@ local userAgeDistribution = ) ||| % jupyterhub.onComponentLabel('singleuser-server'), - ) + ), // interval='600s', // intervalFactor=1, ]); @@ -335,7 +335,7 @@ local serverStartTimes = 'histogram_quantile(0.5, sum(rate(jupyterhub_server_spawn_duration_seconds_bucket{app="jupyterhub", namespace=~"$hub"}[5m])) by (le))', ) + prometheus.withLegendFormat('50th percentile'), -]); + ]); local serverSpawnFailures = common.tsOptions @@ -440,7 +440,7 @@ local sharedVolumeFreeSpace = ]); // Anomalous tables -local oldUserpods = +local oldUserpods = common.tableOptions + table.new('Very old user pods') + ts.panelOptions.withDescription( @@ -476,7 +476,7 @@ local oldUserpods = + prometheus.withLegendFormat('{{ namespace }}/{{ pod }}'), // instant=true ]); - // .hideColumn('Time') +// .hideColumn('Time') local highCPUUserPods = common.tableOptions @@ -516,7 +516,7 @@ local highCPUUserPods = + prometheus.withLegendFormat('{{ namespace }}/{{ pod }}'), // instant=true ]); - // .hideColumn('Time') +// .hideColumn('Time') local highMemoryUsagePods = common.tableOptions @@ -563,7 +563,7 @@ local highMemoryUsagePods = + prometheus.withLegendFormat('{{ namespace }}/{{ pod }}'), // instant=true ]); - // .hideColumn('Time') +// .hideColumn('Time') // Show images used by different users on the hub local notebookImagesUsed = diff --git a/dashboards/usage-report.jsonnet b/dashboards/usage-report.jsonnet index bf8738c..888f22d 100755 --- a/dashboards/usage-report.jsonnet +++ b/dashboards/usage-report.jsonnet @@ -105,7 +105,7 @@ local memoryUsageDaskSchedulerPods = ) by (label_hub_jupyter_org_username, label_gateway_dask_org_cluster) |||, ) - + prometheus.withLegendFormat('{{label_hub_jupyter_org_username}}-{{label_gateway_dask_org_cluster}}') + + prometheus.withLegendFormat('{{label_hub_jupyter_org_username}}-{{label_gateway_dask_org_cluster}}'), ]); @@ -137,7 +137,7 @@ local memoryUsageGPUPods = ) by (namespace, pod) |||, ) - + prometheus.withLegendFormat('{{label_hub_jupyter_org_username}}-{{label_gateway_dask_org_cluster}}') + + prometheus.withLegendFormat('{{label_hub_jupyter_org_username}}-{{label_gateway_dask_org_cluster}}'), ]); @@ -154,7 +154,7 @@ dashboard.new('Usage Report') memoryUsageUserPods, memoryUsageDaskWorkerPods, memoryUsageDaskSchedulerPods, - memoryUsageGPUPods + memoryUsageGPUPods, ], panelWidth=12, panelHeight=8, diff --git a/global-dashboards/global-usage-stats.jsonnet b/global-dashboards/global-usage-stats.jsonnet index 80ae92d..d023cc1 100755 --- a/global-dashboards/global-usage-stats.jsonnet +++ b/global-dashboards/global-usage-stats.jsonnet @@ -39,19 +39,19 @@ function(datasources) for x in datasources ]); -dashboard.new('Global Usage Dashboard') -+ dashboard.withUid('global-usage-dashboard') -+ dashboard.withTags(['jupyterhub', 'global']) -+ dashboard.withEditable(true) -// time_from='now-7d', -+ dashboard.withPanels( - grafonnet.util.grid.makeGrid([ - weeklyActiveUsers, - ]) - // gridPos={ - // x: 0, - // y: 0, - // w: 25, - // h: 10, - // }, -) + dashboard.new('Global Usage Dashboard') + + dashboard.withUid('global-usage-dashboard') + + dashboard.withTags(['jupyterhub', 'global']) + + dashboard.withEditable(true) + // time_from='now-7d', + + dashboard.withPanels( + grafonnet.util.grid.makeGrid([ + weeklyActiveUsers, + ]) + // gridPos={ + // x: 0, + // y: 0, + // w: 25, + // h: 10, + // }, + )