Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding values that are causing NaN for Mean statistic function in Graylog2

I have a simple request log where each record has an execution time in seconds, under exec_time property. It should always be a number (lower the better). Based on that property I have dashboard widget that shows its Mean value and it was working just fine until recently. Now it shows NaN.

My guess is that there's one or more records with exec_time that's not numeric. How can I find these records?

like image 873
Ilija Avatar asked Oct 30 '22 04:10

Ilija


1 Answers

Take your request logs, and iterate over them with a simple script to check every value individually. Print out the ones that are wrong. With no other information my guess is you have a mis-tagged non-number field feeding into "exec_time", an empty (null, none) value, something too large, something too small, or a corrupted entry somewhere.

like image 178
James Avatar answered Jan 04 '23 15:01

James