<?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: dispatch logs incoming from one source to multiple indexes in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67136#M96975</link>
    <description>&lt;P&gt;see update above&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jan 2013 16:32:02 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2013-01-03T16:32:02Z</dc:date>
    <item>
      <title>dispatch logs incoming from one source to multiple indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67133#M96972</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;

&lt;P&gt;I have syslogs of several firewalls incoming from a TCP port.&lt;/P&gt;

&lt;P&gt;I would like to dispath the logs of each firewall (by their SN) in their proper index.&lt;/P&gt;

&lt;P&gt;I saw it's possible to do that configuring transforms.conf and props.conf&lt;/P&gt;

&lt;P&gt;Here is the example I found :&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]

TRANSFORMS-syslog-NSM=syslog-NSM
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog-NSM]

DEST_KEY = _MetaData:Index

REGEX = NSM

FORMAT = index1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Does someone can adapt it to fit with my requirements?&lt;BR /&gt;
I really don't know how to do it...&lt;/P&gt;

&lt;P&gt;my index : index1 // index2 // ...&lt;BR /&gt;
SN : FT001 // FT002 // ....&lt;/P&gt;

&lt;P&gt;Thanks !&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2012 13:25:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67133#M96972</guid>
      <dc:creator>AdrienW</dc:creator>
      <dc:date>2012-12-18T13:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: dispatch logs incoming from one source to multiple indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67134#M96973</link>
      <description>&lt;P&gt;That looks about correct, but your current REGEX will just match the literal string NSM in your event. I believe that you can set up a single transform, assuming your data looks something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2012-12-12 12:12:12,12 SN=blah1 action=allow src=1.2.3.4 dst=2.3.4.5 ...
2012-12-13 13:13:13,13 SN=blah2 action=deny src=3.4.5.6 dst=1.0.0.2 ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourcetype]
TRANSFORMS-set_index = fw_index
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[fw_index]
DEST_KEY = _MetaData:Index
REGEX = \s+SN=(\S+)\s
FORMAT = $1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thus the first example event would land in the index &lt;CODE&gt;blah1&lt;/CODE&gt;, and the second in index &lt;CODE&gt;blah2&lt;/CODE&gt;, if they exist - otherwise they'll end up in &lt;CODE&gt;main&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Have a look at the examples in the docs for &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/Admin/Transformsconf"&gt;transforms.conf&lt;/A&gt; and for &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.1/Indexer/Setupmultipleindexes"&gt;managing indexes&lt;/A&gt;.&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;UPDATE:&lt;/P&gt;

&lt;P&gt;Then you'll have to hard-code it, with several transforms statements from props.conf, i.e.;&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your sourcetype]
TRANSFORMS-fw_index = banana, apple, pear
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and in transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[banana]
DEST_KEY = _MetaData:Index
REGEX = FGT1234567
FORMAT = banana

[apple]
DEST_KEY = _MetaData:Index
REGEX = FGT45453324
FORMAT = apple
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2012 09:56:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67134#M96973</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-12-19T09:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: dispatch logs incoming from one source to multiple indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67135#M96974</link>
      <description>&lt;P&gt;Thanks for your answer, I'm near to resolve this, but I need help one more time.&lt;/P&gt;

&lt;P&gt;My logs are like this : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Jan  3 15:32:52 10.0.1.254 date=2013-01-03 time=15:03:19 devname=FGT60B-CFP device_id=FGT60B3908672004
Jan  3 15:38:21 10.0.1.254 date=2013-01-03 time=15:36:43 devname=FGT60B-EDC device_id=FGT60B3908668256
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As you can see, there is a special SN for each hardware and I need to put it in index like "banana" and "apple" (common names).&lt;/P&gt;

&lt;P&gt;Is it possible to add a condition in the regex or anything else that means : &lt;/P&gt;

&lt;P&gt;FGT60B3908672004 =&amp;gt; banana&lt;BR /&gt;
FGT60B3908668256 =&amp;gt; apple&lt;/P&gt;

&lt;P&gt;all logs have the same source and sourcetype, and I can't take the host value to dispatch via the props.conf.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2013 14:44:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67135#M96974</guid>
      <dc:creator>AdrienW</dc:creator>
      <dc:date>2013-01-03T14:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: dispatch logs incoming from one source to multiple indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67136#M96975</link>
      <description>&lt;P&gt;see update above&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2013 16:32:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67136#M96975</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-01-03T16:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: dispatch logs incoming from one source to multiple indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67137#M96976</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;first, thank you for your answers, Kristian.&lt;BR /&gt;
I am quite new to splunk; I did what you said, and still it won't work.&lt;BR /&gt;
 The situation is; I've got 2 different UDP sources coming to one port, let's say P1. I must separate the 2 sources so that each one goes to its index.&lt;BR /&gt;
Here is what i've done so far;&lt;/P&gt;

&lt;P&gt;1) created the 2 indexes "banana" and "apple",&lt;/P&gt;

&lt;P&gt;2) created the 2 files "props.conf" and "transforms.conf" in /opt/splunk/etc/system/local ,&lt;/P&gt;

&lt;P&gt;3) put the configuration above you talked about with the right serial numbers (and only that, assuming the default configs props.conf and transforms.conf in opt/splunk/etc/system/default are still used before overrided with those 2 files)&lt;/P&gt;

&lt;P&gt;4) edited "inputs.conf" in /opt/splunk/etc/system/local which had&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;[default] &lt;/P&gt;

&lt;P&gt;host = localhost&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;into&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;[default]&lt;/P&gt;

&lt;P&gt;host = localhost&lt;/P&gt;

&lt;P&gt;[udp]&lt;/P&gt;

&lt;P&gt;connection_host=ip&lt;/P&gt;

&lt;P&gt;queue = parsingqueue&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;because I saw &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/Editinputs.conf"&gt;here&lt;/A&gt; this could be necessary (and it wasn't working anyway) and that in the "default" inputs.conf, there was connection_host=ip .&lt;/P&gt;

&lt;P&gt;I am still working on it, and cannot find what's wrong. Maybe because I can't avoid to precise what index is used in Manager&amp;gt;Data inputs&amp;gt;UDP&amp;gt;P1 (which is set to "main").&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2013 13:08:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67137#M96976</guid>
      <dc:creator>NewMilenium</dc:creator>
      <dc:date>2013-01-04T13:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: dispatch logs incoming from one source to multiple indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67138#M96977</link>
      <description>&lt;P&gt;First of all, you have no port specification in the udp stanza header. It should be like;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[udp://514]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/Monitornetworkports#Add_a_network_input_using_inputs.conf"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Data/Monitornetworkports#Add_a_network_input_using_inputs.conf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;On a side note, if you have control over the sending parties, you could set them to send you data on different ports and specify the indexes in inputs.conf directly.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[udp://514]&lt;BR /&gt;
index=banana&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;[upd://515]&lt;BR /&gt;
index=apple&lt;BR /&gt;
&lt;/P&gt;

&lt;P&gt;Default values are just that. You don't need to set them again.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2013 13:28:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67138#M96977</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-01-04T13:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: dispatch logs incoming from one source to multiple indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67139#M96978</link>
      <description>&lt;P&gt;Well, I changed "local" inputs.conf accordingly, and logs are still put into "main" , sadly.&lt;BR /&gt;
We don't have control over the sending parties; the order is "only one port : 514". That's why I/we must differentiate each log using the device_id.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2013 14:19:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67139#M96978</guid>
      <dc:creator>NewMilenium</dc:creator>
      <dc:date>2013-01-04T14:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: dispatch logs incoming from one source to multiple indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67140#M96979</link>
      <description>&lt;P&gt;are you sure that your regexes work correctly?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jan 2013 18:27:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67140#M96979</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-01-07T18:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: dispatch logs incoming from one source to multiple indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67141#M96980</link>
      <description>&lt;P&gt;No, I'm not sure...&lt;/P&gt;

&lt;P&gt;Here are the files involved.&lt;/P&gt;

&lt;P&gt;/opt/splunk/etc/system/local/props.conf : &lt;/P&gt;

&lt;P&gt;[fortigate]&lt;/P&gt;

&lt;P&gt;TRANSFORMS-fw_index = apple, banana&lt;/P&gt;

&lt;P&gt;And here is the /opt/splunk/etc/system/local/transforms.conf : &lt;/P&gt;

&lt;P&gt;[apple]&lt;/P&gt;

&lt;P&gt;DEST_KEY = _MetaData:Index&lt;/P&gt;

&lt;P&gt;REGEX = FG100C3G09619593&lt;/P&gt;

&lt;P&gt;FORMAT = index::apple&lt;/P&gt;

&lt;P&gt;[banana]&lt;/P&gt;

&lt;P&gt;DEST_KEY = _MetaData:Index&lt;/P&gt;

&lt;P&gt;REGEX = FGT50B3G10612115&lt;/P&gt;

&lt;P&gt;FORMAT = index::banana&lt;/P&gt;

&lt;P&gt;There are other files that were already here before I touch anything, in /opt/splunk/etc/system/local : alert_actions.conf, authorize.conf, eventtypes.conf, inputs.conf, migration.conf, README, server.conf, tenants.conf, web.conf. I prefer to mention it because "local" folder is supposed to contain files "adding and replacing" the default ones.&lt;/P&gt;

&lt;P&gt;You can notice I changed [fortigate_traffic] to [fortigate]. I did, because this is the only way I managed to finally get an error message. Well, two, obviously, written in black on a yellow font up the splunk window. Here they are :&lt;/P&gt;

&lt;P&gt;received event for unconfigured/disabled/deleted index='index::apple' with source='source::udp:514' host='host::10.0.1.254' sourcetype='sourcetype::fortigate_traffic' (2 missing total)&lt;/P&gt;

&lt;P&gt;received event for unconfigured/disabled/deleted index='index::banana' with source='source::udp:514' host='host::10.0.1.254' sourcetype='sourcetype::fortigate_traffic' (1 missing total)&lt;/P&gt;

&lt;P&gt;And yes, I created the 2 indexes called "apple" and "banana" in splunk, with "Manager&amp;gt;Indexes&amp;gt;New".&lt;/P&gt;

&lt;P&gt;I seriously can't find what's wrong...&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2013 14:36:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67141#M96980</guid>
      <dc:creator>NewMilenium</dc:creator>
      <dc:date>2013-01-09T14:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: dispatch logs incoming from one source to multiple indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67142#M96981</link>
      <description>&lt;P&gt;Oops, I may have made a small mistake; it seems like the correct format for FORMAT is &lt;CODE&gt;&lt;INDEXNAME&gt;&lt;/INDEXNAME&gt;&lt;/CODE&gt;, NOT &lt;CODE&gt;index::&lt;INDEXNAME&gt;&lt;/INDEXNAME&gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.1/Indexer/Setupmultipleindexes"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.1/Indexer/Setupmultipleindexes&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Sorry about that.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2013 15:02:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67142#M96981</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-01-09T15:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: dispatch logs incoming from one source to multiple indexes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67143#M96982</link>
      <description>&lt;P&gt;Oh my, it works. Wonderful job, Kristian. Thanks so much!&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2013 15:09:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/dispatch-logs-incoming-from-one-source-to-multiple-indexes/m-p/67143#M96982</guid>
      <dc:creator>NewMilenium</dc:creator>
      <dc:date>2013-01-09T15:09:55Z</dc:date>
    </item>
  </channel>
</rss>

