<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Querying and filtering MSFT_NetTCPConnection through WMI with extensions v2 in Extensions</title>
    <link>https://community.dynatrace.com/t5/Extensions/Querying-and-filtering-MSFT-NetTCPConnection-through-WMI-with/m-p/231647#M3771</link>
    <description>&lt;P&gt;You could make the query more manageable by trimming down the query down to just the required properties with something like:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Get-WmiObject -Query "SELECT Name, OwningProcess, LocalPort FROM MSFT_NetTCPConnection where localport=443" -namespace "root\StandardCIMV2"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;But unfortunately piping to Group-Object to get a total is not supported by the data source.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you looked at the metrics provided by:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Get-WmiObject -query "SELECT ConnectionsActive, ConnectionsEstablished, ConnectionFailures, ConnectionsPassive, ConnectionsReset FROM Win32_PerfFormattedData_Tcpip_TCPv4"&lt;/LI-CODE&gt;&lt;P&gt;They may not be fine grain enough for what you need though. If they work, they are counter metrics so you need to handle them as such:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;metrics:
    - key: com.dynatrace.extension.host-observability.network.tcp.connections.active
      value: column:ConnectionsActive
      type: count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2023 16:14:32 GMT</pubDate>
    <dc:creator>ben_davidson</dc:creator>
    <dc:date>2023-12-12T16:14:32Z</dc:date>
    <item>
      <title>Querying and filtering MSFT_NetTCPConnection through WMI with extensions v2</title>
      <link>https://community.dynatrace.com/t5/Extensions/Querying-and-filtering-MSFT-NetTCPConnection-through-WMI-with/m-p/222453#M3368</link>
      <description>&lt;P&gt;Running&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Get-WmiObject -Query "SELECT * FROM MSFT_NetTCPConnection where localport=443" -namespace "root\StandardCIMV2"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;locally gives a list of data that is very big. I have been able to reduce it by grouping:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Get-WmiObject -Query "SELECT * FROM MSFT_NetTCPConnection where localport=443" -namespace "root\StandardCIMV2" | Group-Object LocalPort&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wondering though how can I do it efficiently with the WMI v2 extensions ?&lt;/P&gt;
&lt;P&gt;BTW, the idea is to have metrics for the number of established web connections (I'll probably filter additionally by state...).&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 14:49:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Querying-and-filtering-MSFT-NetTCPConnection-through-WMI-with/m-p/222453#M3368</guid>
      <dc:creator>AntonioSousa</dc:creator>
      <dc:date>2023-12-12T14:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Querying and filtering MSFT_NetTCPConnection through WMI with extensions v2</title>
      <link>https://community.dynatrace.com/t5/Extensions/Querying-and-filtering-MSFT-NetTCPConnection-through-WMI-with/m-p/231647#M3771</link>
      <description>&lt;P&gt;You could make the query more manageable by trimming down the query down to just the required properties with something like:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Get-WmiObject -Query "SELECT Name, OwningProcess, LocalPort FROM MSFT_NetTCPConnection where localport=443" -namespace "root\StandardCIMV2"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;But unfortunately piping to Group-Object to get a total is not supported by the data source.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you looked at the metrics provided by:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Get-WmiObject -query "SELECT ConnectionsActive, ConnectionsEstablished, ConnectionFailures, ConnectionsPassive, ConnectionsReset FROM Win32_PerfFormattedData_Tcpip_TCPv4"&lt;/LI-CODE&gt;&lt;P&gt;They may not be fine grain enough for what you need though. If they work, they are counter metrics so you need to handle them as such:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;metrics:
    - key: com.dynatrace.extension.host-observability.network.tcp.connections.active
      value: column:ConnectionsActive
      type: count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 16:14:32 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Querying-and-filtering-MSFT-NetTCPConnection-through-WMI-with/m-p/231647#M3771</guid>
      <dc:creator>ben_davidson</dc:creator>
      <dc:date>2023-12-12T16:14:32Z</dc:date>
    </item>
  </channel>
</rss>

