<?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 Unable to anonymize / mask data using regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-anonymize-mask-data-using-regex/m-p/129394#M184498</link>
    <description>&lt;P&gt;I'm trying to mask the IP address from the below sample syslog per the following guide but it's just not working. Is my regex expression wrong? I'm no regex guru so I'm generating the regex expression from online tools.&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.2/Data/Anonymizedatausingconfigurationfiles" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.0.2/Data/Anonymizedatausingconfigurationfiles&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Sample Log:&lt;BR /&gt;
Apr 11 10:47:30 192.168.1.1 stingray_xml_slave: ....&lt;/P&gt;

&lt;P&gt;pref.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
TRANSFORMS-anonymize = testing
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[testing]
REGEX = \b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b
FORMAT = $1#####$2
DEST_KEY = _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I also tried the following Regex expresion generated by txt2re.com with no luck either:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(?![\\d])
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 28 Sep 2020 16:22:20 GMT</pubDate>
    <dc:creator>zerolife</dc:creator>
    <dc:date>2020-09-28T16:22:20Z</dc:date>
    <item>
      <title>Unable to anonymize / mask data using regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-anonymize-mask-data-using-regex/m-p/129394#M184498</link>
      <description>&lt;P&gt;I'm trying to mask the IP address from the below sample syslog per the following guide but it's just not working. Is my regex expression wrong? I'm no regex guru so I'm generating the regex expression from online tools.&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.2/Data/Anonymizedatausingconfigurationfiles" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.0.2/Data/Anonymizedatausingconfigurationfiles&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Sample Log:&lt;BR /&gt;
Apr 11 10:47:30 192.168.1.1 stingray_xml_slave: ....&lt;/P&gt;

&lt;P&gt;pref.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
TRANSFORMS-anonymize = testing
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[testing]
REGEX = \b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b
FORMAT = $1#####$2
DEST_KEY = _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I also tried the following Regex expresion generated by txt2re.com with no luck either:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(?![\\d])
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:22:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-anonymize-mask-data-using-regex/m-p/129394#M184498</guid>
      <dc:creator>zerolife</dc:creator>
      <dc:date>2020-09-28T16:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to anonymize / mask data using regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-anonymize-mask-data-using-regex/m-p/129395#M184499</link>
      <description>&lt;P&gt;Try this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;props.conf

[syslog]
SEDCMD-ipaddress = s/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/xxxxx/g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;no transforms.conf entries.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Apr 2014 19:58:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-anonymize-mask-data-using-regex/m-p/129395#M184499</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-04-11T19:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to anonymize / mask data using regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-anonymize-mask-data-using-regex/m-p/129396#M184500</link>
      <description>&lt;P&gt;Any particular reason why you're using TRANSFORMS for this and not SEDCMD?&lt;/P&gt;

&lt;P&gt;Also I'm assuming "pref.conf" is a typo?&lt;/P&gt;

&lt;P&gt;...and finally where are you implementing this, on an indexer?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Apr 2014 20:03:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-anonymize-mask-data-using-regex/m-p/129396#M184500</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2014-04-11T20:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to anonymize / mask data using regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-anonymize-mask-data-using-regex/m-p/129397#M184501</link>
      <description>&lt;P&gt;thanks for the try. However I rebooted Splunk and it's still not masking incoming syslog&lt;/P&gt;</description>
      <pubDate>Fri, 11 Apr 2014 20:12:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-anonymize-mask-data-using-regex/m-p/129397#M184501</guid>
      <dc:creator>zerolife</dc:creator>
      <dc:date>2014-04-11T20:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to anonymize / mask data using regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unable-to-anonymize-mask-data-using-regex/m-p/129398#M184502</link>
      <description>&lt;P&gt;I was an idiot, had mistyped props -&amp;gt; pref. thanks somesoni2 and Ayn for your help&lt;/P&gt;</description>
      <pubDate>Fri, 11 Apr 2014 20:23:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unable-to-anonymize-mask-data-using-regex/m-p/129398#M184502</guid>
      <dc:creator>zerolife</dc:creator>
      <dc:date>2014-04-11T20:23:20Z</dc:date>
    </item>
  </channel>
</rss>

