This what you need:
| makeresults
| eval _raw = "_time, Last_Received, Minutes_Ago, Panel, Status
03/09/2020 18:30:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-1, normal
03/09/2020 18:30:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-2, degraded
03/09/2020 18:30:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-3, normal
03/09/2020 18:30:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-4, degraded
03/09/2020 18:30:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-5, normal
03/09/2020 18:30:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-6, normal
03/09/2020 18:30:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-7, normal
03/09/2020 18:30:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-8, normal
03/09/2020 18:30:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-9, normal
03/09/2020 18:30:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-10, normal
03/09/2020 18:30:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-11, normal
03/09/2020 18:25:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-1, normal
03/09/2020 18:25:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-2, normal
03/09/2020 18:25:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-3, normal
03/09/2020 18:25:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-4, degraded
03/09/2020 18:25:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-5, normal
03/09/2020 18:25:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-6, degraded
03/09/2020 18:25:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-7, normal
03/09/2020 18:25:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-8, normal
03/09/2020 18:25:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-9, degraded
03/09/2020 18:25:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-10, normal
03/09/2020 18:25:00 +0000, 2020-03-09 18:10:20 GMT, 20, Panel-11, normal"
| multikv forceheader=1
| table _time, Last_Received, Minutes_Ago, Panel, Status
| streamstats count by Panel
| where count <= 2
`comment("The above streamstats and where command is so that include only the last two results")`
| stats list(Status) as status by Panel
| eval state = case(match(mvindex(status,0), "normal") AND match(mvindex(status,1), "normal"), "System status has not changed", match(mvindex(status, 0), "normal"), "System has returned to normal", match(mvindex(status, 0), "degraded"), "System is degraded")
Use the list(Status) to get them in the order they arrived
... View more