13 Sep 2022 11:48 AM - last edited on 13 Sep 2022 01:32 PM by Ana_Kuzmenchuk
We have a custom WMI extension working, just have a simple question:
Generally, metrics in Dynatrace can be associated with hosts, processes, or more by assigning values to Dynatrace reserved dimensions, as described in the doc of the metrics ingestion protocol: https://www.dynatrace.com/support/help/extend-dynatrace/extend-metrics/reference/metric-ingestion-pr...
Now, metrics collected using the WMI extension seem to be associated with the host by default. We wish to associate some metrics with a process. This is not documented in the docs for WMI: dynatrace.com/support/help/extend-dynatrace/extensions20/data-sources/wmi-extensions/wmi-tutorial.
How can we create this topology?
Solved! Go to Solution.
30 Nov 2022 10:25 AM - edited 30 Nov 2022 10:28 AM
You've got a couple of options here. These are the two easiest ones as they are programmatic.
1: If you can get the process ID through a call, you can add that as a dimension. It'd then be translated to the process instance id and process group id.
For example, this metric line:
myMetric dt.process.id=12345 1
would become
myMetric dt.entity.process_group_instance=PROCESS_GROUP_INSTANCE-D337020E5CAE4F0F,dt.entity.process_group=PROCESS_GROUP-D337020E5CAE4F0D 1
Example yaml:
wmi: - group: WMIClasses interval: 10~ featureSet: basic subgroups: - subgroup: ZoomCamera wmiNamespace: root\cimv2 query: SELECT Name, Status, PID FROM Win32_PnPEntity WHERE PNPClass='Camera' dimensions: - key: camera.name value: Name - key: camera.status value: Status - key: dt.process.id value: PID
2: If you can define the process detection rule in the same yaml, you can reference that in the wmi section to automatically add the process instance id and process group id.
For example:
processes: - name: ZoomTech detection: - id: zoomtech processGroupName: Zoom rules: - property: executable condition: "$prefix(Zoom)" wmi: - group: WMIClasses interval: 10~ featureSet: basic subgroups: - subgroup: ZoomCamera wmiNamespace: root\cimv2 query: SELECT Name, Status FROM Win32_PnPEntity WHERE PNPClass='Camera' dimensions: - key: camera.name value: Name - key: camera.status value: Status - key: dt.techrule.id value: const:zoomtech