Mr Woodcock - good to get your help 🙂
I had to update the main question as i cant post images in this replay correctly.
So i tried your solution, but i think the "MAP" command can't be real time (I did put it into a one Relative window and it works, but i loose the sparkline update, unless i get the window to refresh every X seconds - This could be an option).
In this case i was looking for a 1 minute real time window, with three columns.
Service_name Sparkline Status
I got it down to this, so is it possible to reconstruct the sparkline to be visual again?
If so, i might be able to use a 1 minute search and refresh ever 10 seconds, to give it the feeling of real time?
Output i have
source health sparkdata_copy
LAUNCHER.MXMLC.COLLATERAL.ASSIGN # hp548srv.fr.murex.com-54039 ALIVE 0,1,0,0,1,0,0
LAUNCHERALL # hp548srv.fr.murex.com-58085 ALIVE 0,0,1,0,1,0,0
index=jmx sourcetype=jmx host="hp548srv.fr.murex.com:9080" jvmDescription="*" mbean_domain="murex"
| search source = *\=SubAgent*
| search source = *lid*
| rex field=source "^.*installationcode=(?<Launcher>.*),subagent-name=(?<Machine_Name>.*)"
| table _time source Launcher Machine_Name
| eval source = Launcher." # ".Machine_Name
| stats sparkline(count, 10s) AS sparkline by source
| map search="| makeresults | eval sparkdata=$sparkline$ | eval source=$source$"
| rex field=sparkdata mode=sed "s/^[^,]+,//" | eval sparkdata_copy=sparkdata
| eval sparkdata=split(sparkdata, ",")
| eval mvcount=mvcount(sparkdata)
| eval firstHalf=mvindex(sparkdata, 0, floor(mvcount/2))
| eval firstHalfCountNonZero = mvcount(mvfilter(firstHalf>0))
| eval lastHalf=mvindex(sparkdata, ceiling(mvcount/2), mvcount)
| eval lastHalfCountNonZero = mvcount(mvfilter(lastHalf>0))
| eval health=case((firstHalfCountNonZero==0 AND lastHalfCountNonZero==0), "DEAD",
(firstHalfCountNonZero==0 AND lastHalfCountNonZero>0), "Starting",
(firstHalfCountNonZero>0 AND lastHalfCountNonZero==0), "Stopping",
true(), "ALIVE")
| table source health sparkdata_copy
... View more