28 Oct 2025 05:17 AM
I've created a metric to display the count of process running in host
builtin:pgi.availability.state:filter(and(or(in("dt.entity.process_group",entitySelector("type(process_group),entityName(~"procesname~")"))))):splitBy("availability.state"):count:sort(value(avg,descending)):limit(20):default(0.0)
This query displays the count if default was not added, but if default was added it displays the process availability metric instead of count.
How can I see the count of running process and add a default value 0 if process is not running?
28 Oct 2025 06:01 AM
@Arunkumarbnp Are you looking for the count of process running on host or the count of available and unavailable process on a host?
28 Oct 2025 06:19 AM - edited 28 Oct 2025 06:22 AM
yes, Thanks for your reply @p_devulapalli
I'm trying to display metric as single value or table
while using single value type, the metric is empty if no process is running, so I tried adding default value as 0
but if I add default value, the query displays the process availability metric instead of count of process running