<?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: Microsoft DNS Query not parsing in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Microsoft-DNS-Query-not-parsing/m-p/316416#M94689</link>
    <description>&lt;P&gt;Its strange because I know what you posted is working when you specify | eval src_domain = "url" but when I run it against the index, it doesn't seem to work. &lt;/P&gt;

&lt;P&gt;I appreciate your help and will continue to tinker around with it.&lt;/P&gt;

&lt;P&gt;-Jordan&lt;/P&gt;</description>
    <pubDate>Fri, 06 Apr 2018 18:16:44 GMT</pubDate>
    <dc:creator>king2jd</dc:creator>
    <dc:date>2018-04-06T18:16:44Z</dc:date>
    <item>
      <title>Microsoft DNS Query not parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Microsoft-DNS-Query-not-parsing/m-p/316411#M94684</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Here is what my dns queries are being indexed as. I am looking for a search time regex that will extract the (#) parts and replace with a ".". Below is what I have, which does the replacing fine. The issue is that any query with a "-" in it, gets choked at the first slash and put into the query field.&lt;/P&gt;

&lt;P&gt;My search:&lt;BR /&gt;
| eval newfield=ltrim(replace(src_domain, "(([\d]+))", "."),".")&lt;/P&gt;

&lt;P&gt;Example query:&lt;BR /&gt;
 (6)fp-afd(9)azureedge(3)net(0)&lt;/P&gt;

&lt;P&gt;What I want:&lt;BR /&gt;
fp-afd.azureedge.net&lt;/P&gt;

&lt;P&gt;What the eval gives:&lt;BR /&gt;
fp&lt;/P&gt;

&lt;P&gt;The eval statement works perfect for any query that doesn't contain a "-". Any help is appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 17:28:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Microsoft-DNS-Query-not-parsing/m-p/316411#M94684</guid>
      <dc:creator>king2jd</dc:creator>
      <dc:date>2018-04-06T17:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Microsoft DNS Query not parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Microsoft-DNS-Query-not-parsing/m-p/316412#M94685</link>
      <description>&lt;P&gt;Try this run anywhere search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
|  eval src_domain="(6)fp-afd(9)azureedge(3)net(0)" 
|  eval newfield=ltrim(replace(src_domain, "\([\d]+\)", "."),".")|  eval newfield=rtrim(newfield,".")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In your environment you should try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... |  eval src_domain="(6)fp-afd(9)azureedge(3)net(0)" 
    |  eval newfield=ltrim(replace(src_domain, "\([\d]+\)", "."),".")|  eval newfield=rtrim(newfield,".")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 17:40:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Microsoft-DNS-Query-not-parsing/m-p/316412#M94685</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-04-06T17:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Microsoft DNS Query not parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Microsoft-DNS-Query-not-parsing/m-p/316413#M94686</link>
      <description>&lt;P&gt;Hey mayurr98,&lt;/P&gt;

&lt;P&gt;So that works for that src_domain but doesn't work for all of the values in src_domain. For instance, this query "PTB-HG-LOG.ad.test.com" shows up only as "PTB" in the src_domain field. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:54:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Microsoft-DNS-Query-not-parsing/m-p/316413#M94686</guid>
      <dc:creator>king2jd</dc:creator>
      <dc:date>2020-09-29T18:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Microsoft DNS Query not parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Microsoft-DNS-Query-not-parsing/m-p/316414#M94687</link>
      <description>&lt;P&gt;it is giving me correct values.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
 |  eval src_domain="(6)fp-afd(9)azureedge(3)net(0) PTB-HG-LOG.ad.test.com" 
| makemv src_domain 
| mvexpand src_domain
 |  eval newfield=ltrim(replace(src_domain, "\([\d]+\)", "."),".")|  eval newfield=rtrim(newfield,".")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;can you give exact sample input for which this query doesnt work?&lt;BR /&gt;
or else show the screenshot of the output with query and src_domain and new field&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 17:56:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Microsoft-DNS-Query-not-parsing/m-p/316414#M94687</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-04-06T17:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Microsoft DNS Query not parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Microsoft-DNS-Query-not-parsing/m-p/316415#M94688</link>
      <description>&lt;P&gt;search: index=msad  | makemv src_domain  | mvexpand src_domain | eval newfield=ltrim(replace(src_domain, "([\d]+)", "."),".") | eval newfield=rtrim(newfield,".")  &lt;/P&gt;

&lt;P&gt;The bold query below is an another example. When I look in the "newfield" field, the value is just "client" not "client-office365-tas.msedge.net&lt;/P&gt;

&lt;P&gt;4/6/2018 2:03:24 PM 0C38 PACKET  000002C8F8BC4520 UDP Snd 192.168.115.33  afad R Q [8081   DR  NOERROR] A      &lt;STRONG&gt;(20)client-office365-tas(6)msedge(3)net(0)&lt;/STRONG&gt;&lt;BR /&gt;
UDP response info at 000002C8F8BC4520&lt;BR /&gt;
  Socket = 716&lt;BR /&gt;
  Remote addr 192.168.115.33, port 54724&lt;BR /&gt;
  Time Query=607061, Queued=0, Expire=0&lt;BR /&gt;
  Buf length = 0x0200 (512)&lt;BR /&gt;
  Msg length = 0x00a0 (160)&lt;BR /&gt;
  Message:&lt;BR /&gt;
    XID       0xafad&lt;BR /&gt;
    Flags     0x8180&lt;BR /&gt;
      QR        1 (RESPONSE)&lt;BR /&gt;
      OPCODE    0 (QUERY)&lt;BR /&gt;
      AA        0&lt;BR /&gt;
      TC        0&lt;BR /&gt;
      RD        1&lt;BR /&gt;
      RA        1&lt;BR /&gt;
      Z         0&lt;BR /&gt;
      CD        0&lt;BR /&gt;
      AD        0&lt;BR /&gt;
      RCODE     0 (NOERROR)&lt;BR /&gt;
    QCOUNT    1&lt;BR /&gt;
    ACOUNT    3&lt;BR /&gt;
    NSCOUNT   0&lt;BR /&gt;
    ARCOUNT   0&lt;BR /&gt;
    QUESTION SECTION:&lt;BR /&gt;
    Offset = 0x000c, RR count = 0&lt;BR /&gt;
    Name      "(20)client-office365-tas(6)msedge(3)net(0)"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:54:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Microsoft-DNS-Query-not-parsing/m-p/316415#M94688</guid>
      <dc:creator>king2jd</dc:creator>
      <dc:date>2020-09-29T18:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Microsoft DNS Query not parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Microsoft-DNS-Query-not-parsing/m-p/316416#M94689</link>
      <description>&lt;P&gt;Its strange because I know what you posted is working when you specify | eval src_domain = "url" but when I run it against the index, it doesn't seem to work. &lt;/P&gt;

&lt;P&gt;I appreciate your help and will continue to tinker around with it.&lt;/P&gt;

&lt;P&gt;-Jordan&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 18:16:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Microsoft-DNS-Query-not-parsing/m-p/316416#M94689</guid>
      <dc:creator>king2jd</dc:creator>
      <dc:date>2018-04-06T18:16:44Z</dc:date>
    </item>
  </channel>
</rss>

