<?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: Monitoring stopped on a shutdown host, disappears from dashboard in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Monitoring-stopped-on-a-shutdown-host-disappears-from-dashboard/m-p/277608#M2112</link>
    <description>&lt;P&gt;Query is correct, but this is nature of timeseries that when no data was reported we cannot expect any result. If you want to have a stable list of hosts regardless of data availability I suggest to start with&lt;STRONG&gt;&lt;EM&gt; fetch.dt.entites&lt;/EM&gt;&lt;/STRONG&gt; and &lt;EM&gt;&lt;STRONG&gt;join&lt;/STRONG&gt; &lt;/EM&gt;result with timeseries.&lt;/P&gt;&lt;P&gt;Full query would look like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.entity.host
| filter in(id, classicEntitySelector("type(host),tag(\"KeyA:ValueA\")")) 
  OR in(id, classicEntitySelector("type(host),tag(\"KeyA:ValueB\")")) 
| fieldsAdd Host = arrayLast(splitString(entity.name, "- "))

| join [
  timeseries availability = sum(dt.host.availability), by: { dt.entity.host, availability.state }
  | fieldsAdd availability = arraySum(availability)
], on:{left[id]==right[dt.entity.host]}, fields:{availability.state, availability}, executionOrder:leftFirst, kind:leftOuter

| sort availability desc
| limit 300&lt;/LI-CODE&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;kind:leftOuter&lt;/STRONG&gt;&lt;/EM&gt; option is important here. If missing host will not be present at all.&lt;/P&gt;</description>
    <pubDate>Tue, 20 May 2025 15:28:23 GMT</pubDate>
    <dc:creator>krzysztof_hoja</dc:creator>
    <dc:date>2025-05-20T15:28:23Z</dc:date>
    <item>
      <title>Monitoring stopped on a shutdown host, disappears from dashboard</title>
      <link>https://community.dynatrace.com/t5/DQL/Monitoring-stopped-on-a-shutdown-host-disappears-from-dashboard/m-p/274146#M1885</link>
      <description>&lt;P&gt;There was a host entity that shutdown due to power issues and the agent stopped reporting data back from the host. Instead of it's availability state changing, it drops off the dashboard completely as if the query isn't looking for it anymore due to it not reporting any state data. Is the query wrong or something misconfigured?&lt;BR /&gt;&lt;BR /&gt;Query:&lt;BR /&gt;timeseries availability = sum(dt.host.availability), by: { dt.entity.host, availability.state }, filter: { in(dt.entity.host, classicEntitySelector("type(host),tag(\"KeyA:ValueA\")")) OR in(dt.entity.host, classicEntitySelector("type(host),tag(\"KeyA:ValueB\")")) }&lt;BR /&gt;| fieldsAdd availability = arraySum(availability)&lt;BR /&gt;| sort availability asc&lt;BR /&gt;| fieldsAdd Host = arrayLast(splitString(entityName(dt.entity.host), "- "))&lt;BR /&gt;| limit 300&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 07:12:36 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Monitoring-stopped-on-a-shutdown-host-disappears-from-dashboard/m-p/274146#M1885</guid>
      <dc:creator>m_laurie_az</dc:creator>
      <dc:date>2025-04-02T07:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring stopped on a shutdown host, disappears from dashboard</title>
      <link>https://community.dynatrace.com/t5/DQL/Monitoring-stopped-on-a-shutdown-host-disappears-from-dashboard/m-p/277608#M2112</link>
      <description>&lt;P&gt;Query is correct, but this is nature of timeseries that when no data was reported we cannot expect any result. If you want to have a stable list of hosts regardless of data availability I suggest to start with&lt;STRONG&gt;&lt;EM&gt; fetch.dt.entites&lt;/EM&gt;&lt;/STRONG&gt; and &lt;EM&gt;&lt;STRONG&gt;join&lt;/STRONG&gt; &lt;/EM&gt;result with timeseries.&lt;/P&gt;&lt;P&gt;Full query would look like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.entity.host
| filter in(id, classicEntitySelector("type(host),tag(\"KeyA:ValueA\")")) 
  OR in(id, classicEntitySelector("type(host),tag(\"KeyA:ValueB\")")) 
| fieldsAdd Host = arrayLast(splitString(entity.name, "- "))

| join [
  timeseries availability = sum(dt.host.availability), by: { dt.entity.host, availability.state }
  | fieldsAdd availability = arraySum(availability)
], on:{left[id]==right[dt.entity.host]}, fields:{availability.state, availability}, executionOrder:leftFirst, kind:leftOuter

| sort availability desc
| limit 300&lt;/LI-CODE&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;kind:leftOuter&lt;/STRONG&gt;&lt;/EM&gt; option is important here. If missing host will not be present at all.&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 15:28:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Monitoring-stopped-on-a-shutdown-host-disappears-from-dashboard/m-p/277608#M2112</guid>
      <dc:creator>krzysztof_hoja</dc:creator>
      <dc:date>2025-05-20T15:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring stopped on a shutdown host, disappears from dashboard</title>
      <link>https://community.dynatrace.com/t5/DQL/Monitoring-stopped-on-a-shutdown-host-disappears-from-dashboard/m-p/277646#M2117</link>
      <description>&lt;P&gt;With the above, would you not still run into the same issue?&lt;/P&gt;&lt;P&gt;If you run fetch dt.entity.host over a period where the host hasn't been seen it won't return a result.&lt;/P&gt;&lt;P&gt;For example, if I query during the time my host was last see, on the 9th of May, it shows up:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fin_Ubels_0-1747804060827.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/28105iF855387C1F1F82DD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fin_Ubels_0-1747804060827.png" alt="Fin_Ubels_0-1747804060827.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I query for hosts on the 10th of May, it doesn't show up because there weren't any:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fin_Ubels_1-1747804098489.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/28106i8CCCA093AE1D9904/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fin_Ubels_1-1747804098489.png" alt="Fin_Ubels_1-1747804098489.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 05:09:12 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Monitoring-stopped-on-a-shutdown-host-disappears-from-dashboard/m-p/277646#M2117</guid>
      <dc:creator>Fin_Ubels</dc:creator>
      <dc:date>2025-05-21T05:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring stopped on a shutdown host, disappears from dashboard</title>
      <link>https://community.dynatrace.com/t5/DQL/Monitoring-stopped-on-a-shutdown-host-disappears-from-dashboard/m-p/277667#M2120</link>
      <description>&lt;P&gt;1. For short recent timeframes my query can be used as is, because it take hours to retire host.&lt;/P&gt;&lt;P&gt;2. For longer timeframes, you can introduce own control on time for both queries:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.entity.host, from:-1M
| filter in(id, classicEntitySelector("type(host),tag(\"KeyA:ValueA\")")) 
  OR in(id, classicEntitySelector("type(host),tag(\"KeyA:ValueB\")")) 
| fieldsAdd Host = arrayLast(splitString(entity.name, "- "))

| join [
  timeseries availability = sum(dt.host.availability), by: { dt.entity.host, availability.state }, from:-24h
  | fieldsAdd availability = arraySum(availability)
], on:{left[id]==right[dt.entity.host]}, fields:{availability.state, availability}, executionOrder:leftFirst, kind:leftOuter

| sort availability desc
| limit 300&lt;/LI-CODE&gt;&lt;P&gt;query is looking at all entities for past month and data only last 24h&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 08:51:29 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Monitoring-stopped-on-a-shutdown-host-disappears-from-dashboard/m-p/277667#M2120</guid>
      <dc:creator>krzysztof_hoja</dc:creator>
      <dc:date>2025-05-21T08:51:29Z</dc:date>
    </item>
  </channel>
</rss>

