<?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: Append data to logs matching regex in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Append-data-to-logs-matching-regex/m-p/569846#M101033</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/239329"&gt;@jazzijeff&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;yes, its possible.&lt;/P&gt;&lt;P&gt;You can do it on Heavy Forwarders (when present) or on indexers (without HFs).&lt;/P&gt;&lt;P&gt;The way to do this are (as described at&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.2/Data/Anonymizedata#Anonymize_data_with_a_regular_expression_transform" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.2/Data/Anonymizedata#Anonymize_data_with_a_regular_expression_transform&lt;/A&gt;&amp;nbsp;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;the SEDCMD command in props.conf,&lt;/LI&gt;&lt;LI&gt;props.conf and transforms.conf.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;It's the same thing that anonymize data, because you have to do a transformation on you data: in this case you have to transform the _row log that matches a regex in the same log adding the string&amp;nbsp;&lt;SPAN&gt;"&amp;lt;Review Required&amp;gt;"&amp;nbsp;, something like this in props.conf:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[your_sourcetype]
SEDCMD-add_string = s/.*your_string.*/.*your_string.*\&amp;lt;Review Required\&amp;gt;/g&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Wed, 06 Oct 2021 09:42:47 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2021-10-06T09:42:47Z</dc:date>
    <item>
      <title>Append data to logs matching regex</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Append-data-to-logs-matching-regex/m-p/569845#M101032</link>
      <description>&lt;P&gt;Hi i'm looking to use a heavy forwarder to append a string to specific log messages. Im following the guide here&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.2/Data/Anonymizedata" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.2/Data/Anonymizedata&lt;/A&gt;&amp;nbsp;(specifically the "&lt;EM&gt;Anonymize data with a regular expression transform"&lt;/EM&gt; part)which only seems to mask data, i dont want to alter the log entry as such but rather add something like "&amp;lt;Review Required&amp;gt;" to the end of the log that matches a specific regex.&lt;/P&gt;&lt;P&gt;Can this be done using the heavy forwarder and transforms.conf?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 09:30:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Append-data-to-logs-matching-regex/m-p/569845#M101032</guid>
      <dc:creator>jazzijeff</dc:creator>
      <dc:date>2021-10-06T09:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Append data to logs matching regex</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Append-data-to-logs-matching-regex/m-p/569846#M101033</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/239329"&gt;@jazzijeff&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;yes, its possible.&lt;/P&gt;&lt;P&gt;You can do it on Heavy Forwarders (when present) or on indexers (without HFs).&lt;/P&gt;&lt;P&gt;The way to do this are (as described at&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.2/Data/Anonymizedata#Anonymize_data_with_a_regular_expression_transform" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.2/Data/Anonymizedata#Anonymize_data_with_a_regular_expression_transform&lt;/A&gt;&amp;nbsp;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;the SEDCMD command in props.conf,&lt;/LI&gt;&lt;LI&gt;props.conf and transforms.conf.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;It's the same thing that anonymize data, because you have to do a transformation on you data: in this case you have to transform the _row log that matches a regex in the same log adding the string&amp;nbsp;&lt;SPAN&gt;"&amp;lt;Review Required&amp;gt;"&amp;nbsp;, something like this in props.conf:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[your_sourcetype]
SEDCMD-add_string = s/.*your_string.*/.*your_string.*\&amp;lt;Review Required\&amp;gt;/g&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 09:42:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Append-data-to-logs-matching-regex/m-p/569846#M101033</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-10-06T09:42:47Z</dc:date>
    </item>
  </channel>
</rss>

