08 Jul 2026 08:23 PM - edited 08 Jul 2026 08:24 PM
timeseries terminal_up = max(httpcheck.status),
filter: { host.type == "terminal" and http.status_class == "2xx" },
by: { hostName = host.name, storeId = store.name },
interval: 1m
| fieldsAdd is_up = if(terminal_up[] > 0, 1, else: 0)
| fieldsAdd availability_pct = arrayAvg(is_up) * 100
| fields storeId, hostName, availability_pct
IN THIS QUERY I WANT TO CALCULATE AVAILABILITY PERC ONLY CONSIDERING DATA BETWEEN 6AM ET TO 11PM ET HOW TO DO IT , PLEASE HELPPPPPPPPPPPPPPP
09 Jul 2026 08:55 AM - edited 09 Jul 2026 08:56 AM
Hi,
You can try to add:
from:toTimestamp("T06:00:00"), to:toTimestamp("T23:00:00")It means:
timeseries terminal_up = max(httpcheck.status), from:toTimestamp("T06:00:00"), to:toTimestamp("T23:00:00"),
filter: { host.type == "terminal" and http.status_class == "2xx" },
by: { hostName = host.name, storeId = store.name },
interval: 1m
| fieldsAdd is_up = if(terminal_up[] > 0, 1, else: 0)
| fieldsAdd availability_pct = arrayAvg(is_up) * 100
| fields storeId, hostName, availability_pctBest regards
Featured Posts