How to create Arrays and Loop them such as "FOR" in logstash config file

I am new to ELK and need help to understand and execute the code.

I need to create two arrays
Array1-->Errcode {E00,E001,E002}
Array2-->ErrorShortDesc {a1,a2,a3,a4,a5,a6,a7}
now based to the above array values i need to find actual Error-description based on the permutation combination.

For(int i,Errcode[i],i++)
{
For(int j,ErrorShortDesc[j],j++)
{
set of Ifs to find exact error description
}
}

How can we achieve this in Logstash file
have used grok to do the pattern matching to get ErrorCode and ErrorshortDescription but now need to array it.
Currently having a big if else ladder.

Could you make use of the translate filter instead of using the big else if ladder?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.