<?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: Requesting Clarity on XDR XQL API Logging in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/requesting-clarity-on-xdr-xql-api-logging/m-p/545326#M4520</link>
    <description>&lt;P&gt;Thank you so much &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/165579"&gt;@zarnous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jun 2023 16:59:53 GMT</pubDate>
    <dc:creator>sushant1601</dc:creator>
    <dc:date>2023-06-08T16:59:53Z</dc:date>
    <item>
      <title>Requesting Clarity on XDR XQL API Logging</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/requesting-clarity-on-xdr-xql-api-logging/m-p/544571#M4504</link>
      <description>&lt;P&gt;Hello Everyone,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For one of the client, we need to fetch logs from XDR API using XQL. Currently, the ask is for windows event logs only, but later they want IIS logs as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help in below queries would be appreciated:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. There are two queries by which I fetched logs successfully. One is using:&lt;/P&gt;
&lt;P&gt;dataset= xdr_data&amp;nbsp;&lt;SPAN&gt;| filter event_type = EVENT_LOG&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Second query I tried is using preset:&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;preset = xdr_event_log&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;By both of these queries I'm getting event logs. I would like to know if both the queries are correct and I'm not missing on anything.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;If both the queries are correct, which would be efficient one?&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;2. Second query is regarding schema. I have gone through XDR_DATA schema. I just want to clarify if agent_hostname field's value changes each endpoint or is it same? This may sound stupid but basically we want to know which endpoint logged this event and if we can be sure that each agent on each endpoint has separate hostname.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;3. In future we need to fetch IIS logs as well. I could not find any document or help regarding this. Which dataset or preset is used for IIS logs? Does XQL query even work for IIS or it logs to CDL?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Any help would be great.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Thanks in advance.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;LI-PRODUCT title="Cortex XDR" id="Cortex_XDR"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 02 Jun 2023 13:25:45 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/requesting-clarity-on-xdr-xql-api-logging/m-p/544571#M4504</guid>
      <dc:creator>sushant1601</dc:creator>
      <dc:date>2023-06-02T13:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Clarity on XDR XQL API Logging</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/requesting-clarity-on-xdr-xql-api-logging/m-p/545302#M4516</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/293860"&gt;@sushant1601&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Thank you for posting these questions, please find below my response to each of them:&lt;BR /&gt;1.&amp;nbsp;You can query against either datasets or Presets in a dataset query ; however,&amp;nbsp;presets offer groupings of xdr_data fields that are useful for analyzing specific areas of network and endpoint activity. All of the fields available for a preset are also available on the larger xdr_data dataset, but by using the preset your query can run more efficiently&lt;BR /&gt;For that, I would also recommend going over our newly published detailed training for XQL, the full course can be found &lt;A href="https://live.paloaltonetworks.com/t5/cortex-xdr-how-to-videos/cortex-xdr-basic-xql-crash-course/ta-p/544056" target="_self"&gt;here&lt;/A&gt;, and for the data sources part that is part of it , it can be also found under the title "2. XQL Building block: Data Source &amp;amp; Structure ".&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;2. The field "agent_hostname" will operate the same in both the "preset = xdr_event_log" and "dataset = xdr_data", and yes, the hostname should remain the same in the query regardless when/ how you query the result, the value of the field should not changed unless the hostname itself changes.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;3. Yes, you can query IIS data ingested to XDR using XQL.&amp;nbsp;Cortex XDR provides YAML templates for DHCP, DNS, IIS, and NGINX. This can be achieved by configuring&amp;nbsp;an&lt;A href="https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR/Cortex-XDR-Pro-Administrator-Guide/Add-an-XDR-Collector-Profile-for-Windows" target="_self"&gt; XDR Collector Profile&lt;/A&gt; for Windows. Then, to query the IIS logs, you can use XQL to query "dataset = iis_iis_raw" for the raw logs ingested to XDR, as well as the parsed logs if you happen to &lt;A href="https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR/Cortex-XDR-Pro-Administrator-Guide/Create-Parsing-Rules" target="_self"&gt;create a parsing rule&lt;/A&gt; for the raw logs, an example for doing so is below&amp;nbsp;&lt;BR /&gt;[INGEST:vendor = "iis", product = "iis", target_dataset ="microsoft_iis_parsed", no_hit = keep]&lt;BR /&gt;alter date = arrayindex(regextract(_raw_log, "[^\s]+"),0),&lt;BR /&gt;time = arrayindex(regextract(_raw_log, "[^\s]+"),1),&lt;BR /&gt;s_ip = arrayindex(regextract(_raw_log, "[^\s]+"),2),&lt;BR /&gt;cs_method = arrayindex(regextract(_raw_log, "[^\s]+"),3),&lt;BR /&gt;cs_uri_stem = arrayindex(regextract(_raw_log, "[^\s]+"),4),&lt;BR /&gt;cs_uri_query = arrayindex(regextract(_raw_log, "[^\s]+"),5),&lt;BR /&gt;s_port = arrayindex(regextract(_raw_log, "[^\s]+"),6),&lt;BR /&gt;cs_username = arrayindex(regextract(_raw_log, "[^\s]+"),7),&lt;BR /&gt;c_ip = arrayindex(regextract(_raw_log, "[^\s]+"),8),&lt;BR /&gt;cs_user_agent = arrayindex(regextract(_raw_log, "[^\s]+"),9),&lt;BR /&gt;cs_referer = arrayindex(regextract(_raw_log, "[^\s]+"),10),&lt;BR /&gt;sc_status = arrayindex(regextract(_raw_log, "[^\s]+"),11),&lt;BR /&gt;sc_substatus = arrayindex(regextract(_raw_log, "[^\s]+"),12),&lt;BR /&gt;sc_win32_status = arrayindex(regextract(_raw_log, "[^\s]+"),13),&lt;BR /&gt;time_taken = arrayindex(regextract(_raw_log, "[^\s]+"),14);&lt;BR /&gt;&lt;BR /&gt;If you have this configured, then you cna query the dataset "dataset = microsoft_iis_parsed", and the name of the dataset is coming from the parsing rule first line seen above "[INGEST:vendor = "iis", product = "iis", target_dataset ="microsoft_iis_parsed", no_hit = keep]"&lt;BR /&gt;&lt;BR /&gt;In addition, and as partially mentioned above, we have published a detailed training for XQL , with 2 parts, i will link theme below here as well, please feel free to take advantage of those and let me know if you happen to have any questions.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://live.paloaltonetworks.com/t5/cortex-xdr-how-to-videos/cortex-xdr-basic-xql-crash-course/ta-p/544056" target="_self"&gt;Cortex XDR Basic XQL Crash Course&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://live.paloaltonetworks.com/t5/cortex-xdr-how-to-videos/cortex-xdr-xql-use-cases-and-applications-crash-course/ta-p/544228" target="_self"&gt;Cortex XDR XQL Use Cases and Applications Crash Course&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I hope the above was helpful and answered your questions, please let me know if any!&amp;nbsp;&lt;BR /&gt;Thanks&lt;BR /&gt;Z&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 14:03:08 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/requesting-clarity-on-xdr-xql-api-logging/m-p/545302#M4516</guid>
      <dc:creator>zarnous</dc:creator>
      <dc:date>2023-06-08T14:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Clarity on XDR XQL API Logging</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/requesting-clarity-on-xdr-xql-api-logging/m-p/545317#M4517</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/165579"&gt;@zarnous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you so much for explaining in details. Really appreciate your response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just last small query. In the second point you mentioned the value of the field should not be changed unless the hostname itself changes. So, is agent hostname is same as of hostname of the endpoint?&lt;/P&gt;
&lt;P&gt;Clearing this because we are working to ingest the logs and we do not have the device with us. So, I can not verify this on the device itself.&lt;/P&gt;
&lt;P&gt;Again, thank you for the response!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 15:56:43 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/requesting-clarity-on-xdr-xql-api-logging/m-p/545317#M4517</guid>
      <dc:creator>sushant1601</dc:creator>
      <dc:date>2023-06-08T15:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Clarity on XDR XQL API Logging</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/requesting-clarity-on-xdr-xql-api-logging/m-p/545319#M4518</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/293860"&gt;@sushant1601&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Sure i will be happy to clarify this more, Yes that is correct the field&amp;nbsp; "agent_hostname"&amp;nbsp;&lt;SPAN&gt;in both the "preset = xdr_event_log" and "dataset = xdr_data", is the hostname of the endpoint&amp;nbsp;.&lt;BR /&gt;&lt;BR /&gt;Please feel free to let me know if you have any follow up question , happy to help anytime!&lt;BR /&gt;Thanks&lt;BR /&gt;Z&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:10:48 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/requesting-clarity-on-xdr-xql-api-logging/m-p/545319#M4518</guid>
      <dc:creator>zarnous</dc:creator>
      <dc:date>2023-06-08T16:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Clarity on XDR XQL API Logging</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/requesting-clarity-on-xdr-xql-api-logging/m-p/545326#M4520</link>
      <description>&lt;P&gt;Thank you so much &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/165579"&gt;@zarnous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:59:53 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/requesting-clarity-on-xdr-xql-api-logging/m-p/545326#M4520</guid>
      <dc:creator>sushant1601</dc:creator>
      <dc:date>2023-06-08T16:59:53Z</dc:date>
    </item>
  </channel>
</rss>

