Michael Brandt Lassen on Tue, 02 May 2017 15:21:00

Let's say I have some test script that runs on a schedule, say every 30s.

If the test passes, the script logs event A, if the test fails it logs event B.

So in Azure Log Analytics I'll have the event data like the first two columns of this table

Time Event Corresponding State
0 A Available
30 A Available
60 B Unavailable
90 B Unavailable
120 A Available
150 A Available

Now I'd like to do a Azure Log Analytics query that can give me the availability statistics (up-time) based on this data. How can I do this?



Stanislav Zhelyazkov on Mon, 10 Jul 2017 08:04:25


Can you have a look at the proposed solution here:

May be it will help you.