<?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: retrieve detected log sources given a host group in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/retrieve-detected-log-sources-given-a-host-group/m-p/282839#M2396</link>
    <description>&lt;P&gt;Hi, does this query help you?&lt;BR /&gt;You can filter by host group name and you get a list of the unique log sources.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch logs,  scanLimitGBytes:10
| fieldsAdd entityName(dt.entity.host)
| fieldsAdd entityName(dt.entity.host_group)
| filter matchesValue(dt.entity.host_group.name, "&amp;lt;HOST-GROUP-NAME&amp;gt;")
| summarize uniqueSources = collectDistinct(log.source)
| expand uniqueSources
| filterOut isNull(uniqueSources)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Aug 2025 17:22:00 GMT</pubDate>
    <dc:creator>angelalanis</dc:creator>
    <dc:date>2025-08-01T17:22:00Z</dc:date>
    <item>
      <title>retrieve detected log sources given a host group</title>
      <link>https://community.dynatrace.com/t5/DQL/retrieve-detected-log-sources-given-a-host-group/m-p/282741#M2394</link>
      <description>&lt;P&gt;which DQL query lets you retrieve all discovered log sources (ingested or not) for a given host group?&lt;/P&gt;
&lt;P&gt;I am able to see these log sources in logsourcestate under&amp;nbsp;dt.entity.process_group_instance, but not able to filter them, it always comes up null...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2025 06:59:43 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/retrieve-detected-log-sources-given-a-host-group/m-p/282741#M2394</guid>
      <dc:creator>imrj99</dc:creator>
      <dc:date>2025-08-01T06:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve detected log sources given a host group</title>
      <link>https://community.dynatrace.com/t5/DQL/retrieve-detected-log-sources-given-a-host-group/m-p/282839#M2396</link>
      <description>&lt;P&gt;Hi, does this query help you?&lt;BR /&gt;You can filter by host group name and you get a list of the unique log sources.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch logs,  scanLimitGBytes:10
| fieldsAdd entityName(dt.entity.host)
| fieldsAdd entityName(dt.entity.host_group)
| filter matchesValue(dt.entity.host_group.name, "&amp;lt;HOST-GROUP-NAME&amp;gt;")
| summarize uniqueSources = collectDistinct(log.source)
| expand uniqueSources
| filterOut isNull(uniqueSources)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2025 17:22:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/retrieve-detected-log-sources-given-a-host-group/m-p/282839#M2396</guid>
      <dc:creator>angelalanis</dc:creator>
      <dc:date>2025-08-01T17:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve detected log sources given a host group</title>
      <link>https://community.dynatrace.com/t5/DQL/retrieve-detected-log-sources-given-a-host-group/m-p/282843#M2398</link>
      <description>&lt;P&gt;unfortunately no....it only retrieves those that there is log data for (ie. already being ingested), but not for all detected log sources, even if not ingested..&lt;/P&gt;&lt;P&gt;using the query below I can find all the detected log sources in "dt.entity.process_group_instance" under "logSourceState", but they each come back as columns, which makes it very hard to filter, not sure why this is&lt;/P&gt;&lt;P&gt;&lt;EM&gt;fetch dt.entity.process_group_instance, from:now() - 5m&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;| fieldsAdd logSourceState = logSourceState&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;| filter isNotNull(logSourceState)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;| limit 200&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2025 17:53:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/retrieve-detected-log-sources-given-a-host-group/m-p/282843#M2398</guid>
      <dc:creator>imrj99</dc:creator>
      <dc:date>2025-08-01T17:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve detected log sources given a host group</title>
      <link>https://community.dynatrace.com/t5/DQL/retrieve-detected-log-sources-given-a-host-group/m-p/282849#M2399</link>
      <description>&lt;P&gt;I see what you mean with coming back as columns, I found this workaround, hopefully it helps you.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.entity.host
| fields id, logSourceState, hostGroupName
| filter matchesValue(hostGroupName, "extensions")
| filterOut isNull(logSourceState)
| fieldsAdd sLogSourceState = toString(logSourceState)
| fieldsAdd sLogSourceState = substring(sLogSourceState, from:1, to: stringLength(sLogSourceState)-1)
| fieldsAdd sLogSourceState = splitString(sLogSourceState,",")
| expand sLogSourceState
| fieldsAdd sLogSourceState=trim(sLogSourceState)
| parse sLogSourceState, "'\"' LD:file '\":\"storageStatus:' LD:state '\"'"
| fields id, file, state&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 01 Aug 2025 18:42:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/retrieve-detected-log-sources-given-a-host-group/m-p/282849#M2399</guid>
      <dc:creator>angelalanis</dc:creator>
      <dc:date>2025-08-01T18:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve detected log sources given a host group</title>
      <link>https://community.dynatrace.com/t5/DQL/retrieve-detected-log-sources-given-a-host-group/m-p/282853#M2400</link>
      <description>&lt;P&gt;it didnt, got no results...... but i think I see where you are going,&amp;nbsp; I changed the 1st line&amp;nbsp; to dt.entity.proceess_group_instance and commented out lines 2,3 and I do get all the log sources in a row format!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess from this I need to filter for specific hosts by joining which process group instance runs in which host group?&amp;nbsp; so close!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;fetch dt.entity.process_group_instance&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;//| fields id, logSourceState, hostGroupName&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;//| filter matchesValue(hostGroupName, "HOSTGROUPNAME")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;| filterOut isNull(logSourceState)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;| fieldsAdd sLogSourceState = toString(logSourceState)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;| fieldsAdd sLogSourceState = substring(sLogSourceState, from:1, to: stringLength(sLogSourceState)-1)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;| fieldsAdd sLogSourceState = splitString(sLogSourceState,",")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;| expand sLogSourceState&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;| fieldsAdd sLogSourceState=trim(sLogSourceState)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;| parse sLogSourceState, "'\"' LD:file '\":\"storageStatus:' LD:state '\"'"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;| fields id, file, state&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2025 19:28:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/retrieve-detected-log-sources-given-a-host-group/m-p/282853#M2400</guid>
      <dc:creator>imrj99</dc:creator>
      <dc:date>2025-08-01T19:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve detected log sources given a host group</title>
      <link>https://community.dynatrace.com/t5/DQL/retrieve-detected-log-sources-given-a-host-group/m-p/282866#M2401</link>
      <description>&lt;P&gt;Modified your query a bit to get the hostGroup entity attribute using the `belongs_to` relationship from the process_group_instance&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.entity.process_group_instance
| filterOut isNull(logSourceState)
| fieldsAdd sLogSourceState = toString(logSourceState)
| fieldsAdd sLogSourceState = substring(sLogSourceState, from:1, to: stringLength(sLogSourceState)-1)
| fieldsAdd sLogSourceState = splitString(sLogSourceState,",")
| expand sLogSourceState
| fieldsAdd sLogSourceState=trim(sLogSourceState)
| parse sLogSourceState, "'\"' LD:file '\":\"storageStatus:' LD:state '\"'"
| fieldsAdd host=belongs_to[dt.entity.host]
| fieldsAdd hostGroup=entityAttr(host, type:"dt.entity.host", "hostGroupName")
| fields id, file, state, hostGroup&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2025 21:14:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/retrieve-detected-log-sources-given-a-host-group/m-p/282866#M2401</guid>
      <dc:creator>TracingMySanity</dc:creator>
      <dc:date>2025-08-01T21:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve detected log sources given a host group</title>
      <link>https://community.dynatrace.com/t5/DQL/retrieve-detected-log-sources-given-a-host-group/m-p/282874#M2402</link>
      <description>&lt;P&gt;awesome!&amp;nbsp; i just need to be able to filter on a specific host group now, i think i could figure that out (maybe!!) lol&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2025 22:00:38 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/retrieve-detected-log-sources-given-a-host-group/m-p/282874#M2402</guid>
      <dc:creator>imrj99</dc:creator>
      <dc:date>2025-08-01T22:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve detected log sources given a host group</title>
      <link>https://community.dynatrace.com/t5/DQL/retrieve-detected-log-sources-given-a-host-group/m-p/285353#M2549</link>
      <description>&lt;P&gt;Hello, i have the same message no log for process instance, i try the dql but still is empty, which option i have to enable for see process instance logs, thank you&lt;/P&gt;</description>
      <pubDate>Wed, 03 Sep 2025 17:36:19 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/retrieve-detected-log-sources-given-a-host-group/m-p/285353#M2549</guid>
      <dc:creator>marusla</dc:creator>
      <dc:date>2025-09-03T17:36:19Z</dc:date>
    </item>
  </channel>
</rss>

