29 Nov 2022 07:15 AM
Team,
As we are trying to built the tabulating information to split the process count based on the hosts where we unable to find the exact metric to capture it. Though we have tried to build the code also in data explorer. Please advise us on this.
Thanks
29 Nov 2022 12:15 PM - edited 29 Nov 2022 12:15 PM
You need to use the count aggregation and just a generic process group instance-based metric with the parents transformation:
builtin:tech.generic.cpu.usage
:filter(and(or(in("dt.entity.process_group_instance",entitySelector("type(process_group_instance),entityName.startsWith(~"Dummy~")")))))
:parents
:splitBy("dt.entity.host")
:count
:auto
:sort(value(avg,descending))
:limit(100)
This will filter the metric for processes with a given name, then with :parents you add a new dimension (host) and then you can split by it.
This will only work if you see multiple process group instances, e.g.
or on the classic page:
If multiple OS processes are in a single process group instance, then it's not possible to display that on dashboard.
29 Nov 2022 12:35 PM
Thanks @Julius_Loman,
If the CPU Usage is the metrics, yes this will be feasible. Will it be applicable for the Process count as per the process group. Tried with that, still it got failed.
builtin:tech.generic.count:splitBy():sort(value(auto,descending)):limit(100)
Where the dt.entity.host was not supported for filter.
its a single OS process in Process group.
Looking for your advise.
Thanks,
Aravindhan Vellaichamy
29 Nov 2022 12:48 PM
My solution will provide you with the count of process group instances per host as I used count aggregation.
29 Nov 2022 01:37 PM
Hi Julius,
Understand that the process group-based CPU usage has been plotted from the given script. But the lookout is, "Process count per process-group" split by "Host".
Will it be possible
Thanks,
Aravindhan Vellaichamy
29 Nov 2022 04:45 PM
Can you give an example of the output you want to achieve?