I was able to find an answer. Thanks all for you help.
This provides a chart which shows me how many consecutive fails occur each day (well, timechart span, but day by default).
search
| sort _time
| streamstats count as a_seq_num
| search status=SUCCESS
| delta a_seq_num AS a_not_successful_builds
| eval answer=a_not_successful_builds-1
| timechart max(a_not_successful_builds)
So, first, let's ensure that everything has a sequence number.
Next, get rid of the failures with the next search.
Now, find the difference between two sequence numbers.
So, let's say we have: S,S,SF,F,F,S,S,S
Then, we have seq_num, 1,2,3,4,5,6,7,8,9
Now, remove the F's : 1,2,3,7,8,9
Now, delta: 1,1,1,4,1,1
Subtract 1: 0,0,0,4,0,0
After that, it's formatting.
I'm happy. I am interested in other solutions. The search at the start means that I cannot combine results with a BY
e.g. -
| timechart max(a_not_successful_builds) by filter_term
does not work, because the seq_nums are not right....though, I could sort by two criteria. 🙂
... View more