<?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: Host availability on Notebookes, by host name in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Host-availability-on-Notebookes-by-host-name/m-p/240736#M755</link>
    <description>&lt;P&gt;I tried metric options, but still just the host.entity, just like in your print, something like&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries avg(dt.host.availability), by:{host.name}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Mar 2024 19:44:28 GMT</pubDate>
    <dc:creator>ArtuD</dc:creator>
    <dc:date>2024-03-21T19:44:28Z</dc:date>
    <item>
      <title>Host availability on Notebookes, by host name</title>
      <link>https://community.dynatrace.com/t5/DQL/Host-availability-on-Notebookes-by-host-name/m-p/240728#M751</link>
      <description>&lt;P&gt;I want to create a notebook that shows me the availability of hosts, separated by the name of the hosts, but I can only do this using host.entity, how could I create this?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 19:11:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Host-availability-on-Notebookes-by-host-name/m-p/240728#M751</guid>
      <dc:creator>ArtuD</dc:creator>
      <dc:date>2024-03-21T19:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Host availability on Notebookes, by host name</title>
      <link>https://community.dynatrace.com/t5/DQL/Host-availability-on-Notebookes-by-host-name/m-p/240731#M752</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/69705"&gt;@ArtuD&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;You can use this DQL:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries avg(dt.host.availability), by:{dt.entity.host}
or
timeseries availability=sum(dt.host.availability),by:{availability.state,dt.metrics.source,dt.entity.host}&lt;/LI-CODE&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 19:36:34 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Host-availability-on-Notebookes-by-host-name/m-p/240731#M752</guid>
      <dc:creator>cesarsaravia</dc:creator>
      <dc:date>2024-03-21T19:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Host availability on Notebookes, by host name</title>
      <link>https://community.dynatrace.com/t5/DQL/Host-availability-on-Notebookes-by-host-name/m-p/240733#M753</link>
      <description>&lt;P&gt;Yes, but i want to do this whith host names, not host entity&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 19:38:44 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Host-availability-on-Notebookes-by-host-name/m-p/240733#M753</guid>
      <dc:creator>ArtuD</dc:creator>
      <dc:date>2024-03-21T19:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Host availability on Notebookes, by host name</title>
      <link>https://community.dynatrace.com/t5/DQL/Host-availability-on-Notebookes-by-host-name/m-p/240735#M754</link>
      <description>&lt;P&gt;And maybe you can use the metrics option in Notebooks. It's easier to find the right metric.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cesarsaravia_0-1711049980946.png" style="width: 698px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/18453iBF0598402422653B/image-dimensions/698x369?v=v2" width="698" height="369" role="button" title="cesarsaravia_0-1711049980946.png" alt="cesarsaravia_0-1711049980946.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 19:41:12 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Host-availability-on-Notebookes-by-host-name/m-p/240735#M754</guid>
      <dc:creator>cesarsaravia</dc:creator>
      <dc:date>2024-03-21T19:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: Host availability on Notebookes, by host name</title>
      <link>https://community.dynatrace.com/t5/DQL/Host-availability-on-Notebookes-by-host-name/m-p/240736#M755</link>
      <description>&lt;P&gt;I tried metric options, but still just the host.entity, just like in your print, something like&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries avg(dt.host.availability), by:{host.name}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 19:44:28 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Host-availability-on-Notebookes-by-host-name/m-p/240736#M755</guid>
      <dc:creator>ArtuD</dc:creator>
      <dc:date>2024-03-21T19:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Host availability on Notebookes, by host name</title>
      <link>https://community.dynatrace.com/t5/DQL/Host-availability-on-Notebookes-by-host-name/m-p/240738#M756</link>
      <description>&lt;P&gt;You should use the lookup command in this case.&lt;/P&gt;&lt;P&gt;This is the code:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries avg(dt.host.availability), by:{dt.entity.host}
| lookup [fetch dt.entity.host], lookupField:id , sourceField:dt.entity.host, prefix:"host."
| fields timeframe,interval,host.entity.name, `avg(dt.host.availability)`&lt;/LI-CODE&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cesarsaravia_0-1711050543351.png" style="width: 635px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/18454i76A296CD46115B01/image-dimensions/635x335?v=v2" width="635" height="335" role="button" title="cesarsaravia_0-1711050543351.png" alt="cesarsaravia_0-1711050543351.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 19:49:34 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Host-availability-on-Notebookes-by-host-name/m-p/240738#M756</guid>
      <dc:creator>cesarsaravia</dc:creator>
      <dc:date>2024-03-21T19:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Host availability on Notebookes, by host name</title>
      <link>https://community.dynatrace.com/t5/DQL/Host-availability-on-Notebookes-by-host-name/m-p/240740#M757</link>
      <description>&lt;P&gt;If metric has entity id, but does not have entity name (or yet another dimension), you can always enrich result using &lt;STRONG&gt;&lt;EM&gt;lookup&lt;/EM&gt; &lt;/STRONG&gt;command and referencing to entity model.&lt;BR /&gt;&lt;BR /&gt;In my example I calculate % of availability for 2 hosts and&amp;nbsp; add entity name from dt.entity.host&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries availability=avg(dt.host.availability), by:{dt.entity.host, availability.state}
, filter:in(dt.entity.host, {"HOST-86E98F7E966EA327","HOST-9F38503667743716"}), interval:5m
| summarize { availability = 100*sum(if(availability.state=="up",availability[])) / sum(availability[])}, 
by: {interval, timeframe, dt.entity.host}

| lookup [fetch dt.entity.host], sourceField:dt.entity.host, lookupField:id, fields:{entity.name}&lt;/LI-CODE&gt;&lt;P&gt;Result looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztof_hoja_0-1711050814024.png" style="width: 700px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/18455i9B55B3B8EF147CE9/image-dimensions/700x228?v=v2" width="700" height="228" role="button" title="krzysztof_hoja_0-1711050814024.png" alt="krzysztof_hoja_0-1711050814024.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 19:54:19 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Host-availability-on-Notebookes-by-host-name/m-p/240740#M757</guid>
      <dc:creator>krzysztof_hoja</dc:creator>
      <dc:date>2024-03-21T19:54:19Z</dc:date>
    </item>
  </channel>
</rss>

