<?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: Fetch Database Host in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/296643#M3225</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;I am talking about all database hosts that are in Databases App. Actually what we do is manual work. We go Databases app and list hosts by name then we see all Database host names then put them in our availability DQL.&lt;BR /&gt;But I believe that there must be a&amp;nbsp; DQL code for fetching them at once.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Mar 2026 21:35:22 GMT</pubDate>
    <dc:creator>gokmen</dc:creator>
    <dc:date>2026-03-24T21:35:22Z</dc:date>
    <item>
      <title>Fetch Database Host</title>
      <link>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/296583#M3220</link>
      <description>&lt;P&gt;Hi all , we want to make an availability dashboard only for Database hosts.&lt;/P&gt;
&lt;P&gt;Is there a way of fetching only &lt;STRONG&gt;Database hosts.&lt;/STRONG&gt; So not to add a newly added host to our DQL filter every time.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2026 08:00:36 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/296583#M3220</guid>
      <dc:creator>gokmen</dc:creator>
      <dc:date>2026-03-25T08:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Database Host</title>
      <link>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/296586#M3222</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Are you talking about some specific database? SQL? Oracle? All of them?&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2026 08:03:17 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/296586#M3222</guid>
      <dc:creator>AntonPineiro</dc:creator>
      <dc:date>2026-03-24T08:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Database Host</title>
      <link>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/296643#M3225</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I am talking about all database hosts that are in Databases App. Actually what we do is manual work. We go Databases app and list hosts by name then we see all Database host names then put them in our availability DQL.&lt;BR /&gt;But I believe that there must be a&amp;nbsp; DQL code for fetching them at once.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2026 21:35:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/296643#M3225</guid>
      <dc:creator>gokmen</dc:creator>
      <dc:date>2026-03-24T21:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Database Host</title>
      <link>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/296647#M3226</link>
      <description>&lt;P&gt;I handle this for customers using automatic tagging. Basically, you create a rule to detect a process by its technology, and then use that tag to pull your host list.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example setup:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL class="lia-list-style-type-circle"&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Tag name:&lt;/STRONG&gt; Database&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Tag value:&lt;/STRONG&gt; MySQL / SQLite / MongoDB &lt;I&gt;(Optional)&lt;/I&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Rule type:&lt;/STRONG&gt; Monitored Entity&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Rule applies to:&lt;/STRONG&gt; Process Groups&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Conditions:&lt;/STRONG&gt; Technology process group equals &lt;CODE&gt;[your database tech]&lt;/CODE&gt; -&amp;gt; &lt;STRONG&gt;Apply to underlying hosts of matching process groups.&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Once set up, this happens automatically. Any new database server running that technology will get tagged right away. You can just filter by the tag to get your host list, so you never have to manually update your queries with new servers.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2026 03:12:03 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/296647#M3226</guid>
      <dc:creator>firmanprasetyo</dc:creator>
      <dc:date>2026-03-25T03:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Database Host</title>
      <link>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/296900#M3234</link>
      <description>&lt;P&gt;Hi thank you for the response.&lt;/P&gt;&lt;P&gt;I am doing the same the step as you mention here but when I hit the Display entities it brings other Hosts that are not in the Database app.. The technologies used are PostgreSQL and MSQL. For now we have 17 Database host in the Database app. But this tagging brings other brings more.&lt;/P&gt;&lt;P&gt;And so far I could not find another pattern that brings only the ones that we need.&amp;nbsp;&lt;BR /&gt;Maybe I am doing something wrong.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2026 09:57:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/296900#M3234</guid>
      <dc:creator>gokmen</dc:creator>
      <dc:date>2026-03-30T09:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Database Host</title>
      <link>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/297009#M3239</link>
      <description>&lt;P&gt;Well okay, now we have created&amp;nbsp;DQL that captures the Database host. In our case it is only PostgreSQL and MSQL.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch `dt.entity.sql:postgres_instance` 
| fieldsAdd entity.type, dt.ip_addresses, 
            vendor_icon = "postgre", 
            postgresql_entity_id = id, 
            tmp.host.id = runs_on[`dt.entity.sql:postgres_host`], 
            rds.endpoint = concat(hostname, ":", port)
 
| lookup
[fetch `dt.entity.sql:postgres_host` 
| fieldsAdd host.id = arrayFirst(same_as[`dt.entity.host`])], 
            sourceField: tmp.host.id, 
            lookupField: id, fields: {host.id}
 
| append 
[fetch `dt.entity.sql:sql_server_instance` 
| fieldsAdd entity.type, dt.ip_addresses, 
            vendor_icon = "sql-microsoft", 
            mssql_entity_id = id, 
            tmp.host.id = runs_on[`dt.entity.sql:sql_server_host`]
            ,rds.endpoint = null
            | parse entity.name, "LD ' on ' LD:hostname SPACE LD"// This line is because SQL instances dont have hostname, Ray's solution :)
 
| lookup
[fetch `dt.entity.sql:sql_server_host` 
| fieldsAdd host.id = arrayFirst(same_as[`dt.entity.host`])], 
            sourceField: tmp.host.id, 
            lookupField: id, fields: {host.id}] 
| dedup host.id&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2026 14:17:20 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/297009#M3239</guid>
      <dc:creator>gokmen</dc:creator>
      <dc:date>2026-03-31T14:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Database Host</title>
      <link>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/297042#M3241</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/77918"&gt;@gokmen&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;You could try some smartscape DQL queries:&lt;BR /&gt;&lt;BR /&gt;smartscapeNodes PROCESS&lt;BR /&gt;| filter contains(toString(process.software_technologies),"MICROSOFT_SQL_SERVER") or contains(toString(process.software_technologies),"POSTGRE_SQL")&lt;BR /&gt;| fieldsAdd hostId = references[runs_on.host]&lt;BR /&gt;| expand hostId&lt;BR /&gt;| lookup [smartscapeNodes HOST ],sourceField:hostId,lookupField:id,fields:{host=name}&lt;BR /&gt;| fields host,name,processName=dt.process_group.detected_name,technology=process.software_technologies&lt;BR /&gt;| dedup host,name,processName,technology&lt;BR /&gt;| sort host&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Alan&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2026 07:29:57 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/297042#M3241</guid>
      <dc:creator>AlanFoley</dc:creator>
      <dc:date>2026-04-01T07:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Database Host</title>
      <link>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/297138#M3246</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/41772"&gt;@AlanFoley&lt;/a&gt;&amp;nbsp; &amp;nbsp;thank you for the response.&lt;/P&gt;&lt;P&gt;Yes it seems that we all need to start working with the new command &lt;STRONG&gt;smartscapeNodes.&amp;nbsp;&lt;BR /&gt;&lt;/STRONG&gt;Somehow your query suggestion returns more than we have database hosts in the environment. (It is 17 hosts for now).&amp;nbsp;&lt;BR /&gt;Also can be an option if we can tailor it or narrow down filtering.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gokmen&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2026 15:03:28 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/297138#M3246</guid>
      <dc:creator>gokmen</dc:creator>
      <dc:date>2026-04-01T15:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Database Host</title>
      <link>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/297230#M3251</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/77918"&gt;@gokmen&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Note that this query is at the PROCESS level not HOST level so duplicates are certainly possible&lt;BR /&gt;I suggest you then use summarize&lt;/P&gt;&lt;P&gt;smartscapeNodes PROCESS&lt;BR /&gt;| filter contains(toString(process.software_technologies),"MICROSOFT_SQL_SERVER") or contains(toString(process.software_technologies),"POSTGRE_SQL")&lt;BR /&gt;| fieldsAdd technology = coalesce(&lt;BR /&gt;if(contains(toString(process.software_technologies),"MICROSOFT_SQL_SERVER"), "MICROSOFT_SQL_SERVER"),&lt;BR /&gt;if(contains(toString(process.software_technologies),"POSTGRE_SQL"), "POSTGRE_SQL"),&lt;BR /&gt;"NOMATCH")&lt;BR /&gt;| fieldsAdd hostId = references[runs_on.host]&lt;BR /&gt;| expand hostId&lt;BR /&gt;| lookup [smartscapeNodes HOST ],sourceField:hostId,lookupField:id,fields:{host=name}&lt;BR /&gt;| fields host,technology&lt;BR /&gt;| summarize count=count(),by:{host,technology}&lt;BR /&gt;| sort count desc&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;ALan&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2026 05:26:44 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Fetch-Database-Host/m-p/297230#M3251</guid>
      <dc:creator>AlanFoley</dc:creator>
      <dc:date>2026-04-03T05:26:44Z</dc:date>
    </item>
  </channel>
</rss>

