<?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: Using transforms to divide monitor input to multiple indexes in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Using-transforms-to-divide-monitor-input-to-multiple-indexes/m-p/66092#M13272</link>
    <description>&lt;P&gt;This is similar, and may help... please advise&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/questions/1958/cant-route-forwarded-data-to-different-index/1964#1964" rel="nofollow"&gt;http://answers.splunk.com/questions/1958/cant-route-forwarded-data-to-different-index/1964#1964&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Mar 2011 19:56:31 GMT</pubDate>
    <dc:creator>dwaddle</dc:creator>
    <dc:date>2011-03-23T19:56:31Z</dc:date>
    <item>
      <title>Using transforms to divide monitor input to multiple indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-transforms-to-divide-monitor-input-to-multiple-indexes/m-p/66091#M13271</link>
      <description>&lt;P&gt;I am trying to filter a log file coming in via a universal forwarder (both installs are 4.2) so that messages containing text X go into index A with sourcetype A, messages with text Y go into index B with sourcetype B, everything else goes to index C with sourcetype C.&lt;/P&gt;

&lt;P&gt;The following is inteded to pick out anything with "HostA" and direct it to index hosta_gen, then pick out anything with "HostA Nagios:" in it and send it to the hosta_nagios index, anything else should end up in hosta_cisco.&lt;/P&gt;

&lt;P&gt;In props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/var/log/MyLog.log]
TRANSFORMS-sortIndexes = index_host_messages, sourcetype_host_messages, index_nagios_messages, sourcetype_nagios_messages
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[index_host_messages]
REGEX = HostA
DEST_KEY = _MetaData:Index
FORMAT = hosta_gen

[sourcetype_host_messages]
REGEX = HostA
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::syslog

[index_nagios_messages]
REGEX = HostA\snagios:
DEST_KEY = _MetaData:Index
FORMAT = hosta_nagios
DEFAULT_VALUE = hosta_cisco

[sourcetype_nagios_messages]
REGEX = HostA\snagios:
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::nagios_log
DEFAULT_VALUE = cisco_syslog
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Messages with "HostA" and not "HostA nagios" are ending up in hosta_cisco as type cisco_syslog sourcetype. How can I make this function correctly?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2011 18:28:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-transforms-to-divide-monitor-input-to-multiple-indexes/m-p/66091#M13271</guid>
      <dc:creator>Mr_Robaloba</dc:creator>
      <dc:date>2011-03-23T18:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using transforms to divide monitor input to multiple indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-transforms-to-divide-monitor-input-to-multiple-indexes/m-p/66092#M13272</link>
      <description>&lt;P&gt;This is similar, and may help... please advise&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/questions/1958/cant-route-forwarded-data-to-different-index/1964#1964" rel="nofollow"&gt;http://answers.splunk.com/questions/1958/cant-route-forwarded-data-to-different-index/1964#1964&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2011 19:56:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-transforms-to-divide-monitor-input-to-multiple-indexes/m-p/66092#M13272</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2011-03-23T19:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using transforms to divide monitor input to multiple indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-transforms-to-divide-monitor-input-to-multiple-indexes/m-p/66093#M13273</link>
      <description>&lt;P&gt;Thanks, it is simillar and I can get it to work to that extent. Data with "HostA nagios" does correctly go to the hosta_nagios index. &lt;/P&gt;

&lt;P&gt;The difficulty I am having is applying 2 or more conditions to divide my incomming data to 3 indexes. Currently everything other than "HostA nagios" incorretly goes to the hosta_cisco index. I want to be able to fish out data with just "HostA" (and not "nagios") and put that in the hosta_gen index.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:26:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-transforms-to-divide-monitor-input-to-multiple-indexes/m-p/66093#M13273</guid>
      <dc:creator>Mr_Robaloba</dc:creator>
      <dc:date>2020-09-28T09:26:31Z</dc:date>
    </item>
  </channel>
</rss>

