<?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 SEDCMD help with Windows DNS logs in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/SEDCMD-help-with-Windows-DNS-logs/m-p/94452#M19650</link>
    <description>&lt;P&gt;I am trying to use the SEDCMD when indexing Windows DNS logs as described in this solution:&lt;BR /&gt;
&lt;A href="http://splunk-base.splunk.com/answers/4546/field-extraction-regex-fu-help"&gt;http://splunk-base.splunk.com/answers/4546/field-extraction-regex-fu-help&lt;/A&gt;  In a nutshell the Windows DNS logs have the domain name being queried in this format:  (6)images(6)google(3)com(0) and I need them in this format  images.google.com&lt;/P&gt;

&lt;P&gt;I added these items to my props.conf in /opt/splunk/etc/system/local:&lt;/P&gt;

&lt;P&gt;[source::/home/dnsuser/Downloads/dns1.log]&lt;BR /&gt;
sourcetype = windns&lt;/P&gt;

&lt;P&gt;[windns]&lt;BR /&gt;
SEDCMD-domainname = s/(\(\d\))/./g&lt;/P&gt;

&lt;P&gt;Then I restarted Splunk, created a new index called DNS and a new data input for the file /home/dnsuser/Downloads/dns1.log. In the data input I manually specified windns as the source type. The data is in there and my field extractions specified in transforms.conf are working fine as I can see them by specifying either index=dns or sourcetype=windns. &lt;/P&gt;

&lt;P&gt;The domain name is extracted to a field called dns_query. When I view that field in the search results the domain name has not been modified by the SEDCMD. I know the syntax of the SEDCMD is correct because I can use it this way and the domain names are in the proper format:&lt;/P&gt;

&lt;P&gt;index=dns | rex "((?&lt;DNS_QUERY&gt;(\w+((\d))){1,}?)$)" | rex mode=sed field=dns_query "s/(\(\d\))/./g"&lt;/DNS_QUERY&gt;&lt;/P&gt;

&lt;P&gt;Any help would be appreciated.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Oct 2011 13:38:05 GMT</pubDate>
    <dc:creator>chemc</dc:creator>
    <dc:date>2011-10-19T13:38:05Z</dc:date>
    <item>
      <title>SEDCMD help with Windows DNS logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/SEDCMD-help-with-Windows-DNS-logs/m-p/94452#M19650</link>
      <description>&lt;P&gt;I am trying to use the SEDCMD when indexing Windows DNS logs as described in this solution:&lt;BR /&gt;
&lt;A href="http://splunk-base.splunk.com/answers/4546/field-extraction-regex-fu-help"&gt;http://splunk-base.splunk.com/answers/4546/field-extraction-regex-fu-help&lt;/A&gt;  In a nutshell the Windows DNS logs have the domain name being queried in this format:  (6)images(6)google(3)com(0) and I need them in this format  images.google.com&lt;/P&gt;

&lt;P&gt;I added these items to my props.conf in /opt/splunk/etc/system/local:&lt;/P&gt;

&lt;P&gt;[source::/home/dnsuser/Downloads/dns1.log]&lt;BR /&gt;
sourcetype = windns&lt;/P&gt;

&lt;P&gt;[windns]&lt;BR /&gt;
SEDCMD-domainname = s/(\(\d\))/./g&lt;/P&gt;

&lt;P&gt;Then I restarted Splunk, created a new index called DNS and a new data input for the file /home/dnsuser/Downloads/dns1.log. In the data input I manually specified windns as the source type. The data is in there and my field extractions specified in transforms.conf are working fine as I can see them by specifying either index=dns or sourcetype=windns. &lt;/P&gt;

&lt;P&gt;The domain name is extracted to a field called dns_query. When I view that field in the search results the domain name has not been modified by the SEDCMD. I know the syntax of the SEDCMD is correct because I can use it this way and the domain names are in the proper format:&lt;/P&gt;

&lt;P&gt;index=dns | rex "((?&lt;DNS_QUERY&gt;(\w+((\d))){1,}?)$)" | rex mode=sed field=dns_query "s/(\(\d\))/./g"&lt;/DNS_QUERY&gt;&lt;/P&gt;

&lt;P&gt;Any help would be appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2011 13:38:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/SEDCMD-help-with-Windows-DNS-logs/m-p/94452#M19650</guid>
      <dc:creator>chemc</dc:creator>
      <dc:date>2011-10-19T13:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: SEDCMD help with Windows DNS logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/SEDCMD-help-with-Windows-DNS-logs/m-p/94453#M19651</link>
      <description>&lt;P&gt;I am having the same issue.  On the Universal forwarder (Windows host) I have configured the following in $SPLUNK_HOME/etc/system/local/props.conf:&lt;/P&gt;

&lt;P&gt;[sourcetype::DNSSrvLog]&lt;BR /&gt;
SEDCMD-dns_name = s/((\(\d+\))/./g&lt;/P&gt;

&lt;P&gt;and logs appeared not changed on the indexer&lt;/P&gt;

&lt;P&gt;I tried different REGEXes.  The one above.  The ones below:&lt;/P&gt;

&lt;P&gt;s/(\(\d+\))/./g&lt;/P&gt;

&lt;P&gt;s/(\(\d+\))/./g&lt;/P&gt;

&lt;P&gt;s/\(\d+\)/./g&lt;/P&gt;

&lt;P&gt;s/(\d+)/./g&lt;/P&gt;

&lt;P&gt;None of that worked.  Any assistance will be appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2012 19:02:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/SEDCMD-help-with-Windows-DNS-logs/m-p/94453#M19651</guid>
      <dc:creator>ageld</dc:creator>
      <dc:date>2012-02-07T19:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: SEDCMD help with Windows DNS logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/SEDCMD-help-with-Windows-DNS-logs/m-p/94454#M19652</link>
      <description>&lt;P&gt;If you're using a LightForwarder or Universal Forwarder the SEDCMD configuration needs to exist on the indexer(s) which actually performs the parsing work.  &lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2012 17:24:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/SEDCMD-help-with-Windows-DNS-logs/m-p/94454#M19652</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2012-06-12T17:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: SEDCMD help with Windows DNS logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/SEDCMD-help-with-Windows-DNS-logs/m-p/94455#M19653</link>
      <description>&lt;P&gt;SEDCMD doesn't work on the UF&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 20:56:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/SEDCMD-help-with-Windows-DNS-logs/m-p/94455#M19653</guid>
      <dc:creator>landen99</dc:creator>
      <dc:date>2018-03-19T20:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: SEDCMD help with Windows DNS logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/SEDCMD-help-with-Windows-DNS-logs/m-p/94456#M19654</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;SEDCMD-domainname = s/(\(\d+\))/./g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You had an extra "\" and needed an extra "+"&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 21:12:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/SEDCMD-help-with-Windows-DNS-logs/m-p/94456#M19654</guid>
      <dc:creator>landen99</dc:creator>
      <dc:date>2018-03-19T21:12:46Z</dc:date>
    </item>
  </channel>
</rss>

