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
A Humio query that ends with a count() will produce 0 if no rows were found, but a query that ends with an avg() or a sum() will produce no result if no rows were found. The latter will cause the humioexporter to crash. I suggest that the exporter either returns a zero, or removes the metric from the list of metrics until the query starts producing data.
The text was updated successfully, but these errors were encountered:
Hi, we are running with a locally modified HumioExporter to mitigate this issue. I have these log statements coming in regularly:
time="2022-08-05T10:51:11Z" level=info msg="Replace null value with 0 for #P12-i5sxxICINzcJfX0saYAtKrjZ" source="main.go:192"
This is the fix, and it works well for us. Without this fix we had plenty of crashes. I can try to run with the latest version of the Exporter and verify if I still see the problem. Btw did you try with an avg-function?
floatValue := 0.0
for _, f := range supportedFunctions {
if (len(poll.Events) > 0) {
value, ok := poll.Events[0][f]
if !ok {
continue
}
floatValue, err = parseFloat(value)
if err != nil {
done <- err
return
}
break
} else {
log.Infof("Replace null value with 0 for #%v", job.Id)
}
}
A Humio query that ends with a count() will produce 0 if no rows were found, but a query that ends with an avg() or a sum() will produce no result if no rows were found. The latter will cause the humioexporter to crash. I suggest that the exporter either returns a zero, or removes the metric from the list of metrics until the query starts producing data.
The text was updated successfully, but these errors were encountered: