<?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: Indexing hostname by segment issue in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108145#M22752</link>
    <description>&lt;P&gt;oops. That last line should have been &lt;/P&gt;

&lt;P&gt;TRANSFORMS =&lt;/P&gt;</description>
    <pubDate>Tue, 03 Apr 2012 20:32:25 GMT</pubDate>
    <dc:creator>BobM</dc:creator>
    <dc:date>2012-04-03T20:32:25Z</dc:date>
    <item>
      <title>Indexing hostname by segment issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108138#M22745</link>
      <description>&lt;P&gt;v4.3.1 on sles linux&lt;BR /&gt;
i have a source which is a file in a dynamic path and the source is configured to use segment #4 of the path to assign the hostname to the indexed event.&lt;/P&gt;

&lt;P&gt;/logs/syslog/linux/.../log&lt;BR /&gt;
the real path is /logs/syslog/linux/$HOSTNAME/$YEAR/$MONTH/log &lt;/P&gt;

&lt;P&gt;i went to Search App, Dashboards &amp;amp; Views, Summary and i am looking at the Hosts list. weird, in the list are hosts with abbreviated weekday names "Mon" "Tue" "Wed" "Thu" "Fri" "Sat" "Sun" ??!! i dont have any hosts or paths with these names. its all the same real host in this case, one of my linux boxes. the dates of the events match the weekday, as example, the events for host=Tue has events dated 4/3/2012 and 3/27/2012, host=Mon has 4/2 and 3/26, etc.&lt;/P&gt;

&lt;P&gt;so where/why is Splunk indexing events as host=Tues or host=Mon ??&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2012 16:14:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108138#M22745</guid>
      <dc:creator>cvajs</dc:creator>
      <dc:date>2012-04-03T16:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Indexing hostname by segment issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108139#M22746</link>
      <description>&lt;P&gt;Please can you tell us the sourcetype and paste a couple of lines of the log.&lt;/P&gt;

&lt;P&gt;I suspect it is similar enough to syslog that splunk is trying to extract the host field from the data but where syslog would normally have a host, your data has the weekday. If so, setting the sourcetype to something else should fix it.&lt;/P&gt;

&lt;P&gt;Bob&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2012 16:40:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108139#M22746</guid>
      <dc:creator>BobM</dc:creator>
      <dc:date>2012-04-03T16:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Indexing hostname by segment issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108140#M22747</link>
      <description>&lt;P&gt;ok, the data is syslog data and it does have abbreviated weekday as a field, however, this is not the definition of assigned hostname by path segment for the data source, so perhaps a bug in Splunk?&lt;/P&gt;

&lt;P&gt;Specify which segment of the source path to set as the Host field. &lt;BR /&gt;
For example: 3 (sets to 'hostname' for the path /var/log/hostname/)&lt;/P&gt;

&lt;P&gt;my syslog-ng data gets written as template("$DATE $TZ $WEEKDAY $ISODATE $HOST $FACILITY [$LEVEL] $MSG\n")&lt;/P&gt;

&lt;P&gt;example raw syslog entry:&lt;BR /&gt;
Apr  1 00:10:01 -04:00 Sun 2012-04-01T00:10:01-04:00 host01x03 cron [info] crond[21399]: (root) CMD (/usr/lib/sa/sa1 1 1)&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2012 17:40:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108140#M22747</guid>
      <dc:creator>cvajs</dc:creator>
      <dc:date>2012-04-03T17:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Indexing hostname by segment issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108141#M22748</link>
      <description>&lt;P&gt;maybe the issue is my defined path of /logs/syslog/linux/.../log&lt;BR /&gt;
perhaps Splunk is not expanding this before assigning hostname from path, so it tries to extract it from the raw data? if so this is not documented, i would expect it to expand the path before extracting the hostname from path for the log file it reads, etc. i rely on my syslog-ng config to properly store host data in a correct location regardless of how the raw data may be formatted, meaning raw data may have wrong hostname but syslog-ng puts it in correctly defined path, etc. why just this one linux host and not all my data?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2012 17:47:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108141#M22748</guid>
      <dc:creator>cvajs</dc:creator>
      <dc:date>2012-04-03T17:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Indexing hostname by segment issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108142#M22749</link>
      <description>&lt;P&gt;This is the default action for syslog data. It overwrites the host with whatever it finds after the timestamp. You can get round this by changing the sourcetype to something else or turning off the default processing for syslog data.&lt;BR /&gt;
To stop the default processing add the following two lines to a local/props.conf file.&lt;/P&gt;

&lt;P&gt;[syslog]&lt;/P&gt;

&lt;P&gt;TRANSFORMS&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2012 18:44:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108142#M22749</guid>
      <dc:creator>BobM</dc:creator>
      <dc:date>2012-04-03T18:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Indexing hostname by segment issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108143#M22750</link>
      <description>&lt;P&gt;perhaps you explained why i see what i see, but that would be completely confusing since the source page gives the options to define hostname by path segment, and offers no text explanation or options to override the default "syslog" definition as you explain it. this falls into my book of klugeyness.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2012 19:11:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108143#M22750</guid>
      <dc:creator>cvajs</dc:creator>
      <dc:date>2012-04-03T19:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Indexing hostname by segment issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108144#M22751</link>
      <description>&lt;P&gt;i added those two lines to /opt/splunk/etc/system/local/props.conf and bounced the service, it is still logging host=Tue&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2012 19:31:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108144#M22751</guid>
      <dc:creator>cvajs</dc:creator>
      <dc:date>2012-04-03T19:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Indexing hostname by segment issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108145#M22752</link>
      <description>&lt;P&gt;oops. That last line should have been &lt;/P&gt;

&lt;P&gt;TRANSFORMS =&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2012 20:32:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108145#M22752</guid>
      <dc:creator>BobM</dc:creator>
      <dc:date>2012-04-03T20:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Indexing hostname by segment issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108146#M22753</link>
      <description>&lt;P&gt;i changed my syslog template to ("$WEEKDAY $DATE $TZ $HOST $FACILITY [$LEVEL] $MSG\n")&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2012 20:45:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Indexing-hostname-by-segment-issue/m-p/108146#M22753</guid>
      <dc:creator>cvajs</dc:creator>
      <dc:date>2012-04-03T20:45:40Z</dc:date>
    </item>
  </channel>
</rss>

