<?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: Problem anonymizing data in Splunk in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Problem-anonymizing-data-in-Splunk/m-p/539157#M90328</link>
    <description>&lt;LI-CODE lang="markup"&gt;index=_internal | head 1 | fields _raw
| eval _raw="{\"externalId\": null, \"statusChanged\": \"2021-02-09T09:51:42.000Z\", \"userName\": \"thisisatestuser@123.pl \", \"appid\": \"0oa97rn2ymPrbgM430x612344\", \"lastUpdated\": \"2021-02-09T09:51:42.000Z\", \"scope\": \"\", \"userid\": \"00u1a2mn8ouOvSO2A0x71234\", \"created\": \"2021-02-09T09:51:42.000Z\", \"status\": \"ACTIVE\"}"
| rex mode=sed "s/(userName\":\s*\").*@/\1XXXXXX@/"&lt;/LI-CODE&gt;&lt;P&gt;your SEDCMD is wrong.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Feb 2021 12:24:38 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2021-02-09T12:24:38Z</dc:date>
    <item>
      <title>Problem anonymizing data in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-anonymizing-data-in-Splunk/m-p/539147#M90326</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;We want to anonymize the usernames in the following event using sed script.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Raw event:&lt;/FONT&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;{"&lt;SPAN&gt;externalId&lt;/SPAN&gt;"&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;null&lt;/SPAN&gt;, "&lt;SPAN&gt;statusChanged&lt;/SPAN&gt;"&lt;SPAN&gt;:&lt;/SPAN&gt; "&lt;SPAN&gt;2021-02-09T09:51:42.000Z&lt;/SPAN&gt;", "&lt;SPAN&gt;userName&lt;/SPAN&gt;"&lt;SPAN&gt;:&lt;/SPAN&gt; "&lt;SPAN&gt;thisisatestuser@123.pl&amp;nbsp;&lt;/SPAN&gt;", "&lt;SPAN&gt;appid&lt;/SPAN&gt;"&lt;SPAN&gt;:&lt;/SPAN&gt; "&lt;SPAN&gt;0oa97rn2ymPrbgM430x612344&lt;/SPAN&gt;", "&lt;SPAN&gt;lastUpdated&lt;/SPAN&gt;"&lt;SPAN&gt;:&lt;/SPAN&gt; "&lt;SPAN&gt;2021-02-09T09:51:42.000Z&lt;/SPAN&gt;", "&lt;SPAN&gt;scope&lt;/SPAN&gt;"&lt;SPAN&gt;:&lt;/SPAN&gt; "", "&lt;SPAN&gt;userid&lt;/SPAN&gt;"&lt;SPAN&gt;:&lt;/SPAN&gt; "&lt;SPAN&gt;00u1a2mn8ouOvSO2A0x71234&lt;/SPAN&gt;", "&lt;SPAN&gt;created&lt;/SPAN&gt;"&lt;SPAN&gt;:&lt;/SPAN&gt; "&lt;SPAN&gt;2021-02-09T09:51:42.000Z&lt;/SPAN&gt;", "&lt;SPAN&gt;status&lt;/SPAN&gt;"&lt;SPAN&gt;:&lt;/SPAN&gt; "&lt;SPAN&gt;ACTIVE&lt;/SPAN&gt;"}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;However, either the stanza in props.conf is incorrect or we did it in the wrong place.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Current config:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;1. input is specified on a Heavy Forwarder in an app local folder (we just activated inputs after installing an app in the FrontEnd and that is how this entry was created)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;2. we added the following SEDCMD stanza in /opt/splunk/etc/system/local/props.conf on a Heavy Forwarder:&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;[testapp:appUser]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;SEDCMD-TestApp_username1=s/userName:(\d{6})/userName:XXXXXX/1&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Does anyone have any idea on how to solve it?&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 11:36:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-anonymizing-data-in-Splunk/m-p/539147#M90326</guid>
      <dc:creator>justynap_ldz</dc:creator>
      <dc:date>2021-02-09T11:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem anonymizing data in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-anonymizing-data-in-Splunk/m-p/539150#M90327</link>
      <description>&lt;P&gt;Your user name looks like an e-mail address whereas your sed is looking for 6 digits.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 11:53:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-anonymizing-data-in-Splunk/m-p/539150#M90327</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-02-09T11:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem anonymizing data in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-anonymizing-data-in-Splunk/m-p/539157#M90328</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=_internal | head 1 | fields _raw
| eval _raw="{\"externalId\": null, \"statusChanged\": \"2021-02-09T09:51:42.000Z\", \"userName\": \"thisisatestuser@123.pl \", \"appid\": \"0oa97rn2ymPrbgM430x612344\", \"lastUpdated\": \"2021-02-09T09:51:42.000Z\", \"scope\": \"\", \"userid\": \"00u1a2mn8ouOvSO2A0x71234\", \"created\": \"2021-02-09T09:51:42.000Z\", \"status\": \"ACTIVE\"}"
| rex mode=sed "s/(userName\":\s*\").*@/\1XXXXXX@/"&lt;/LI-CODE&gt;&lt;P&gt;your SEDCMD is wrong.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 12:24:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-anonymizing-data-in-Splunk/m-p/539157#M90328</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2021-02-09T12:24:38Z</dc:date>
    </item>
  </channel>
</rss>

