Skip to content
This repository was archived by the owner on Jan 22, 2024. It is now read-only.

Commit be7e079

Browse files
committed
fix accidentially inherit performance data
thresholds need to reset for each performance data line, otherwise the would be appended to the wrong label.
1 parent 33e44ea commit be7e079

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

check_nsc_web.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -325,15 +325,15 @@ func main() {
325325

326326
nagiosMessage = strings.TrimSpace(l.Message)
327327

328-
val := ""
329-
uni := ""
330-
war := ""
331-
cri := ""
332-
min := ""
333-
max := ""
334328
for m, p := range l.Perf {
335329
// FIXME what if crit is set but not warn - there need to be unfilled semicolons
336330
// REFERENCE 'label'=value[UOM];[warn];[crit];[min];[max]
331+
val := ""
332+
uni := ""
333+
war := ""
334+
cri := ""
335+
min := ""
336+
max := ""
337337
if p.Value != nil {
338338
val = strconv.FormatFloat(*(p.Value), 'f', flagFloatround, 64)
339339
} else {

0 commit comments

Comments
 (0)