<?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: Need help rewriting DNS log lines in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Need-help-rewriting-DNS-log-lines/m-p/65460#M96929</link>
    <description>&lt;P&gt;Ah ok, thanks for that.  I can streamline that REGEX now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Mar 2011 23:47:17 GMT</pubDate>
    <dc:creator>the_wolverine</dc:creator>
    <dc:date>2011-03-24T23:47:17Z</dc:date>
    <item>
      <title>Need help rewriting DNS log lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-help-rewriting-DNS-log-lines/m-p/65455#M96924</link>
      <description>&lt;P&gt;I have DNS log lines that look like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(4)mail(6)google(3)com(0)
(7)twitter(3)com(0)
(12)spreadsheets(1)l(6)google(3)com(0)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How would I configure rewriting so that Splunk will display them in a more appealing format?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;mail.google.com
twitter.com
spreadsheets.l.google.com
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Mar 2011 05:17:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-help-rewriting-DNS-log-lines/m-p/65455#M96924</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2011-03-23T05:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help rewriting DNS log lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-help-rewriting-DNS-log-lines/m-p/65456#M96925</link>
      <description>&lt;P&gt;Can you use rex's sed mode?  This may be a little too indiscriminate, but:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;blah | rex mode=sed "s/\(\d\)/\./g"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Mar 2011 05:22:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-help-rewriting-DNS-log-lines/m-p/65456#M96925</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2011-03-23T05:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need help rewriting DNS log lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-help-rewriting-DNS-log-lines/m-p/65457#M96926</link>
      <description>&lt;P&gt;Thank you!  It seems you don't need the escape for '.' for some reason -- Ultimately, I will use sedcmd to do this.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2011 05:46:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-help-rewriting-DNS-log-lines/m-p/65457#M96926</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2011-03-23T05:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need help rewriting DNS log lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-help-rewriting-DNS-log-lines/m-p/65458#M96927</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;props.conf

[dns]
SEDCMD-dns = s/\(\d\)/\./g s/\(\d\d\)/\./g

* Splunk didn't seem to like \d? so I used \d\d for the cases where we have 2 digits: (12)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Mar 2011 07:46:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-help-rewriting-DNS-log-lines/m-p/65458#M96927</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2011-03-23T07:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need help rewriting DNS log lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-help-rewriting-DNS-log-lines/m-p/65459#M96928</link>
      <description>&lt;P&gt;You need \d+, not \d?. \d? means zero or one digit. If there are never more than two, you can use \d{1,2}&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2011 08:42:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-help-rewriting-DNS-log-lines/m-p/65459#M96928</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-03-23T08:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need help rewriting DNS log lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-help-rewriting-DNS-log-lines/m-p/65460#M96929</link>
      <description>&lt;P&gt;Ah ok, thanks for that.  I can streamline that REGEX now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2011 23:47:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-help-rewriting-DNS-log-lines/m-p/65460#M96929</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2011-03-24T23:47:17Z</dc:date>
    </item>
  </channel>
</rss>

