<?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: Routing the data to a different Index via Regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Routing-the-data-to-a-different-Index-via-Regex/m-p/483591#M135400</link>
    <description>&lt;P&gt;Hi Giuseppe,&lt;/P&gt;

&lt;P&gt;Please find the regex below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = SiteUrl:.+PathologyPHI
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Props and transforms are in the heavy forwarder under /etc/system/local. That's where I'm trying to route the data from.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Thu, 27 Feb 2020 11:33:32 GMT</pubDate>
    <dc:creator>shiv1593</dc:creator>
    <dc:date>2020-02-27T11:33:32Z</dc:date>
    <item>
      <title>Routing the data to a different Index via Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Routing-the-data-to-a-different-Index-via-Regex/m-p/483589#M135398</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;We have a source ABC sending us logs and are being stored inside an index called all_logs. From that source, we want to separate the events, which contains the field SiteUrl: &lt;A href="https://www.abc.com/site/PathologyPHI" target="_blank"&gt;https://www.abc.com/site/PathologyPHI&lt;/A&gt; and send these logs to a new index called new_logs, while the rest of the logs should still go to the Index all_logs.&lt;/P&gt;

&lt;P&gt;This is what I've tried so far, but all the logs still land up in the Index all_logs, instead of being routed.. FYI, props and transforms are kept under $SPLUNK_HOME/etc/system/local, while the inputs.conf is under the TA, which brings the logs's local directory. Had to do this because in props, there is a setting defined for another sourcetype as well. Any suggestions regarding moving them back to TA as well will be appreciated.&lt;/P&gt;

&lt;P&gt;In props.conf, I made the following change:&lt;/P&gt;

&lt;P&gt;[abc:management:activity]&lt;BR /&gt;
TRANSFORMS-routing = abc_logs&lt;/P&gt;

&lt;P&gt;In Transforms.conf, I did this:&lt;/P&gt;

&lt;P&gt;[abc_logs]&lt;BR /&gt;
REGEX = SiteUrl:.+PathologyPHI&lt;BR /&gt;
DEST_KEY = _MetaData:Index&lt;BR /&gt;
FORMAT = new_logs&lt;/P&gt;

&lt;P&gt;Here is the inputs.conf for the source. There are other inputs too, but this inputs comes with the events, which we want to route. We do not want to route all the events coming off this input, only the ones matching the regex:&lt;/P&gt;

&lt;P&gt;[splunk_ta_abc_management_activity://Auditabc]&lt;BR /&gt;
content_type = Audit.abc&lt;BR /&gt;
index = all_logs&lt;BR /&gt;
sourcetype = abc:management:activity&lt;BR /&gt;
interval = 120&lt;BR /&gt;
tenant_name = ABC&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
start_by_shell = false&lt;/P&gt;

&lt;P&gt;Any help will be highly appreciated.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:25:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Routing-the-data-to-a-different-Index-via-Regex/m-p/483589#M135398</guid>
      <dc:creator>shiv1593</dc:creator>
      <dc:date>2020-09-30T04:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: Routing the data to a different Index via Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Routing-the-data-to-a-different-Index-via-Regex/m-p/483590#M135399</link>
      <description>&lt;P&gt;Hi @shiv1593,&lt;BR /&gt;
at first, please share again the regex in transforms.conf using the Code Sample button because it isn't possible to read it and check the regex.&lt;/P&gt;

&lt;P&gt;Anyway, where do you have props.conf and trasnforms.conf? &lt;BR /&gt;
they must be on Indexers or (when present) on Heavy Forwarders.&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 11:26:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Routing-the-data-to-a-different-Index-via-Regex/m-p/483590#M135399</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-02-27T11:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Routing the data to a different Index via Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Routing-the-data-to-a-different-Index-via-Regex/m-p/483591#M135400</link>
      <description>&lt;P&gt;Hi Giuseppe,&lt;/P&gt;

&lt;P&gt;Please find the regex below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = SiteUrl:.+PathologyPHI
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Props and transforms are in the heavy forwarder under /etc/system/local. That's where I'm trying to route the data from.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 11:33:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Routing-the-data-to-a-different-Index-via-Regex/m-p/483591#M135400</guid>
      <dc:creator>shiv1593</dc:creator>
      <dc:date>2020-02-27T11:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Routing the data to a different Index via Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Routing-the-data-to-a-different-Index-via-Regex/m-p/483592#M135401</link>
      <description>&lt;P&gt;Hi @shiv1593,&lt;BR /&gt;
the regex and your approach seem to be correct.&lt;BR /&gt;
So please some additional info:&lt;/P&gt;

&lt;P&gt;A surely stupid question: did you restarted Heavy Forwarder after update?&lt;/P&gt;

&lt;P&gt;Logs are in an Universal Forwarder (read by the inputs.conf in the TA) and they are sent to the HF (where there are props.conf and transforms.conf) and then sent to Indexers, is it correct or there's anything else?&lt;/P&gt;

&lt;P&gt;I don't understand what you say: "...setting defined for another sourcetype...".&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 12:29:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Routing-the-data-to-a-different-Index-via-Regex/m-p/483592#M135401</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-02-27T12:29:37Z</dc:date>
    </item>
  </channel>
</rss>

