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: Metric ingestion protocol — Dynatrace Docs
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: WMI data source tutorial — Dynatrace Docs.
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.
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.