To set tokens, I have several "condition match" in a search but, if more than one condition is matched, only the first one seems to work. To simplify my use case:
<search>
<query>index=_internal | stats count by host | table host, count</query>
<earliest>@d</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
<done>
<condition match="len($result.host$)!=0">
<set token="showtab1">t1</set>
</condition>
<condition match="len($result.count$)!=0">
<set token="showtab2">t2</set>
</condition>
</done>
</search>
What I expect is that both tokens will be set (both result.host and result.count exist and have a value). However, only "showtab1" is set.
To my surprise, if I swap the conditions order:
[...]
<done>
<condition match="len($result.count$)!=0">
<set token="showtab2">t2</set>
</condition>
<condition match="len($result.host$)!=0">
<set token="showtab1">t1</set>
</condition>
</done>
[...]
Now, "showtab2" is set (and "showtab1" is unset...)
What I'm missing here?
... View more