You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log.Warnf("Error when converting the index to a known field in performance data : %s", err.Error())
328
-
continue
327
+
goto perfdataStringMatchLoopEnd
329
328
}
330
329
331
330
switchfieldType {
332
331
caseRawMatch:
333
-
continue
334
332
caseLabel:
335
333
iflen(data) >w.perfdataLabelMaxSize {
336
334
log.Warnf("Perfdata Label: '%s' is too long with length: %s and longer than the limit: %s. Probably an anomally. Skipping this perfdata item, Host: %v , Service: %v, Perfdata fields: %v", data, len(data), w.perfdataLabelMaxSize, perf.Hostname, perf.Service, perfdataStringMatch)
337
-
gotoperfdataStringMatchLoop
335
+
gotoperfdataStringMatchLoopEnd
338
336
}
339
-
continue
340
337
caseUOM:
341
338
iflen(data) >w.perfdataUOMMaxLength {
342
339
log.Warnf("Perfdata UOM: '%s' is too long with length: %s and longer than the limit: %s. Probably an anomally. Host: %v , Service: %v, Perfdata fields: %v", data, len(data), w.perfdataUOMMaxLength, perf.Hostname, perf.Service, perfdataStringMatch)
343
-
gotoperfdataStringMatchLoop
340
+
gotoperfdataStringMatchLoopEnd
344
341
}
345
-
continue
346
342
caseValue, Min, Max:
347
343
iflen(data) >w.perfdataNumericValuesMaxLength {
348
344
log.Warnf("Perfdata field %s: '%s' is too long with length: %s and longer than the limit: %s. Probably an anomally. Host: %v , Service: %v, Perfdata fields: %v", fieldType.String(), data, len(data), w.perfdataNumericValuesMaxLength, perf.Hostname, perf.Service, perfdataStringMatch)
349
-
gotoperfdataStringMatchLoop
345
+
gotoperfdataStringMatchLoopEnd
350
346
}
351
-
continue
352
347
caseWarn, Crit:
353
348
iflen(data) >w.perfdataThresholdsMaxLength {
354
349
log.Warnf("Perfdata field %s: '%s' is too long with length: %s and longer than the limit: %s. Probably an anomally. Host: %v , Service: %v, Perfdata fields: %v", fieldType.String(), data, len(data), w.perfdataThresholdsMaxLength, perf.Hostname, perf.Service, perfdataStringMatch)
355
-
gotoperfdataStringMatchLoop
350
+
gotoperfdataStringMatchLoopEnd
356
351
}
357
-
continue
358
352
}
359
353
360
354
ifdata=="" {
@@ -386,13 +380,13 @@ func (w *NagiosSpoolfileWorker) PerformanceDataIterator(input map[string]string)
log.Warnf("String: '%s' in field '%s' could not be parsed. Host: %v, Service: %v, Perf Data Fields: %v", data, fieldType.String(), perf.Hostname, perf.Service, perfdataStringMatch)
389
+
goto perfdataStringMatchLoopEnd
396
390
}
397
391
caseValue, Min, Max:
398
392
ifdata=="U" {
@@ -401,12 +395,16 @@ func (w *NagiosSpoolfileWorker) PerformanceDataIterator(input map[string]string)
401
395
}
402
396
if!helper.IsStringANumber(data) {
403
397
log.Warnf("String: '%s' in field '%s' is not a number, should be one. Host: %v, Service: %v, Perf Data Fields: %v", data, fieldType.String(), perf.Hostname, perf.Service, perfdataStringMatch)
0 commit comments