Process group availability

How can I create a metric on data explorer for process group availabilty spliting by process group?

hello @kobkob you can use builtin:pgi.availability

Hi @DanielS thanks for your response.

I used it, but its not possible to split it by process group, but only by process.

In the end I want to monitor the cluster. For example if I have a service with 2 instances and 1 of them is down, I want to see 50% availability.

Thanks

Understood, do you have enabled process group availability monitoring?

I leave you the link Process group availability monitoring and alerting — Dynatrace Docs

Yes, it’s enabled.

This is not correct.

The process is not available but the process Group is available because the second one is handling the load.

I suggest you to split the Graph by process (and filter if needed), with this way you can know if the process i with 0% availability or not.

Hi @kobkob 
I think its a great idea of Malaik  and DanielS

Alternative 1 : in that way you can use this Metric Selector

builtin:pgi.availability:filter(and(or(in("dt.entity.process_group_instance",entitySelector("type(process_group_instance),fromRelationship.isInstanceOf(type(PROCESS_GROUP),entityName.equals(~"bin/npm-cli.js (npm) ms-insurance-bs-*~"))"))))):splitBy("dt.entity.process_group_instance"):sort(value(auto,descending)):limit(20)

I have found another metric that can be much more useful for you, however it is based on the count of instances (Not exactly on their availability %). In my personal opinion I think this metric is more useful, the reason is because the “Process group availability monitoring” rules are also based on the number of Processes or process instances to alert.

The great thing about this metric is that it has the Splt by “Process Group”.

Alternative 2 :   Use the metric “Process count per process group”   ( builtin:tech.generic.count )

builtin:tech.generic.count:filter(and(or(in("dt.entity.process_group",entitySelector("type(process_group),entityName.equals(~"ms-bff-crm~")"))))):splitBy("dt.entity.process_group"):sort(value(auto,descending)):limit(20)

I’m sure this will be very helpful :flexed_biceps::blush:

Additionally if you want process group availability metric without explicitly specifying the group (for example for a Management zone):
For single value charts in Data Explorer such as table:

(100*(builtin:pgi.availability.state:filter(eq("availability.state",available)):splitBy("dt.entity.process_group"):count 

/ builtin:pgi.availability.state:filter(eq("availability.state",available)):splitBy("dt.entity.process_group"):count) 

:default(0)):fold(avg):setUnit(Percent)

For charts just remove the :fold(avg) Using the fold aggregation in Data Explorer won’t work properly due to way how Dynatrace queries single value charts (infinite resolution), so use :fold in such cases.