Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 6, 2024
1 parent 8084d82 commit ea76d5a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
22 changes: 11 additions & 11 deletions dashboards/jupyterhub.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -192,7 +192,7 @@ local userAgeDistribution =
)
|||
% jupyterhub.onComponentLabel('singleuser-server'),
)
),
// interval='600s',
// intervalFactor=1,
]);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -440,7 +440,7 @@ local sharedVolumeFreeSpace =
]);

// Anomalous tables
local oldUserpods =
local oldUserpods =
common.tableOptions
+ table.new('Very old user pods')
+ ts.panelOptions.withDescription(
Expand Down Expand Up @@ -476,7 +476,7 @@ local oldUserpods =
+ prometheus.withLegendFormat('{{ namespace }}/{{ pod }}'),
// instant=true
]);
// .hideColumn('Time')
// .hideColumn('Time')

local highCPUUserPods =
common.tableOptions
Expand Down Expand Up @@ -516,7 +516,7 @@ local highCPUUserPods =
+ prometheus.withLegendFormat('{{ namespace }}/{{ pod }}'),
// instant=true
]);
// .hideColumn('Time')
// .hideColumn('Time')

local highMemoryUsagePods =
common.tableOptions
Expand Down Expand Up @@ -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 =
Expand Down
6 changes: 3 additions & 3 deletions dashboards/usage-report.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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}}'),
]);


Expand Down Expand Up @@ -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}}'),
]);


Expand All @@ -154,7 +154,7 @@ dashboard.new('Usage Report')
memoryUsageUserPods,
memoryUsageDaskWorkerPods,
memoryUsageDaskSchedulerPods,
memoryUsageGPUPods
memoryUsageGPUPods,
],
panelWidth=12,
panelHeight=8,
Expand Down
32 changes: 16 additions & 16 deletions global-dashboards/global-usage-stats.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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,
// },
)

0 comments on commit ea76d5a

Please sign in to comment.