<?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: Can I use props/transform to make MULTIPLE changes to the same event from a log? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-use-props-transform-to-make-MULTIPLE-changes-to-the-same/m-p/363590#M66230</link>
    <description>&lt;P&gt;Once an event is in the parsing queue, changing its sourcetype will not result in the new sourcetype's props/transforms being run on it.&lt;/P&gt;

&lt;P&gt;There is a way to do what you're looking for with &lt;CODE&gt;CLONE_SOURCETYPE&lt;/CODE&gt;.  Basically you would clone the &lt;CODE&gt;hello world&lt;/CODE&gt; event into the sourcetype &lt;CODE&gt;myxactdata&lt;/CODE&gt;, then drop the event of the original sourcetype.  The new sourcetype would have its props/transforms run, so you could change index and use &lt;CODE&gt;SEDCMD&lt;/CODE&gt; for that sourcetype.&lt;/P&gt;

&lt;P&gt;Or, you could use the same REGEX you used to determine you wanted to change the sourcetype to not only change the sourcetype, but also the index, and also run a TRANSFORM on it at index time to accomplish what your SEDCMD did (&lt;CODE&gt;DEST_KEY&lt;/CODE&gt; = _raw to rewrite _raw).&lt;/P&gt;

&lt;P&gt;Edit:&lt;/P&gt;

&lt;P&gt;Perhaps your question didn't indicate you were trying to change the sourcetype and use the new sourcetype's props/transforms to perform the extra steps.  You can definitely perform multiple index time operations on an event, but make sure the order of operations isn't getting in the way.&lt;/P&gt;

&lt;P&gt;For instance, if you use SEDCMD, does your REGEX to set the sourcetype/index no longer match?&lt;/P&gt;</description>
    <pubDate>Fri, 09 Feb 2018 20:37:59 GMT</pubDate>
    <dc:creator>micahkemp</dc:creator>
    <dc:date>2018-02-09T20:37:59Z</dc:date>
    <item>
      <title>Can I use props/transform to make MULTIPLE changes to the same event from a log?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-use-props-transform-to-make-MULTIPLE-changes-to-the-same/m-p/363589#M66229</link>
      <description>&lt;P&gt;All, &lt;/P&gt;

&lt;P&gt;Can I use props/transform to make MULTIPLE changes to the same event from a log? &lt;/P&gt;

&lt;P&gt;Lets say I have an app log, with a lot going on. I have a certain subset of logs I need to move to a compliance index and change the sourcetype and do a little clean up. &lt;/P&gt;

&lt;P&gt;if (event = &lt;EM&gt;hello world&lt;/EM&gt;) then&lt;BR /&gt;
  change sourcetype to "myxactdata"&lt;BR /&gt;
  change index to "compliance" &lt;BR /&gt;
  SED away credit card&lt;/P&gt;

&lt;P&gt;I can anyone of these to work, but not all three at once. What's the trick here?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2018 20:27:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-use-props-transform-to-make-MULTIPLE-changes-to-the-same/m-p/363589#M66229</guid>
      <dc:creator>daniel333</dc:creator>
      <dc:date>2018-02-09T20:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use props/transform to make MULTIPLE changes to the same event from a log?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-use-props-transform-to-make-MULTIPLE-changes-to-the-same/m-p/363590#M66230</link>
      <description>&lt;P&gt;Once an event is in the parsing queue, changing its sourcetype will not result in the new sourcetype's props/transforms being run on it.&lt;/P&gt;

&lt;P&gt;There is a way to do what you're looking for with &lt;CODE&gt;CLONE_SOURCETYPE&lt;/CODE&gt;.  Basically you would clone the &lt;CODE&gt;hello world&lt;/CODE&gt; event into the sourcetype &lt;CODE&gt;myxactdata&lt;/CODE&gt;, then drop the event of the original sourcetype.  The new sourcetype would have its props/transforms run, so you could change index and use &lt;CODE&gt;SEDCMD&lt;/CODE&gt; for that sourcetype.&lt;/P&gt;

&lt;P&gt;Or, you could use the same REGEX you used to determine you wanted to change the sourcetype to not only change the sourcetype, but also the index, and also run a TRANSFORM on it at index time to accomplish what your SEDCMD did (&lt;CODE&gt;DEST_KEY&lt;/CODE&gt; = _raw to rewrite _raw).&lt;/P&gt;

&lt;P&gt;Edit:&lt;/P&gt;

&lt;P&gt;Perhaps your question didn't indicate you were trying to change the sourcetype and use the new sourcetype's props/transforms to perform the extra steps.  You can definitely perform multiple index time operations on an event, but make sure the order of operations isn't getting in the way.&lt;/P&gt;

&lt;P&gt;For instance, if you use SEDCMD, does your REGEX to set the sourcetype/index no longer match?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2018 20:37:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-use-props-transform-to-make-MULTIPLE-changes-to-the-same/m-p/363590#M66230</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-02-09T20:37:59Z</dc:date>
    </item>
  </channel>
</rss>

