<?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 force the host with syslog sourcetype in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-force-the-host-with-syslog-sourcetype/m-p/38099#M6985</link>
    <description>&lt;P&gt;The solution is to force the host in the inputs.conf and use another sourcetype than syslog without host extraction  &lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;define the desired host in the inputs.conf (of the default ones in the $SPLUNK_HOME/etc/system/local/inputs.conf).&lt;/LI&gt;
&lt;LI&gt;apply this sourcetype &lt;STRONG&gt;syslog_nohost&lt;/STRONG&gt; at the forwarder level in inputs.conf&lt;/LI&gt;
&lt;LI&gt;define this props.conf on the indexers&lt;/LI&gt;
&lt;LI&gt;if needed you can also define a sourcetype renaming at search time to transparently  rename syslog_nohost to syslog, see &lt;EM&gt;manager &amp;gt; fields &amp;gt; sourcetype renaming&lt;/EM&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;example &lt;BR /&gt;
&lt;CODE&gt;# inputs.conf on the forwarder&lt;BR /&gt;
[monitor:///var/log/messages]&lt;BR /&gt;
sourcetype=syslog_nohost&lt;BR /&gt;
host=myhostiwanttoenforce&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;# props.conf on the indexers&lt;BR /&gt;
[syslog_nohost] &lt;BR /&gt;
 #based on a copy of syslog version 5.0.2 &lt;BR /&gt;
 #TRANSFORMS = syslog-host &lt;BR /&gt;
 #disabling the host extraction&lt;BR /&gt;
TRANSFORMS = &lt;BR /&gt;
pulldown_type = true &lt;BR /&gt;
maxDist = 3 &lt;BR /&gt;
TIME_FORMAT = %b %d %H:%M:%S &lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 32 &lt;BR /&gt;
REPORT-syslog = syslog-extractions &lt;BR /&gt;
SHOULD_LINEMERGE = False &lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Feb 2013 18:49:55 GMT</pubDate>
    <dc:creator>yannK</dc:creator>
    <dc:date>2013-02-20T18:49:55Z</dc:date>
    <item>
      <title>How to force the host with syslog sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-force-the-host-with-syslog-sourcetype/m-p/38098#M6984</link>
      <description>&lt;P&gt;This is a common issue with the syslog sourceytype.&lt;BR /&gt;
By default it behave differently from the other inputs, &lt;STRONG&gt;the host is extracted from the events.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;#inputs.conf&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[monitor:///var/log/messages]&lt;BR /&gt;
sourcetype=syslog&lt;BR /&gt;
host=myhostname&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;with the events :&lt;BR /&gt;
&lt;CODE&gt;Feb 19 22:06:35 10.21.24.612 INFO I am a fabulous server&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The final host will be &lt;STRONG&gt;10.21.24.612&lt;/STRONG&gt; not &lt;STRONG&gt;myhostname&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I want to change the behavior.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2013 18:46:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-force-the-host-with-syslog-sourcetype/m-p/38098#M6984</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-02-20T18:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to force the host with syslog sourcetype</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-force-the-host-with-syslog-sourcetype/m-p/38099#M6985</link>
      <description>&lt;P&gt;The solution is to force the host in the inputs.conf and use another sourcetype than syslog without host extraction  &lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;define the desired host in the inputs.conf (of the default ones in the $SPLUNK_HOME/etc/system/local/inputs.conf).&lt;/LI&gt;
&lt;LI&gt;apply this sourcetype &lt;STRONG&gt;syslog_nohost&lt;/STRONG&gt; at the forwarder level in inputs.conf&lt;/LI&gt;
&lt;LI&gt;define this props.conf on the indexers&lt;/LI&gt;
&lt;LI&gt;if needed you can also define a sourcetype renaming at search time to transparently  rename syslog_nohost to syslog, see &lt;EM&gt;manager &amp;gt; fields &amp;gt; sourcetype renaming&lt;/EM&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;example &lt;BR /&gt;
&lt;CODE&gt;# inputs.conf on the forwarder&lt;BR /&gt;
[monitor:///var/log/messages]&lt;BR /&gt;
sourcetype=syslog_nohost&lt;BR /&gt;
host=myhostiwanttoenforce&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;# props.conf on the indexers&lt;BR /&gt;
[syslog_nohost] &lt;BR /&gt;
 #based on a copy of syslog version 5.0.2 &lt;BR /&gt;
 #TRANSFORMS = syslog-host &lt;BR /&gt;
 #disabling the host extraction&lt;BR /&gt;
TRANSFORMS = &lt;BR /&gt;
pulldown_type = true &lt;BR /&gt;
maxDist = 3 &lt;BR /&gt;
TIME_FORMAT = %b %d %H:%M:%S &lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 32 &lt;BR /&gt;
REPORT-syslog = syslog-extractions &lt;BR /&gt;
SHOULD_LINEMERGE = False &lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2013 18:49:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-force-the-host-with-syslog-sourcetype/m-p/38099#M6985</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-02-20T18:49:55Z</dc:date>
    </item>
  </channel>
</rss>

