Open Q&A
If there's no good subforum for your question - ask it here!
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I see the count of running process and add a default value 0 if process is not running?

Arunkumarbnp
Helper

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?

2 REPLIES 2

p_devulapalli
Leader

@Arunkumarbnp Are you looking for the count of process running on host or the count of available and unavailable process on a host?

Phani Devulapalli

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

Featured Posts