mirror of
https://github.com/Luzifer/mondash.git
synced 2024-11-10 00:20:02 +00:00
Fix typo in status check
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
616a2c9c8b
commit
fd9f992985
1 changed files with 4 additions and 4 deletions
|
@ -189,13 +189,13 @@ func (dm dashboardMetric) StatisticalStatus() string {
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case mult > 4:
|
case mult > 4:
|
||||||
return "Critical"
|
return metricStatusStringMapping[metricStatusCritical]
|
||||||
|
|
||||||
case mult > 3:
|
case mult > 3:
|
||||||
return "Warning"
|
return metricStatusStringMapping[metricStatusWarning]
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return "OK"
|
return metricStatusStringMapping[metricStatusOK]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -322,7 +322,7 @@ func (dm dashboardMetric) IsValid() (bool, string) {
|
||||||
return false, "Freshness not in range 0 < x < 640800"
|
return false, "Freshness not in range 0 < x < 640800"
|
||||||
}
|
}
|
||||||
|
|
||||||
if !str.StringInSlice(dm.Status, []string{"OK", "Warning", "Critical", "Unknowm"}) {
|
if !str.StringInSlice(dm.Status, metricStatusStringMapping) {
|
||||||
return false, "Status not allowed"
|
return false, "Status not allowed"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue