from the below query, i am running for 2 to 3 and posted the output and ran again same query from 3 to 4 and posted the output.
i want a query where i can compare pervious hour(2 to 3 data) with (3 to 4) data and i want to calculate the difference percentage
|mstats sum(transaction) as Trans where index=host-metrics service=login application IN(app1, app2, app3, app4) span=1h by application
output:
02:00 to 03:00 hours data
_time | application | Trans |
2022-01-22 02:00 | app1 | 3456.000000 |
2022-01-22 02:00 | app2 | 5632.000000 |
2022-01-22 02:00 | app3 | 5643.000000 |
2022-01-22 02:00 | app4 | 16543.00000 |
03:00 to 04:00 hours data output:
_time | application | Trans |
2022-01-22 03:00 | app1 | 8753.000000 |
2022-01-22 03:00 | app2 | 342.000000 |
2022-01-22 03:00 | app3 | 87653.000000 |
2022-01-22 03:00 | app4 | 8912.00000 |
can anyone help on this??