After 2.2 upgrade: "Field graphs are only available for numeric fields"

(dee) #1

I have a rule to extract sysstat values from my log files (below). Since the values are are not whole numbers, I opted for converting the values from the regex capture group into doubles. This was working prior to upgrading to 2.2.0+d9681cb however when I try to graph these supposed double values now, I get the error “Field graphs are only available for numeric fields”. How can I debug this problem further to fix it?

This is my source message sample I am applying the rule to:
yggdrasil root: sysstat cpu user:1.02 nice:0.00 sys:0.53 iow:0.13 stl:0.00 idl:98.33 util:1.67

And my graylog Stage 0 pipeline rule:
> rule “Sysstat CPU Values”
> when
> contains (to_string(message.message), "sysstat cpu") > then > let m = regex ("^(.*?)\\s.*sysstat\\scpu\\s.*:(.*?)\\s.*:(.*?)\\s.*:(.*?)\\s.*:(.*?)\\s.*:(.*?)\\s.*:(.*?)\\s.*:(.*?)", to_string($message.message));
> set_field(“hostname”, m[“0”]);
> set_field(“cpu_user”, to_double(m[“1”]));
> set_field(“cpu_nice”, to_double(m[“2”]));
> set_field(“cpu_sys”, to_double(m[“3”]));
> set_field(“cpu_iowait”, to_double(m[“4”]));
> set_field(“cpu_steal”, to_double(m[“5”]));
> set_field(“cpu_idle”, to_double(m[“6”]));
> set_field(“cpu_util”, to_double(m[“7”]));
> end