Calculating Total Availability Per Range with cAdvisor Exporter

Hi,

I’m trying to create a panel displaying container availability percentage using the cAdvisor exporter. I believe it could be achieved by using the following formula:

count_over_time(container_last_seen{name="$service"}[$__range]) / total_per_range

However, I’m struggling to find a way to obtain the total_per_range. The scraping frequency is every 5 seconds.

For example, for a time range of 5 minutes, the total number is 60.

thanks