<?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 Set hostname correctly for SYSLOG input coming into Forwarder in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Set-hostname-correctly-for-SYSLOG-input-coming-into-Forwarder/m-p/83123#M17253</link>
    <description>&lt;P&gt;I have a Linux forwarder running Splunk 4.1.2.  This system uses TCP ports to listen for SYSLOG data from certain devices.  When the log data comes in via these ports they are indexed nicely in Splunk.  But the host value for these events are set to the Forwarder's host name.  Is there a way I can REGEX the incoming SYSLOG information to grab the IP address near the beginning of the SYSLOG data, and set the host to this value?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 04 Nov 2010 01:13:11 GMT</pubDate>
    <dc:creator>castle1126</dc:creator>
    <dc:date>2010-11-04T01:13:11Z</dc:date>
    <item>
      <title>Set hostname correctly for SYSLOG input coming into Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Set-hostname-correctly-for-SYSLOG-input-coming-into-Forwarder/m-p/83123#M17253</link>
      <description>&lt;P&gt;I have a Linux forwarder running Splunk 4.1.2.  This system uses TCP ports to listen for SYSLOG data from certain devices.  When the log data comes in via these ports they are indexed nicely in Splunk.  But the host value for these events are set to the Forwarder's host name.  Is there a way I can REGEX the incoming SYSLOG information to grab the IP address near the beginning of the SYSLOG data, and set the host to this value?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2010 01:13:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Set-hostname-correctly-for-SYSLOG-input-coming-into-Forwarder/m-p/83123#M17253</guid>
      <dc:creator>castle1126</dc:creator>
      <dc:date>2010-11-04T01:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set hostname correctly for SYSLOG input coming into Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Set-hostname-correctly-for-SYSLOG-input-coming-into-Forwarder/m-p/83124#M17254</link>
      <description>&lt;P&gt;Modifying the props.conf and transforms.conf on the Splunk Indexer should do the trick. &lt;/P&gt;

&lt;P&gt;Configure a dynamically extracted host name for any source or sourcetype via transforms.conf  and props.conf. Edit these files in $SPLUNK_HOME/etc/system/local/, or your own custom application directory in $SPLUNK_HOME/etc/apps/. For more information on configuration files in general, see "About configuration files" in this manual.
Edits to transforms.conf&lt;/P&gt;

&lt;P&gt;Add your custom stanza to $SPLUNK_HOME/etc/system/local/transforms.conf. Configure your stanza as follows:&lt;/P&gt;

&lt;P&gt;[$UNIQUE_STANZA_NAME]
DEST_KEY = MetaData:Host
REGEX = $YOUR_REGEX
FORMAT = host::$1&lt;/P&gt;

&lt;P&gt;Fill in the stanza name and the regex fields with the correct values for your data.&lt;/P&gt;

&lt;P&gt;Leave DEST_KEY = MetaData:Host to write a value to the host:: field. FORMAT = host::$1 writes the REGEX value into the host:: field.&lt;/P&gt;

&lt;P&gt;Note: Name your stanza with a unique identifier (so it is not confused with a stanza in $SPLUNK_HOME/etc/system/default/transforms.conf).
Edits to props.conf&lt;/P&gt;

&lt;P&gt;Create a stanza in $SPLUNK_HOME/etc/system/local/props.conf to map the transforms.conf regex to the source type in props.conf.&lt;/P&gt;

&lt;P&gt;[]
TRANSFORMS-$name=$UNIQUE_STANZA_NAME&lt;/P&gt;

&lt;P&gt; can be:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;, the sourcetype of an event&lt;/LI&gt;
&lt;LI&gt;host::, where  is the host for an event&lt;/LI&gt;
&lt;LI&gt;source::, where  is the source for an event &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;$name is whatever unique identifier you want to give to your transform.&lt;/P&gt;

&lt;P&gt;$UNIQUE_STANZA_NAME must match the stanza name of the transform you just created in transforms.conf.&lt;/P&gt;

&lt;P&gt;Note: Optionally add any other valid attribute/value pairs from props.conf when defining your stanza. This assigns the attributes to the  you have set. For example, if you have custom line-breaking rules to set for the same , append those attributes to your stanza. &lt;/P&gt;

&lt;P&gt;Follow this link for some great examples:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/4.1.5/admin/Setthevalueofhostbasedoneventdata" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/4.1.5/admin/Setthevalueofhostbasedoneventdata&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2010 02:25:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Set-hostname-correctly-for-SYSLOG-input-coming-into-Forwarder/m-p/83124#M17254</guid>
      <dc:creator>tgow</dc:creator>
      <dc:date>2010-11-04T02:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set hostname correctly for SYSLOG input coming into Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Set-hostname-correctly-for-SYSLOG-input-coming-into-Forwarder/m-p/83125#M17255</link>
      <description>&lt;P&gt;So you would not add these settings to PROPS and TRANSFORMS on the system running Splunk Forwarder?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2010 02:28:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Set-hostname-correctly-for-SYSLOG-input-coming-into-Forwarder/m-p/83125#M17255</guid>
      <dc:creator>castle1126</dc:creator>
      <dc:date>2010-11-04T02:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set hostname correctly for SYSLOG input coming into Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Set-hostname-correctly-for-SYSLOG-input-coming-into-Forwarder/m-p/83126#M17256</link>
      <description>&lt;P&gt;To test with I added the PROPS and TRANSFORMS to my Forwarder (not running light forwarder) and the host field did change correctly.  Thanks for this information it was very helpful!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2010 22:44:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Set-hostname-correctly-for-SYSLOG-input-coming-into-Forwarder/m-p/83126#M17256</guid>
      <dc:creator>castle1126</dc:creator>
      <dc:date>2010-11-04T22:44:50Z</dc:date>
    </item>
  </channel>
</rss>

