<?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: How to modify format of MS DNS server debug log events? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303927#M36186</link>
    <description>&lt;P&gt;Yes. Please. &lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2017 22:36:29 GMT</pubDate>
    <dc:creator>tomasmoser</dc:creator>
    <dc:date>2017-02-14T22:36:29Z</dc:date>
    <item>
      <title>How to modify format of MS DNS server debug log events?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303923#M36182</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;

&lt;P&gt;I would like to modify format of MS DNS debug logs in order to get rid of some unimportant strings within domain names. I was playing with SEDCMD stanza in props.conf but not with success.&lt;/P&gt;

&lt;P&gt;Log format as extracted by Splunk add-on for Microsoft DNS:&lt;BR /&gt;
1. 2. 2017 20:19:22 0D80 PACKET 0000002548D040A0 UDP Rcv 10.17.81.32 7be7 Q [0001 D NOERROR] A &lt;STRONG&gt;(5)h42-m(3)sec(3)lab(0)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;The problem is with (5)h42-m(3)sec(3)lab(0)"&lt;/P&gt;

&lt;P&gt;I need to get events to look as follows:&lt;/P&gt;

&lt;P&gt;2017 20:19:22 0D80 PACKET 0000002548D040A0 UDP Rcv 10.17.81.32 7be7 Q [0001 D NOERROR] A &lt;STRONG&gt;h42-m.sec.lab&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;When I implemented this ...&lt;BR /&gt;
SEDCMD-remove_parens_num = s/((\d))/./g&lt;BR /&gt;
SEDCMD-remove_first_period = s/^(.)//g&lt;BR /&gt;
SEDCMD-remove_last_period = s/(.)$//g&lt;/P&gt;

&lt;P&gt;... I stopped seeing my DNS logs in GUI permanently after the restart of Splunk. I do not understand. Any idea?&lt;/P&gt;

&lt;P&gt;Tomas&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:53:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303923#M36182</guid>
      <dc:creator>tomasmoser</dc:creator>
      <dc:date>2020-09-29T12:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify format of MS DNS server debug log events?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303924#M36183</link>
      <description>&lt;P&gt;Try testing this at search time before modifying &lt;CODE&gt;props.conf&lt;/CODE&gt;.. &lt;/P&gt;

&lt;P&gt;Try this &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=whatever | rex mode=sed s/(\(\d)\)/./g&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 21:51:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303924#M36183</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2017-02-14T21:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify format of MS DNS server debug log events?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303925#M36184</link>
      <description>&lt;P&gt;Yes, it does work correctly in this first stage.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;2. 2017 23:07:08 0D7C PACKET  0000002549C0C0A0 UDP Snd 10.18.1.51      b1aa   Q [0000       NOERROR] SRV    ._ldap._tcp(23)Default-First-Site-Name._sites.dc._msdcs.develop3.develop2.develop.local.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:51:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303925#M36184</guid>
      <dc:creator>tomasmoser</dc:creator>
      <dc:date>2020-09-29T12:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify format of MS DNS server debug log events?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303926#M36185</link>
      <description>&lt;P&gt;So you verified its working correctly at search time.. Do you want me to give you the &lt;CODE&gt;SEDCMD&lt;/CODE&gt; so you can add it to your &lt;CODE&gt;props.conf&lt;/CODE&gt; for index time now?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 22:34:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303926#M36185</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2017-02-14T22:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify format of MS DNS server debug log events?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303927#M36186</link>
      <description>&lt;P&gt;Yes. Please. &lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 22:36:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303927#M36186</guid>
      <dc:creator>tomasmoser</dc:creator>
      <dc:date>2017-02-14T22:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify format of MS DNS server debug log events?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303928#M36187</link>
      <description>&lt;P&gt;Place this in your &lt;CODE&gt;props.conf&lt;/CODE&gt; under &lt;CODE&gt;$SPLUNK_HOME\etc\apps\#APP_NAME\local&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[YourSourcetype]
SEDCMD-remove_parens = s/(\(\d)\)/./g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Don't forget to restart the Splunk service after making this change.&lt;/P&gt;

&lt;P&gt;Lastly, if this works for you then please accept the answer&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 23:37:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303928#M36187</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2017-02-14T23:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify format of MS DNS server debug log events?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303929#M36188</link>
      <description>&lt;P&gt;Well, it did help but I am not really happy. I ran into three problems:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;Why "SEDCMD-remove1 = s/((\d))/./g" and not "SEDCMD-remove1 = s/((\d))/./g"? I am not getting logic. Seems it works the same.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Once I modified props.conf with SEDCMD above, all of a sudden I am not extracting any other fields during search time (as defined in default/props.conf) - ALL OTHER FIELDS VANISHED. I am getting just host, source, sourcetype.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;adding "SEDCMD-remove-head-dot = s/\s(.)//g" into props.conf does not do anything (was working with rex in search bar)&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;adding "SEDCMD-remove-tail-dot = s/(.)$//g" into props.conf does not do anything (was warking with rex in search bar)&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;I do not understand Splunk's logic. Simply not. &lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 09:19:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303929#M36188</guid>
      <dc:creator>tomasmoser</dc:creator>
      <dc:date>2017-02-15T09:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify format of MS DNS server debug log events?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303930#M36189</link>
      <description>&lt;P&gt;Instead of recreating this by yourself, I believe the following add-on already does what you're trying to achieve: &lt;A href="https://splunkbase.splunk.com/app/3377/"&gt;https://splunkbase.splunk.com/app/3377/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It's even CIM compliant, meaning the fields are normalized.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 09:47:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303930#M36189</guid>
      <dc:creator>mikaelbje</dc:creator>
      <dc:date>2017-02-15T09:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify format of MS DNS server debug log events?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303931#M36190</link>
      <description>&lt;P&gt;I can confirm now that skoelpin's solution works!&lt;/P&gt;

&lt;P&gt;My props.conf&lt;/P&gt;

&lt;P&gt;[MSAD:NT6:DNS]&lt;/P&gt;

&lt;H1&gt;Replace (3)www(6)google(3)com with &lt;A href="http://www.google.com"&gt;www.google.com&lt;/A&gt; etc.&lt;/H1&gt;

&lt;P&gt;SEDCMD-remove-count = s/((\d+))/./g&lt;BR /&gt;
SEDCMD-remove-head-dot = s/\s(.)//g&lt;BR /&gt;
SEDCMD-remove-tail-dot = s/(.)$//g&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 11:18:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303931#M36190</guid>
      <dc:creator>tomasmoser</dc:creator>
      <dc:date>2017-02-15T11:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify format of MS DNS server debug log events?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303932#M36191</link>
      <description>&lt;P&gt;thanks for the fix here. this should be added standard to the app. i don't know why its logged this way and not sure why splunk app wouldn't normalize the data field.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Feb 2018 20:24:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303932#M36191</guid>
      <dc:creator>gdavid</dc:creator>
      <dc:date>2018-02-18T20:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify format of MS DNS server debug log events?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303933#M36192</link>
      <description>&lt;P&gt;there are a lot of issues using the SEDCMD command to try to fix this. it applies to the whole string messing up other data in the DNS log. &lt;/P&gt;

&lt;P&gt;i found issues with all the solutions suggested here, messing up PTR records or leaving a trailing . or leading (##) in the logs.&lt;/P&gt;

&lt;P&gt;still searching for the fix here.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 02:36:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303933#M36192</guid>
      <dc:creator>gdavid</dc:creator>
      <dc:date>2018-02-19T02:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify format of MS DNS server debug log events?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303934#M36193</link>
      <description>&lt;P&gt;Did you ever find a fix you liked?&lt;/P&gt;

&lt;P&gt;I'm curious what problems you saw in PTR records? To me, looks like they have the same weird parenthetical-count formatting problem as A records, so this fix would be common to both.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 21:45:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303934#M36193</guid>
      <dc:creator>bengoerz</dc:creator>
      <dc:date>2018-03-07T21:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify format of MS DNS server debug log events?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303935#M36194</link>
      <description>&lt;P&gt;each solution had its own trouble for me. &lt;/P&gt;

&lt;P&gt;if you use SEDCMD-remove-count = s/((\d+))/./g&lt;BR /&gt;
you turn a PTR record into this: (.).(.).(.).(.).(.)in-addr(.)arpa(.)&lt;/P&gt;

&lt;P&gt;also if read it correct SEDCMD happens at index time so your logs are lost if there are errors here. to have this modify the entire string like this is less than ideal. &lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 23:05:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303935#M36194</guid>
      <dc:creator>gdavid</dc:creator>
      <dc:date>2018-03-08T23:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify format of MS DNS server debug log events?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303936#M36195</link>
      <description>&lt;P&gt;each solution had its own trouble for me. &lt;/P&gt;

&lt;P&gt;if you use SEDCMD-remove-count = s/((\d+))/./g&lt;BR /&gt;
you turn a PTR record into this: (.).(.).(.).(.).(.)in-addr(.)arpa(.)&lt;/P&gt;

&lt;P&gt;also if read it correct SEDCMD happens at index time so your logs are lost if there are errors here. to have this modify the entire string like this is less than ideal. &lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 23:05:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/303936#M36195</guid>
      <dc:creator>gdavid</dc:creator>
      <dc:date>2018-03-08T23:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify format of MS DNS server debug log events?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/560798#M66172</link>
      <description>&lt;P&gt;I saw this solution today after almost 4 years and it works for me too . However I do get a trailing dot OR a number before each .&lt;/P&gt;&lt;P&gt;Original&lt;/P&gt;&lt;P&gt;7/26/2021 4:14:02 PM 1498 PACKET 0000020027AD4070 UDP Rcv 10.38.2.63 e92f Q [0001 D NOERROR] A (5)ctldl(13)windowsupdate(3)com(0)&lt;BR /&gt;&lt;BR /&gt;7/26/2021 4:14:02 PM 1498 PACKET 000002002D51DCC0 UDP Rcv 10.34.23.50 7494 Q [0001 D NOERROR] A (5)ctldl(13)windowsupdate(3)com(0)&lt;BR /&gt;&lt;BR /&gt;7/26/2021 4:14:02 PM 1498 PACKET 0000020024F70D10 UDP Rcv 10.38.5.167 30e6 Q [0001 D NOERROR] A (4)pypi(3)org(0)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;After applying Sedcmd ,notice the dot&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;7/26/2021 4:14:02 PM 1498 PACKET 0000020027AD4070 UDP Rcv 10.38.2.63 e92f Q [0001 D NOERROR] A&lt;FONT color="#FF0000"&gt; .&lt;/FONT&gt;ctldl(13)windowsupdate.com.&lt;BR /&gt;&lt;BR /&gt;7/26/2021 4:14:02 PM 1498 PACKET 000002002D51DCC0 UDP Rcv 10.34.23.50 7494 Q [0001 D NOERROR] A &lt;FONT color="#FF0000"&gt;.&lt;/FONT&gt;ctldl(13)windowsupdate.com.&lt;BR /&gt;&lt;BR /&gt;7/26/2021 4:14:02 PM 1498 PACKET 0000020024F70D10 UDP Rcv 10.38.5.167 30e6 Q [0001 D NOERROR] A &lt;FONT color="#FF0000"&gt;.&lt;/FONT&gt;pypi.org.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 13:18:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-modify-format-of-MS-DNS-server-debug-log-events/m-p/560798#M66172</guid>
      <dc:creator>ssubhani</dc:creator>
      <dc:date>2021-07-26T13:18:39Z</dc:date>
    </item>
  </channel>
</rss>

