<?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: Anonymize Multiple Data Points in Splunk Search in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Anonymize-Multiple-Data-Points-in-Splunk-Search/m-p/464785#M80168</link>
    <description>&lt;P&gt;I just tried this and it is only masking the second instance and not the first in the event.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Aug 2019 15:42:53 GMT</pubDate>
    <dc:creator>markhvesta</dc:creator>
    <dc:date>2019-08-28T15:42:53Z</dc:date>
    <item>
      <title>Anonymize Multiple Data Points in Splunk Search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Anonymize-Multiple-Data-Points-in-Splunk-Search/m-p/464783#M80166</link>
      <description>&lt;P&gt;I am trying to anonymize customer credit card data in splunk logs but when more than one card appears in the same event only one is scrubbed.&lt;/P&gt;

&lt;P&gt;transforms on the indexers:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[SEDCMD-anonymizecc]
REGEX =  s/(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})/###SCRUBBED###/g
FORMAT= $1###SCRUBBED###$2
REPEAT_MATCH = true
LOOKAHEAD = 800
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample event:&lt;/P&gt;

&lt;P&gt;2019-08-27 13:31:00,002 -0700 DEBUG -&lt;BR /&gt;
 Sent Message HTTP POST&lt;BR /&gt;
   Elapsed time    : 0.007166 (seconds)&lt;BR /&gt;
   ContentType     : application/x_www_form_urlencoded&lt;BR /&gt;
   Request         : Amount                = 528.01&lt;BR /&gt;
                     CardNumber            = CARDNUMBER&lt;BR /&gt;
                     PaymentDeviceOnFileID = &lt;NULL&gt;&lt;BR /&gt;
                     ResponseCode           = 0&lt;BR /&gt;
   Request Buffer  : Amount=528.01&amp;amp;CardNumber=CARDNUMBER&amp;amp;PaymentDeviceOnFileID=##NULL##&lt;BR /&gt;
   Response Buffer : ResponseCode=0 &lt;/NULL&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:56:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Anonymize-Multiple-Data-Points-in-Splunk-Search/m-p/464783#M80166</guid>
      <dc:creator>markhvesta</dc:creator>
      <dc:date>2020-09-30T01:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: Anonymize Multiple Data Points in Splunk Search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Anonymize-Multiple-Data-Points-in-Splunk-Search/m-p/464784#M80167</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;You can use SEDCMD in props.conf to achieve this easily at &lt;STRONG&gt;Index time&lt;/STRONG&gt;, compare to combination of props and transforms.&lt;/P&gt;

&lt;P&gt;Please try below config&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yourSourcetype]
SEDCMD-Anon = s/(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})/###SCRUBBED###/g
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Aug 2019 08:34:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Anonymize-Multiple-Data-Points-in-Splunk-Search/m-p/464784#M80167</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-08-28T08:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Anonymize Multiple Data Points in Splunk Search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Anonymize-Multiple-Data-Points-in-Splunk-Search/m-p/464785#M80168</link>
      <description>&lt;P&gt;I just tried this and it is only masking the second instance and not the first in the event.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 15:42:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Anonymize-Multiple-Data-Points-in-Splunk-Search/m-p/464785#M80168</guid>
      <dc:creator>markhvesta</dc:creator>
      <dc:date>2019-08-28T15:42:53Z</dc:date>
    </item>
  </channel>
</rss>

