Availability, through Process Groups or by Services

Trying to take availability of particular management zones but we cannot explicitly do that, 
so i have this api   builtin:pgi.availability:splitBy(“dt.entity.process_group_instance”):sort(value(auto,descending)):limit(2) 
But this api will fetch all the process groups so, i what to identify those group with a management zone name, 
LIke : list mzname(selecting one mzname) → its process group → availability of the process 
Any suggestions for api’s  or can we do the same with services.

Hi @bs43 yes, you can do it selecting the MZ filter

or you can filter by MZ in advanced mode:

builtin:pgi.availability
:filter(in("dt.entity.process_group_instance", entitySelector("type(~"PROCESS_GROUP_INSTANCE~"),mzName(~"YourMZName~")")))
:splitBy("dt.entity.process_group_instance")
:sort(value(auto,descending))
:limit(2)

Keep in mind that what we are using in the data explorer are metrics

Hi @DanielS, Got availability status for processes segregated by mznames.
Thanks.