Skip to content

Commit

Permalink
migrate: another mash of detail fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Apr 9, 2024
1 parent bae6771 commit 292db1e
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 127 deletions.
6 changes: 3 additions & 3 deletions dashboards/cluster.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -435,10 +435,8 @@ dashboard.new('Cluster Information')
[
row.new('Cluster Utilization')
+ row.withPanels([
userPods, // FIXME: previously width 24
userPods,
userNodes,
nodepoolMemoryCommitment,
nodepoolCPUCommitment,
]),
row.new('Cluster Health')
+ row.withPanels([
Expand All @@ -451,6 +449,8 @@ dashboard.new('Cluster Information')
nodeMemoryUtil,
nodeCPUCommit,
nodeMemoryCommit,
nodepoolCPUCommitment,
nodepoolMemoryCommitment,
]),
],
panelWidth=12,
Expand Down
24 changes: 13 additions & 11 deletions dashboards/common.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -42,31 +42,34 @@ local var = grafonnet.dashboard.variable;
// grafana ref: https://grafana.com/docs/grafana/v10.4/panels-visualizations/visualizations/heatmap/
// grafonnet ref: https://grafana.github.io/grafonnet/API/panel/heatmap/index.html
heatmapOptions:
heatmap.standardOptions.withMin(0)
heatmap.options.withCalculate(true)
+ heatmap.options.yAxis.withMin(0)
,

tableOptions:
table.standardOptions.withMin(0)
,


// grafonnet ref: https://grafana.github.io/grafonnet/API/dashboard/variable.html
variables: {
prometheus:
var.datasource.new('PROMETHEUS_DS', 'prometheus'),
var.datasource.new('PROMETHEUS_DS', 'prometheus')
+ var.datasource.generalOptions.showOnDashboard.withValueOnly()
,
hub:
var.query.new('hub')
+ var.query.withDatasourceFromVariable(self.prometheus)
+ var.query.withRefresh('time')
+ var.query.selectionOptions.withMulti()
+ var.query.selectionOptions.withIncludeAll()
+ var.query.queryTypes.withLabelValues('namespace', 'kube_service_labels{service="hub"}'),
+ var.query.selectionOptions.withIncludeAll(value=true, customAllValue='.*')
+ var.query.queryTypes.withLabelValues('namespace', 'kube_service_labels{service="hub"}')
,
user_pod:
var.query.new('user_pod')
+ var.query.withDatasourceFromVariable(self.prometheus)
+ var.query.withRefresh('time')
+ var.query.selectionOptions.withMulti()
+ var.query.selectionOptions.withIncludeAll()
+ var.query.queryTypes.withLabelValues('pod', 'kube_pod_labels{label_app="jupyterhub", label_component="singleuser-server", namespace=~"$hub"}'),
+ var.query.selectionOptions.withIncludeAll(value=true, customAllValue='.*')
+ var.query.queryTypes.withLabelValues('pod', 'kube_pod_labels{label_app="jupyterhub", label_component="singleuser-server", namespace=~"$hub"}')
,
// Queries should use the 'instance' label when querying metrics that
// come from collectors present on each node - such as node_exporter or
// container_ metrics, and use the 'node' label when querying metrics
Expand All @@ -75,9 +78,8 @@ local var = grafonnet.dashboard.variable;
instance:
var.query.new('instance')
+ var.query.withDatasourceFromVariable(self.prometheus)
+ var.query.withRefresh('time')
+ var.query.selectionOptions.withMulti()
+ var.query.selectionOptions.withIncludeAll()
+ var.query.selectionOptions.withIncludeAll(value=true, customAllValue='.*')
+ var.query.queryTypes.withLabelValues('node', 'kube_node_info'),
},

Expand Down
Loading

0 comments on commit 292db1e

Please sign in to comment.