mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-22 20:41:40 +02:00
Add LowerIsBetter Metric boolean. Upgrade dependencies.
This commit is contained in:
@@ -78,6 +78,8 @@ func initClusterConfig() error {
|
||||
newMetric.Caution = cfg.Caution
|
||||
newMetric.Alert = cfg.Alert
|
||||
newMetric.Footprint = cfg.Footprint
|
||||
newMetric.Energy = cfg.Energy
|
||||
newMetric.LowerIsBetter = cfg.LowerIsBetter
|
||||
sc.MetricConfig = append(sc.MetricConfig, *newMetric)
|
||||
|
||||
if newMetric.Footprint {
|
||||
|
@@ -28,6 +28,12 @@ func TestClusterConfig(t *testing.T) {
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
for _, metric := range sc.MetricConfig {
|
||||
if metric.LowerIsBetter && metric.Name != "mem_used" {
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
||||
// spew.Dump(archive.GlobalMetricList)
|
||||
// t.Fail()
|
||||
}
|
||||
|
@@ -60,6 +60,7 @@
|
||||
"normal": 128,
|
||||
"caution": 200,
|
||||
"alert": 240,
|
||||
"lowerIsBetter": true,
|
||||
"subClusters": [
|
||||
{
|
||||
"name": "spr1tb",
|
||||
@@ -67,6 +68,7 @@
|
||||
"normal": 512,
|
||||
"caution": 900,
|
||||
"footprint": true,
|
||||
"lowerIsBetter": true,
|
||||
"alert": 1000
|
||||
},
|
||||
{
|
||||
@@ -75,6 +77,7 @@
|
||||
"normal": 1024,
|
||||
"caution": 1800,
|
||||
"footprint": true,
|
||||
"lowerIsBetter": true,
|
||||
"alert": 2000
|
||||
}
|
||||
]
|
||||
|
Reference in New Issue
Block a user