<?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: HostName lookup on timeseries process Grail query in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/HostName-lookup-on-timeseries-process-Grail-query/m-p/264120#M1496</link>
    <description>&lt;P&gt;Hey!&lt;BR /&gt;For the purpose of finding out what fields are available for an entity type you can run a query like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;describe dt.entity.host&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Regarding your specific use case with timeseries process query, you can always define additional fields in the &lt;STRONG&gt;by:&amp;nbsp;&lt;/STRONG&gt;option and actually the host name is already there. Auto-suggestions in notebooks will provide you available fields to split by.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Example query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries avg(dt.process.availability), by: { host.name, dt.entity.process_group_instance }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it happens that the field you are looking for is not exposed directly as an option to split by, you can always use &lt;A href="https://docs.dynatrace.com/docs/shortlink/general-functions#entityAttr" target="_self"&gt;entityAttr&lt;/A&gt;&amp;nbsp;function to add any attribute you want, for example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries avg(dt.process.availability), by: { dt.entity.process_group_instance, dt.entity.host }
| fieldsAdd osType=entityAttr(dt.entity.host, "osType")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(There is also an &lt;A href="https://docs.dynatrace.com/docs/shortlink/general-functions#entityName" target="_self"&gt;entityName&lt;/A&gt; function that works very similar but just for getting the name of an entity)&lt;BR /&gt;&lt;BR /&gt;Hope that helps!&lt;BR /&gt;EDIT: There is another way to&amp;nbsp;&lt;SPAN&gt;identify the entities &amp;amp; fields that are available, &lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/semantic-dictionary/model/dt-entities" target="_self"&gt;semantic dictionary&lt;/A&gt; contains information about all relationships and fields avaiable on each entity.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Dec 2024 13:25:29 GMT</pubDate>
    <dc:creator>PiotrG</dc:creator>
    <dc:date>2024-12-02T13:25:29Z</dc:date>
    <item>
      <title>HostName lookup on timeseries process Grail query</title>
      <link>https://community.dynatrace.com/t5/DQL/HostName-lookup-on-timeseries-process-Grail-query/m-p/248061#M974</link>
      <description>&lt;P&gt;I have DQL timeseries process query that I want to lookup the host and add the hostname field to the displayed fields.&amp;nbsp; The issue I'm having is identifying the source &amp;amp; lookup fields in the lookup function that would get me to the hostname for the host where the process is running.&amp;nbsp; Is there an example you can provide of a similar DQL query?&lt;/P&gt;
&lt;P&gt;Also is there any documentation that identifies the available fields for a given dt.entity.... so that one can identify the entities &amp;amp; fields that will be required in order to lookup the field data to meet one's requirements?&lt;/P&gt;
&lt;P data-unlink="true"&gt;I tried using the "runs_on" funciton below called out in Ex. 2 under the "Practical Examples" section in the lookup command doc found &lt;A href="https://docs.dynatrace.com/docs/shortlink/correlation-and-join-commands#lookup" target="_self"&gt;here&lt;/A&gt;,&amp;nbsp;but this does not seem to work with my timeseries process query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;fetch dt.entity.service_instance
| lookup [ fetch dt.entity.host ],
sourceField: runs_on[dt.entity.host],
lookupField: id,
fields: { host.name = entity.name }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 11:59:58 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/HostName-lookup-on-timeseries-process-Grail-query/m-p/248061#M974</guid>
      <dc:creator>DAVID_JAUREGUI1</dc:creator>
      <dc:date>2024-10-02T11:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: HostName lookup on timeseries process Grail query</title>
      <link>https://community.dynatrace.com/t5/DQL/HostName-lookup-on-timeseries-process-Grail-query/m-p/264120#M1496</link>
      <description>&lt;P&gt;Hey!&lt;BR /&gt;For the purpose of finding out what fields are available for an entity type you can run a query like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;describe dt.entity.host&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Regarding your specific use case with timeseries process query, you can always define additional fields in the &lt;STRONG&gt;by:&amp;nbsp;&lt;/STRONG&gt;option and actually the host name is already there. Auto-suggestions in notebooks will provide you available fields to split by.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Example query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries avg(dt.process.availability), by: { host.name, dt.entity.process_group_instance }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it happens that the field you are looking for is not exposed directly as an option to split by, you can always use &lt;A href="https://docs.dynatrace.com/docs/shortlink/general-functions#entityAttr" target="_self"&gt;entityAttr&lt;/A&gt;&amp;nbsp;function to add any attribute you want, for example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries avg(dt.process.availability), by: { dt.entity.process_group_instance, dt.entity.host }
| fieldsAdd osType=entityAttr(dt.entity.host, "osType")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(There is also an &lt;A href="https://docs.dynatrace.com/docs/shortlink/general-functions#entityName" target="_self"&gt;entityName&lt;/A&gt; function that works very similar but just for getting the name of an entity)&lt;BR /&gt;&lt;BR /&gt;Hope that helps!&lt;BR /&gt;EDIT: There is another way to&amp;nbsp;&lt;SPAN&gt;identify the entities &amp;amp; fields that are available, &lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/semantic-dictionary/model/dt-entities" target="_self"&gt;semantic dictionary&lt;/A&gt; contains information about all relationships and fields avaiable on each entity.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 13:25:29 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/HostName-lookup-on-timeseries-process-Grail-query/m-p/264120#M1496</guid>
      <dc:creator>PiotrG</dc:creator>
      <dc:date>2024-12-02T13:25:29Z</dc:date>
    </item>
  </channel>
</rss>

