My usecase is as follows:
I have a network resource that I need to track the usage of.
Every usage of the resource is recorded into a separate document with the total usage
@timestamp -> End of usage
@id -> resource Id
@usage_duration -> time in minutes
What I need is a visualization that shows the percentage of the network resource utilization compared to the time range chosen in the timepicker
Assuming the usage reconds
Oct 20, 2022 @ 00:00:00.981 - 1 - 480
Oct 19, 2022 @ 00:00:00.981 - 1 - 720
Oct 18, 2022 @ 00:00:00.981 - 1 - 420
Oct 17, 2022 @ 00:00:00.981 - 1 - 720
Oct 16, 2022 @ 00:00:00.981 - 1 - 360
Oct 15, 2022 @ 00:00:00.981 - 1 - 900
Oct 14, 2022 @ 00:00:00.981 - 1 -1440
Oct 20, 2022 @ 00:00:00.981 - 2 - 240
Oct 19, 2022 @ 00:00:00.981 - 2 - 360
Oct 18, 2022 @ 00:00:00.981 - 2 - 210
Oct 17, 2022 @ 00:00:00.981 - 2 - 360
Oct 16, 2022 @ 00:00:00.981 - 2 - 180
Oct 15, 2022 @ 00:00:00.981 - 2 - 450
Oct 14, 2022 @ 00:00:00.981 - 2 - 720
If I pick the resource Id on the x-axis and the percentage usage on the y-axis, I should be able to see the Percentage of usage of the resource for the time range that is picked in the timepicker
Ex: If the timepicker has the range Oct 14, 2022 @ 00:00:00.981 to Oct 20, 2022 @ 00:00:00.981, then it should show the 50% for Id 1 and 25% for Id 2
Sum(@duration) in this case will be 5040 and 2520 for Id 1 and Id 2 respectively. Dividing with the number of minutes in the time range (7 days = 7 * 24 * 60 = 10080), the percentages are 50 and 25 respectively
Similarly, If the timepicker has the range Oct 7, 2022 @ 00:00:00.981 to Oct 20, 2022 @ 00:00:00.981, then it should show the 25% for Id 1 and 12.5% for Id 2
Sum(@duration) in this case will be 5040 and 2520 for Id 1 and Id 2 respectively. Dividing with the number of minutes in the time range (14 days = 14 * 24 * 60 = 20160), the percentages are 25 and 12.5 respectively