# How to enumerate WMI extension dimensions?

**URL:** <https://community.dynatrace.com/t/how-to-enumerate-wmi-extension-dimensions/52225>\
**Category:** Extensions\
**Tags:** wmi, extensions\
**Created:** [June 24, 2025, 1:31pm UTC](https://community.dynatrace.com/t/how-to-enumerate-wmi-extension-dimensions/52225 "2025-06-24T13:31:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![36Krazyfists](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/36krazyfists/32/37434_2.png) [@36Krazyfists](https://community.dynatrace.com/u/36Krazyfists)\
**Post date:** [June 24, 2025, 1:31pm UTC](https://community.dynatrace.com/t/how-to-enumerate-wmi-extension-dimensions/52225/1 "2025-06-24T13:31:27Z")

</div>

A lot of WMI state and status values are reported as numbers and there is no value that has the enumerated description of those state values.

So, how can we display those states as the actual text description found in the WMI Class documentation?

An example is PowerState found in the Win32\_ComputerSystem class.

0 = Unknown

1 = Full Power

2 = Low Power Mode

etc…

I know how to setup an enumeration in the extensions.yaml for a variable, but how do you use an enum to convert the number that the WMI query returns into a text value that I can use as a dimension for my metrics?

Are there any examples of this in any WMI extensions?&nbsp; I’ve looked in several (SQL, Exchange, and Remote Host) and not seen it done anywhere.

---

<div class="post-metadata">

**Author:** ![Akhil-Jayendran](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/akhil-jayendran/32/153_2.png) [@Akhil-Jayendran](https://community.dynatrace.com/u/Akhil-Jayendran)\
**Post date:** [June 24, 2025, 4:27pm UTC](https://community.dynatrace.com/t/how-to-enumerate-wmi-extension-dimensions/52225/2 "2025-06-24T16:27:36Z")

</div>

Hi&nbsp;[@36Krazyfists](https://community.dynatrace.com/user/41155)&nbsp;,

I seriously doubt that it’s possible using the WMI extension, as extensions usually return metrics. Can we use DQL to convert those values into meaningful text? Will that work here ?

---

<div class="post-metadata">

**Author:** ![36Krazyfists](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/36krazyfists/32/37434_2.png) [@36Krazyfists](https://community.dynatrace.com/u/36Krazyfists)\
**Post date:** [June 25, 2025, 1:58pm UTC](https://community.dynatrace.com/t/how-to-enumerate-wmi-extension-dimensions/52225/3 "2025-06-25T13:58:34Z")

</div>

Well, extensions do a LOT more than just return metrics.&nbsp; &nbsp;Plus, SNMP extensions can enumerate values when the MIB file for the corresponding OID’s are loaded on the ActiveGates running the extension.

And yes, it could be done via DQL, but that would mean you’d have to write that query every time you want to dashboard or alert on that data.&nbsp; That would be a huge pain.

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [June 25, 2025, 2:45pm UTC](https://community.dynatrace.com/t/how-to-enumerate-wmi-extension-dimensions/52225/4 "2025-06-25T14:45:12Z")

</div>

I think it makes more sense to do it in OpenPipeline than in DQL. It is currently not possible to do it in the WMI data source. You can raise a product idea for it.

---

<div class="post-metadata">

**Author:** ![36Krazyfists](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/36krazyfists/32/37434_2.png) [@36Krazyfists](https://community.dynatrace.com/u/36Krazyfists)\
**Post date:** [June 25, 2025, 6:30pm UTC](https://community.dynatrace.com/t/how-to-enumerate-wmi-extension-dimensions/52225/5 "2025-06-25T18:30:01Z")

</div>

These are dimensions I’d like to enumerate on metrics.&nbsp; OpenPipeline doesn’t apply here.&nbsp; At least not at this time (although I did here that metrics were going to be added to OpenPipeline parsing eventually).

Regardless, I would argue that it makes much more sense to do that in the extension.yaml file, as there is already an ability to declare enum objects for variables and it would be much more convenient to declare that as a package deal bundled in with the extension config.

They just need to add the ability to declare enums for dimensions so that any numeric value in a dimension can be converted to the matching string using the mapping of a corresponding enum object.
