# Extension 2.0 WMI collect string

**URL:** <https://community.dynatrace.com/t/extension-2-0-wmi-collect-string/34244>\
**Category:** Extensions\
**Tags:** wmi, extensions\
**Created:** [February 23, 2022, 9:37am UTC](https://community.dynatrace.com/t/extension-2-0-wmi-collect-string/34244 "2022-02-23T09:37:27Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [February 23, 2022, 9:37am UTC](https://community.dynatrace.com/t/extension-2-0-wmi-collect-string/34244/1 "2022-02-23T09:37:27Z")

</div>

Hello,

Would this be an improvement (RFE), or to far fetched?

Make possible for the WMI 2.0 extension to also collect strings and or arrays. This would make Dynatrace also a great inventory tool. So collect every 60 minutes like below,

 ![henk_stobbe_0-1645608947764.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/4/a46c7686a0c9c29f89b57ed5da196dbc7b16f4cd.png)

Just a thought, please comment (-;

KR Henk

---

<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:** [February 23, 2022, 9:41am UTC](https://community.dynatrace.com/t/extension-2-0-wmi-collect-string/34244/2 "2022-02-23T09:41:08Z")

</div>

It wouldn’t fit in our metrics database as that one expects a number. It could potentially go into the log ingest though?

[@dglugla](https://community.dynatrace.com/user/27556)&nbsp;, raise an RFE or is something similar already going to be possible based on what you’ve got planned?

---

<div class="post-metadata">

**Author:** ![dglugla](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dglugla/32/14492_2.png) [@dglugla](https://community.dynatrace.com/u/dglugla)\
**Post date:** [February 23, 2022, 10:13am UTC](https://community.dynatrace.com/t/extension-2-0-wmi-collect-string/34244/3 "2022-02-23T10:13:08Z")

</div>

If the data can be fetched via a standard WMI query - we can already store it via log ingest. See example usage in MS Exchange extension.

But I would also ask if the data is more an event, or rather entity attribute? For example: BIOS seems to fit more like an attribute of a host. While it can be reported either as an event, or a metric dimension (not a value though), it all comes down to where should it be presented: as a log line, or host entity attribute?

QFEs on the other hand are a great example of log events.

In any case - WMI exts already supports any of those.

Sample YAML section:

```javascript
- subgroup: ExchangeLogEvents
        featureSet: events
        interval:
          minutes: 1
        query: SELECT SourceName, EventCode, RecordNumber, CategoryString, Message, Type, TimeGenerated FROM Win32_NTLogEvent WHERE Logfile='[MS]Exchange Management' OR SourceName LIKE '%[MS]Exchange%'
        type: logfileEvent
        dimensions:
          - key: source
            value: column:SourceName
          - key: dt.event.key
            value: column:EventCode
          - key: category
            value: column:CategoryString
          - key: content
            value: column:Message
          - key: status
            value: column:Type
          - key: recordno
            value: column:RecordNumber
          - key: timestamp
            value: $timestamp(const:ntlog, column:TimeGenerated)

```

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [February 23, 2022, 10:29am UTC](https://community.dynatrace.com/t/extension-2-0-wmi-collect-string/34244/4 "2022-02-23T10:29:11Z")

</div>

Both, thanks for your reply, small question, what are QFE’s?

---

<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:** [February 23, 2022, 10:30am UTC](https://community.dynatrace.com/t/extension-2-0-wmi-collect-string/34244/5 "2022-02-23T10:30:38Z")

</div>

The second command you pasted into your question? 🙂

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [February 23, 2022, 10:35am UTC](https://community.dynatrace.com/t/extension-2-0-wmi-collect-string/34244/6 "2022-02-23T10:35:06Z")

</div>

Oeps… I did it again:disappointed\_face:

---

<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:** [February 23, 2022, 10:38am UTC](https://community.dynatrace.com/t/extension-2-0-wmi-collect-string/34244/7 "2022-02-23T10:38:55Z")

</div>

Yes, stop playing with my heart&nbsp;:joy:

---

<div class="post-metadata">

**Author:** ![tarjei](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tarjei/32/39196_2.png) [@tarjei](https://community.dynatrace.com/u/tarjei)\
**Post date:** [September 2, 2022, 12:30pm UTC](https://community.dynatrace.com/t/extension-2-0-wmi-collect-string/34244/8 "2022-09-02T12:30:50Z")

</div>

Do you have more examples for Event log monitoring using WMI Extension 2.0?

How would you store the latest position read in the eventlog? Or dont you do that?

Second, how would you alert on something that only occurs once?

---

<div class="post-metadata">

**Author:** ![dglugla](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dglugla/32/14492_2.png) [@dglugla](https://community.dynatrace.com/u/dglugla)\
**Post date:** [October 18, 2022, 7:19am UTC](https://community.dynatrace.com/t/extension-2-0-wmi-collect-string/34244/9 "2022-10-18T07:19:30Z")

</div>

[@tarjei](https://community.dynatrace.com/user/12960)&nbsp;you don’t need to do that. The WMI DataSource fetches only the entries that were written to the eventlog since the previous read.

Regarding alerting on single occurrence: what do you mean by that? If that’s about a single occurrence in a single fetch (1 minute period) then you just simply configure an alert on that event. In other cases (single occurrence over a longer time period) you may introduce your own metric extracted of that type of en event and set up an alert on that metric.

The MS Exchange extension is currently the only one that leverages that capability, but if you see a potential in another extension - please share the details and I’m sure we’ll be able to help.

---

<div class="post-metadata">

**Author:** ![tarjei](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tarjei/32/39196_2.png) [@tarjei](https://community.dynatrace.com/u/tarjei)\
**Post date:** [November 2, 2022, 3:08pm UTC](https://community.dynatrace.com/t/extension-2-0-wmi-collect-string/34244/10 "2022-11-02T15:08:18Z")

</div>

I was thinking where there is an alert where a “Backup job failed” or a disk event id 55. Cases where there might be one event, and no repeats.&nbsp;  
How do we configure this alert on one event?

---

<div class="post-metadata">

**Author:** ![tarjei](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tarjei/32/39196_2.png) [@tarjei](https://community.dynatrace.com/u/tarjei)\
**Post date:** [November 28, 2022, 12:28pm UTC](https://community.dynatrace.com/t/extension-2-0-wmi-collect-string/34244/11 "2022-11-28T12:28:01Z")

</div>

Hi [@dglugla](https://community.dynatrace.com/user/27556)! Any chance that this functionality will be documented soon?  
We are trying to implement this in our plugin, but it is behaving strangely. And without any documentation it is quite difficult.

---

<div class="post-metadata">

**Author:** ![dglugla](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dglugla/32/14492_2.png) [@dglugla](https://community.dynatrace.com/u/dglugla)\
**Post date:** [November 29, 2022, 2:05pm UTC](https://community.dynatrace.com/t/extension-2-0-wmi-collect-string/34244/12 "2022-11-29T14:05:48Z")

</div>

Let me ask the doc team for that (FYI: [@jaroslaw\_orlows](https://community.dynatrace.com/user/21613))

---

<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:** [May 27, 2025, 6:33pm UTC](https://community.dynatrace.com/t/extension-2-0-wmi-collect-string/34244/13 "2025-05-27T18:33:19Z")

</div>

So wait, the WMI Extension can change WMI Queries to logs?&nbsp; Where is this in the documentation?&nbsp; I don’t see it anywhere.

If so, this&nbsp;_really_&nbsp;needs to be documented (or documented better if it is hidden in there somewhere) as this is kind of a big deal.

And like, what other extensions can create log entries like this?&nbsp; I know the SQL one can do that (again, I don’t believe that is documented either.&nbsp; I discovered it via the Custom Extensions Creator, but it isn’t in the actual SQL Extensions 2.0 documentation that I could find…).
