Hi everyone,
I’m encountering an issue in Graylog with a pipeline that has two rules:
Stage 6
rule "rtpengine mos"
when
contains(
value: to_string($message."message"),
search: "Average MOS"
)
then
let gl2_fragment_grok_results = grok(
pattern: "%{SYSLOGTIMESTAMP} %{SYSLOGHOST} %{SYSLOGPROG}: %{WORD:loglevel}: \\[%{DATA:call_id}(@%{DATA:cloud_ip}(:%{POSINT})?)?\\]:( \\[%{WORD}?\\])? ------ Average MOS %{BASE16FLOAT:average_mos}, lowest MOS %{BASE16FLOAT:lowest_mos} \\(at %{SECOND:start}\\), highest MOS %{BASE16FLOAT:highest_mos} \\(at %{SECOND:start2}\\)",
value: to_string($message."message")
);
set_fields(
fields: gl2_fragment_grok_results
);
end
Stage 7
rule "convert average_mos to numeric"
when
has_field("average_mos")
then
let averageMosString = to_string($message.average_mos);
let averageMosNumeric = to_double(averageMosString);
set_field("average_mos_num", averageMosNumeric);
end
Summary:
In Stage 6, the variable average_mos is created as a string. In Stage 7, average_mos is copied to a new field average_mos_num, which is then supposed to be converted to a double.
However, the issue I’m facing is that average_mos_num remains a string instead of being converted to a double.
Has anyone experienced a similar issue or have any suggestions on how to resolve this? Your help would be greatly appreciated!
Thank you!
