Skip to content

Commit

Permalink
migrate: visual details for cluster.jsonnet
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Apr 8, 2024
1 parent ed3efc3 commit 9d96e51
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
4 changes: 4 additions & 0 deletions dashboards/cluster.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ local userNodes =
Number of nodes in each nodepool in this cluster
|||
)
+ ts.fieldConfig.defaults.custom.stacking.withMode('normal')
+ ts.standardOptions.withDecimals(0)
+ ts.queryOptions.withTargets([
prometheus.new(
Expand Down Expand Up @@ -58,6 +59,7 @@ local userPods =
may still affect your hub.
|||
)
+ ts.fieldConfig.defaults.custom.stacking.withMode('normal')
+ ts.standardOptions.withDecimals(0)
+ ts.queryOptions.withTargets([
prometheus.new(
Expand Down Expand Up @@ -380,6 +382,7 @@ local nodeOOMKills =
infact caused by an OOM
|||
)
+ ts.fieldConfig.defaults.custom.stacking.withMode('normal')
+ barChart.standardOptions.withDecimals(0)
+ barChart.queryOptions.withTargets([
prometheus.new(
Expand Down Expand Up @@ -409,6 +412,7 @@ local nonRunningPods =
In a functional clusters, pods should not be in non-Running states for long.
|||,
)
+ ts.fieldConfig.defaults.custom.stacking.withMode('normal')
+ barChart.standardOptions.withDecimals(0)
+ barChart.queryOptions.withTargets([
prometheus.new(
Expand Down
17 changes: 12 additions & 5 deletions dashboards/common.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,33 @@ local var = grafonnet.dashboard.variable;
// grafonnet ref: https://grafana.github.io/grafonnet/API/panel/timeSeries/index.html
tsOptions:
ts.standardOptions.withMin(0)
+ ts.options.withTooltip({ mode: 'multi' }),
+ ts.options.withTooltip({ mode: 'multi' })
+ ts.fieldConfig.defaults.custom.withLineInterpolation('stepAfter')
+ ts.fieldConfig.defaults.custom.withFillOpacity(10)
,

// grafana ref: https://grafana.com/docs/grafana/v10.4/panels-visualizations/visualizations/bar-chart/
// grafonnet ref: https://grafana.github.io/grafonnet/API/panel/barChart/index.html
barChartOptions:
barChart.standardOptions.withMin(0)
+ barChart.options.withTooltip({ mode: 'multi' }),
+ barChart.options.withTooltip({ mode: 'multi' })
,

// grafana ref: https://grafana.com/docs/grafana/v10.4/panels-visualizations/visualizations/bar-gauge/
// grafonnet ref: https://grafana.github.io/grafonnet/API/panel/barGauge/index.html
barGaugeOptions:
barGauge.standardOptions.withMin(0),
barGauge.standardOptions.withMin(0)
,

// 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.standardOptions.withMin(0)
,

tableOptions:
table.standardOptions.withMin(0),
table.standardOptions.withMin(0)
,


variables: {
Expand Down

0 comments on commit 9d96e51

Please sign in to comment.