<?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: How to assign syslog file to specific index based on file name in transforms.conf? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-syslog-file-to-specific-index-based-on-file-name/m-p/164230#M33289</link>
    <description>&lt;P&gt;Forwarder- outputs.conf&lt;/P&gt;

&lt;P&gt;[tcpout:splunkssl]&lt;BR /&gt;
server = splunk.abc.com:9997&lt;BR /&gt;
compressed = true&lt;/P&gt;

&lt;P&gt;[tcpout-server://splunk.abc.com:9997]&lt;BR /&gt;
sslCertPath = $SPLUNK_HOME/etc/certs/forwarder.pem&lt;BR /&gt;
sslPassword = password&lt;BR /&gt;
sslRootCAPath = $SPLUNK_HOME/etc/certs/cacert.pem&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 17:14:43 GMT</pubDate>
    <dc:creator>dhavamanis</dc:creator>
    <dc:date>2020-09-28T17:14:43Z</dc:date>
    <item>
      <title>How to assign syslog file to specific index based on file name in transforms.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-syslog-file-to-specific-index-based-on-file-name/m-p/164226#M33285</link>
      <description>&lt;P&gt;Can you please provide sample configuration for the below, We have multiple forwarding sources and they are using syslog-ng. how to assign index based on log filename at indexer side.&lt;/P&gt;

&lt;P&gt;Example :&lt;/P&gt;

&lt;P&gt;mynbc-syslog-2015-07-30.log pattern files to go "mynbc" index&lt;BR /&gt;
msnbc-syslog-2015-07-29.log patter files to go "msnbc" index&lt;BR /&gt;
bravotv-syslog-2015-08-01_1.log patter files to go "bravotv" index&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2014 17:58:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-syslog-file-to-specific-index-based-on-file-name/m-p/164226#M33285</guid>
      <dc:creator>dhavamanis</dc:creator>
      <dc:date>2014-07-30T17:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign syslog file to specific index based on file name in transforms.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-syslog-file-to-specific-index-based-on-file-name/m-p/164227#M33286</link>
      <description>&lt;P&gt;Check this&lt;BR /&gt;
&lt;A href="http://answers.splunk.com/answers/38547/sending-certain-logs-from-udp-port-514-to-specific-indexes"&gt;http://answers.splunk.com/answers/38547/sending-certain-logs-from-udp-port-514-to-specific-indexes&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2014 20:18:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-syslog-file-to-specific-index-based-on-file-name/m-p/164227#M33286</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-07-30T20:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign syslog file to specific index based on file name in transforms.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-syslog-file-to-specific-index-based-on-file-name/m-p/164228#M33287</link>
      <description>&lt;P&gt;Can you please provide the sample REGEX while using the the file name pattern like this ${sitename}.${logname} ${Existing MSG}. we want to parse the sitename and assign to index name.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2014 14:47:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-syslog-file-to-specific-index-based-on-file-name/m-p/164228#M33287</guid>
      <dc:creator>dhavamanis</dc:creator>
      <dc:date>2014-08-01T14:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign syslog file to specific index based on file name in transforms.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-syslog-file-to-specific-index-based-on-file-name/m-p/164229#M33288</link>
      <description>&lt;P&gt;trying with the below config, seems its not working for me, Can you please correct this if anything wrong,&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;P&gt;[syslog]&lt;BR /&gt;
 TRANSFORMS-idx_routing = generic_idx_routing&lt;/P&gt;

&lt;P&gt;transforms.conf (created index abc)&lt;/P&gt;

&lt;P&gt;[generic_idx_routing]&lt;BR /&gt;
 SOURCE_KEY = MetaData:Host&lt;BR /&gt;
 REGEX = abc.xyz.\nbcu.com&lt;BR /&gt;
 DEST_KEY = _MetaData:Index&lt;BR /&gt;
 FORMAT = $1&lt;/P&gt;

&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;P&gt;[splunktcp-ssl:9997]&lt;BR /&gt;
compressed = true&lt;BR /&gt;
sourcetype = syslog&lt;/P&gt;

&lt;P&gt;[SSL]&lt;BR /&gt;
password = password&lt;BR /&gt;
requireClientCert = false&lt;BR /&gt;
rootCA = $SPLUNK_HOME/etc/certs/cacert.pem&lt;BR /&gt;
serverCert = $SPLUNK_HOME/etc/certs/splunknode.pem&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:14:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-syslog-file-to-specific-index-based-on-file-name/m-p/164229#M33288</guid>
      <dc:creator>dhavamanis</dc:creator>
      <dc:date>2020-09-28T17:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign syslog file to specific index based on file name in transforms.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-syslog-file-to-specific-index-based-on-file-name/m-p/164230#M33289</link>
      <description>&lt;P&gt;Forwarder- outputs.conf&lt;/P&gt;

&lt;P&gt;[tcpout:splunkssl]&lt;BR /&gt;
server = splunk.abc.com:9997&lt;BR /&gt;
compressed = true&lt;/P&gt;

&lt;P&gt;[tcpout-server://splunk.abc.com:9997]&lt;BR /&gt;
sslCertPath = $SPLUNK_HOME/etc/certs/forwarder.pem&lt;BR /&gt;
sslPassword = password&lt;BR /&gt;
sslRootCAPath = $SPLUNK_HOME/etc/certs/cacert.pem&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:14:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-syslog-file-to-specific-index-based-on-file-name/m-p/164230#M33289</guid>
      <dc:creator>dhavamanis</dc:creator>
      <dc:date>2020-09-28T17:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign syslog file to specific index based on file name in transforms.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-syslog-file-to-specific-index-based-on-file-name/m-p/164231#M33290</link>
      <description>&lt;P&gt;Filename-based transforms.conf use the &lt;CODE&gt;source&lt;/CODE&gt; key from the metadata like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[send_to_index_by_source]
SOURCE_KEY = MetaData:Source
REGEX = ^source::/path/to/files/(\w+)-syslog
DEST_KEY = _MetaData:Index
FORMAT = $1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Reference that in props.conf with &lt;CODE&gt;TRANSFORMS-foo = send_to_index_by_source&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2014 21:12:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-syslog-file-to-specific-index-based-on-file-name/m-p/164231#M33290</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-08-01T21:12:10Z</dc:date>
    </item>
  </channel>
</rss>

