<?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: Changing Syslog Source type for directories in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Changing-Syslog-Source-type-for-directories/m-p/21157#M3134</link>
    <description>&lt;P&gt;You would have to set up different monitor stanzas in &lt;CODE&gt;inputs.conf&lt;/CODE&gt; on the forwarder, e.g.;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///logs/nginx/*/]
index = your_index
sourcetype = nginx
host_segment = 3

[monitor:///logs/cisco/*/]
index = your_index
sourcetype = cisco
host_segment = 3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;etc etc&lt;/P&gt;

&lt;P&gt;If you do not specify sourcetype (which I assume you have not done) Splunk will probably identify and classify it as &lt;CODE&gt;syslog&lt;/CODE&gt;. And &lt;CODE&gt;syslog&lt;/CODE&gt; is a sourcetype (the only one I think) where Splunk will automatically extract and set the host for each event in the log individually, i.e. not on a per file basis.&lt;/P&gt;

&lt;P&gt;Therefore you will also have to set the &lt;CODE&gt;host&lt;/CODE&gt; value manually, but the &lt;CODE&gt;host_segment&lt;/CODE&gt; lets you set this from the path being monitored.&lt;/P&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian &lt;/P&gt;</description>
    <pubDate>Fri, 06 Apr 2012 16:17:21 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2012-04-06T16:17:21Z</dc:date>
    <item>
      <title>Changing Syslog Source type for directories</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-Syslog-Source-type-for-directories/m-p/21156#M3133</link>
      <description>&lt;P&gt;We're using Syslog-ng in our environment and have a forwarder setup on syslog-ng to forward the logs to Splunk.  But when they're indexed in Splunk, the sourcetype is "syslog".  Is it possible to set this to the actual source type?  For example our syslog-ng directory structure looks like such:&lt;/P&gt;

&lt;P&gt;/logs/log-type/hostname/&lt;/P&gt;

&lt;P&gt;I want to be able to set log-type to be the sourcetype in Splunk.  It has to be possible!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2012 15:59:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-Syslog-Source-type-for-directories/m-p/21156#M3133</guid>
      <dc:creator>nkitmitto</dc:creator>
      <dc:date>2012-04-06T15:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Syslog Source type for directories</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-Syslog-Source-type-for-directories/m-p/21157#M3134</link>
      <description>&lt;P&gt;You would have to set up different monitor stanzas in &lt;CODE&gt;inputs.conf&lt;/CODE&gt; on the forwarder, e.g.;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///logs/nginx/*/]
index = your_index
sourcetype = nginx
host_segment = 3

[monitor:///logs/cisco/*/]
index = your_index
sourcetype = cisco
host_segment = 3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;etc etc&lt;/P&gt;

&lt;P&gt;If you do not specify sourcetype (which I assume you have not done) Splunk will probably identify and classify it as &lt;CODE&gt;syslog&lt;/CODE&gt;. And &lt;CODE&gt;syslog&lt;/CODE&gt; is a sourcetype (the only one I think) where Splunk will automatically extract and set the host for each event in the log individually, i.e. not on a per file basis.&lt;/P&gt;

&lt;P&gt;Therefore you will also have to set the &lt;CODE&gt;host&lt;/CODE&gt; value manually, but the &lt;CODE&gt;host_segment&lt;/CODE&gt; lets you set this from the path being monitored.&lt;/P&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian &lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2012 16:17:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-Syslog-Source-type-for-directories/m-p/21157#M3134</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-04-06T16:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Syslog Source type for directories</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-Syslog-Source-type-for-directories/m-p/21158#M3135</link>
      <description>&lt;P&gt;This goes on the forwarder?  Or should it be on the inputs.conf on the index?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2012 16:29:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-Syslog-Source-type-for-directories/m-p/21158#M3135</guid>
      <dc:creator>nkitmitto</dc:creator>
      <dc:date>2012-04-06T16:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Syslog Source type for directories</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-Syslog-Source-type-for-directories/m-p/21159#M3136</link>
      <description>&lt;P&gt;In the inputs file, I have this and it worked:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///logs/static-httpd-error-log/*/*.log]
sourcetype = static-httpd-error-log
index = main
host_segment = 3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2012 16:43:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-Syslog-Source-type-for-directories/m-p/21159#M3136</guid>
      <dc:creator>nkitmitto</dc:creator>
      <dc:date>2012-04-06T16:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Syslog Source type for directories</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-Syslog-Source-type-for-directories/m-p/21160#M3137</link>
      <description>&lt;P&gt;you are most welcome.  /k&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2012 20:36:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-Syslog-Source-type-for-directories/m-p/21160#M3137</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-04-06T20:36:32Z</dc:date>
    </item>
  </channel>
</rss>

