<?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: Sending to different index based on host from syslog stream in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56202#M7060</link>
    <description>&lt;P&gt;So how would you do multiple subnets (or hosts) to multiple indexes then coming in on a syslog stream?&lt;/P&gt;</description>
    <pubDate>Wed, 22 Sep 2010 21:36:01 GMT</pubDate>
    <dc:creator>dkoski</dc:creator>
    <dc:date>2010-09-22T21:36:01Z</dc:date>
    <item>
      <title>Sending to different index based on host from syslog stream</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56199#M7057</link>
      <description>&lt;P&gt;Ok, so I'm not sure what I'm doing wrong here.  I need to send data coming in on the standard syslog UDP 514 stream based on hostname (Most of it going to main, the rest going to a custom index).&lt;/P&gt;

&lt;P&gt;i created a new props.conf in etc/system/local with just:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[host::10.10.10.*]
TRANSFORM-test = route_to_test
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And a new transforms.conf with just:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[route_to_test]
REGEX = .*
DEST_KEY = _MetaData:Index
FORMAT = test
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My intention was to route anything coming in from 10.10.10.* to an index named test, however everything is still going to main.&lt;/P&gt;

&lt;P&gt;What am I missing?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2010 20:40:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56199#M7057</guid>
      <dc:creator>dkoski</dc:creator>
      <dc:date>2010-09-22T20:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sending to different index based on host from syslog stream</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56200#M7058</link>
      <description>&lt;P&gt;Does the &lt;CODE&gt;REGEX&lt;/CODE&gt; statement require a capture group here? I can't remember...&lt;/P&gt;

&lt;P&gt;What happens if you change it to:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = (.)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Sep 2010 20:46:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56200#M7058</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2010-09-22T20:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sending to different index based on host from syslog stream</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56201#M7059</link>
      <description>&lt;P&gt;This is how you need to configure the transform:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[route_to_test]
SOURCE_KEY=MetaData:Host
DEST_KEY=_MetaData:Index
REGEX=^host::(10\.10\.10\.\d+)$
FORMAT=test
WRITE_META=true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and you could use the sourcetype or source in the props:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
TRANSFORMS-test = route_to_test
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::udp:514]
TRANSFORMS-test = route_to_test
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Sep 2010 20:47:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56201#M7059</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-09-22T20:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Sending to different index based on host from syslog stream</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56202#M7060</link>
      <description>&lt;P&gt;So how would you do multiple subnets (or hosts) to multiple indexes then coming in on a syslog stream?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2010 21:36:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56202#M7060</guid>
      <dc:creator>dkoski</dc:creator>
      <dc:date>2010-09-22T21:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sending to different index based on host from syslog stream</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56203#M7061</link>
      <description>&lt;P&gt;Like this: REGEX=^host::(10.10.10.\d+|192.168.0.\d+)$&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2010 21:44:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56203#M7061</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-09-22T21:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sending to different index based on host from syslog stream</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56204#M7062</link>
      <description>&lt;P&gt;You could probably use your approach with the WRITE_META=true stuff as well. Didn't try that one exactly myself.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2010 21:46:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56204#M7062</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-09-22T21:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sending to different index based on host from syslog stream</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56205#M7063</link>
      <description>&lt;P&gt;No, you don't need &lt;CODE&gt;WRITE_META = true&lt;/CODE&gt; if writing to the &lt;CODE&gt;_MetaData:Index&lt;/CODE&gt; &lt;CODE&gt;DEST_KEY&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2010 01:32:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56205#M7063</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-09-23T01:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Sending to different index based on host from syslog stream</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56206#M7064</link>
      <description>&lt;P&gt;Really though, it seems to me his original solution should work as long as the incoming host name is in fact 10.10.10.*. I guess I would set the sourcetype to something &lt;EM&gt;not&lt;/EM&gt; syslog (something that doesn't set the host) so you can see what's in the incoming data to be sure. &lt;/P&gt;

&lt;P&gt;Oh, wait. Can you try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TRANSFORMS-test = route_to_test
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;instead of:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TRANSFORM-test = route_to_test
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And also as southeringtonp suggests, do &lt;EM&gt;not&lt;/EM&gt; use the regex &lt;CODE&gt;.*&lt;/CODE&gt;, use just &lt;CODE&gt;.?&lt;/CODE&gt; or &lt;CODE&gt;(?=)&lt;/CODE&gt; instead.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2010 01:33:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56206#M7064</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-09-23T01:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sending to different index based on host from syslog stream</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56207#M7065</link>
      <description>&lt;P&gt;Are you sure? I experienced it in the past that it did not work without the WRITE_META...&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2010 01:38:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56207#M7065</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-09-23T01:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sending to different index based on host from syslog stream</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56208#M7066</link>
      <description>&lt;P&gt;Hey Guys,&lt;/P&gt;

&lt;P&gt;I have same question I have 4 hosts 2 development and 2 production. I have created two index dev &amp;amp; prod. &lt;/P&gt;

&lt;P&gt;I am using syslog TCP 514 port so how should i transfer production logs on prod and dev logs on dev index ? &lt;/P&gt;

&lt;P&gt;I tried every combination but no luck... please help to find solution.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2011 23:53:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Sending-to-different-index-based-on-host-from-syslog-stream/m-p/56208#M7066</guid>
      <dc:creator>satishp</dc:creator>
      <dc:date>2011-03-10T23:53:11Z</dc:date>
    </item>
  </channel>
</rss>

