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 9, 2024
1 parent 9cafe81 commit a29e97f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 36 deletions.
3 changes: 1 addition & 2 deletions dashboards/common.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ local var = grafonnet.dashboard.variable;
+ var.query.withDatasourceFromVariable(self.prometheus)
+ var.query.selectionOptions.withMulti()
+ var.query.selectionOptions.withIncludeAll(value=true, customAllValue='.*')
+ var.query.queryTypes.withLabelValues('node', 'kube_node_info')
,
+ var.query.queryTypes.withLabelValues('node', 'kube_node_info'),
},

_nodePoolLabelKeys: [
Expand Down
64 changes: 32 additions & 32 deletions dashboards/jupyterhub.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ local hubDBUsage =
local serverStartTimes =
common.tsOptions
+ ts.new('Server Start Times')
+ ts.fieldConfig.defaults.custom.withDrawStyle("points")
+ ts.fieldConfig.defaults.custom.withDrawStyle('points')
+ ts.standardOptions.withUnit('s')
+ ts.queryOptions.withInterval('5m')
+ ts.queryOptions.withTargets([
Expand All @@ -337,7 +337,7 @@ local serverSpawnFailures =
Attempts by users to start servers that failed.
|||
)
+ ts.fieldConfig.defaults.custom.withDrawStyle("points")
+ ts.fieldConfig.defaults.custom.withDrawStyle('points')
+ ts.standardOptions.withDecimals(0)
+ ts.queryOptions.withInterval('2m')
+ ts.queryOptions.withTargets([
Expand Down Expand Up @@ -437,20 +437,20 @@ local oldUserpods =
|||
)
+ table.standardOptions.withUnit('s')
+ table.options.withSortBy({'displayName': 'Age', 'desc': true})
+ table.options.withSortBy({ displayName: 'Age', desc: true })
+ table.queryOptions.withTransformations([
{
'id': 'reduce',
'options': {
'reducers': ['last'],
id: 'reduce',
options: {
reducers: ['last'],
},
},
{
'id': 'organize',
'options': {
'renameByName': {
'Field': 'User pod',
'Last': 'Age',
id: 'organize',
options: {
renameByName: {
Field: 'User pod',
Last: 'Age',
},
},
},
Expand Down Expand Up @@ -480,20 +480,20 @@ local highCPUUserPods =
unnecessarily.
|||
)
+ table.options.withSortBy({'displayName': 'CPU used', 'desc': true})
+ table.options.withSortBy({ displayName: 'CPU used', desc: true })
+ table.queryOptions.withTransformations([
{
'id': 'reduce',
'options': {
'reducers': ['last']
}
id: 'reduce',
options: {
reducers: ['last'],
},
},
{
'id': 'organize',
'options': {
'renameByName': {
'Field': 'User pod',
'Last': 'CPU used',
id: 'organize',
options: {
renameByName: {
Field: 'User pod',
Last: 'CPU used',
},
},
},
Expand Down Expand Up @@ -524,23 +524,23 @@ local highMemoryUsagePods =
|||
)
+ table.standardOptions.withUnit('percentunit')
+ table.options.withSortBy({'displayName': '% of mem limit consumed', 'desc': true})
+ table.options.withSortBy({ displayName: '% of mem limit consumed', desc: true })
+ table.queryOptions.withTransformations([
{
'id': 'reduce',
'options': {
'reducers': ['last']
}
id: 'reduce',
options: {
reducers: ['last'],
},
},
{
'id': 'organize',
'options': {
'renameByName': {
'Field': 'User pod',
'Last': '% of mem limit consumed'
id: 'organize',
options: {
renameByName: {
Field: 'User pod',
Last: '% of mem limit consumed',
},
},
}
},
])
+ table.queryOptions.withTargets([
prometheus.new(
Expand Down
3 changes: 1 addition & 2 deletions dashboards/jupyterhub.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,5 @@ local prometheus = grafonnet.query.prometheus;
|||,
)
+ ts.standardOptions.withDecimals(1)
+ ts.standardOptions.withUnit('percentunit')
,
+ ts.standardOptions.withUnit('percentunit'),
}

0 comments on commit a29e97f

Please sign in to comment.