<?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: double host name and timestamps in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/double-host-name-and-timestamps/m-p/17402#M2237</link>
    <description>&lt;P&gt;I guess I should just keep trying. 
I figured out how to get it to work.&lt;/P&gt;

&lt;P&gt;in $SPLUNK_HOME/etc/system/local create props.conf&lt;/P&gt;

&lt;P&gt;props.conf &lt;/P&gt;

&lt;P&gt;[syslog]
TRANSFORMS = syslog-header-stripper-ts-host
REPORT-syslog = syslog-extractions&lt;/P&gt;

&lt;P&gt;In $SPLUNK_HOME/etc/system/local create transforms.conf&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;P&gt;[syslog-header-stripper-ts-host]
REGEX         = ^[A-Z][a-z]+\s+\d+\s\d+:\d+:\d+\s[^\s]&lt;EM&gt;\s(.&lt;/EM&gt;)$
FORMAT        = $1
DEST_KEY      = _raw&lt;/P&gt;

&lt;P&gt;Restart Splunk and it works&lt;/P&gt;</description>
    <pubDate>Thu, 15 Jul 2010 02:21:29 GMT</pubDate>
    <dc:creator>bbear</dc:creator>
    <dc:date>2010-07-15T02:21:29Z</dc:date>
    <item>
      <title>double host name and timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/double-host-name-and-timestamps/m-p/17400#M2235</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I have been trying to get Splunk to strip off the timestamp and host of forwarded events but do not understand how to do this.&lt;/P&gt;

&lt;P&gt;I have syslog-ng and Splunk on the same server. Syslog-ng is forwarding the events to udp port 1514 for Splunk to read and index. This all works fine. But the data Splunk receives has the timestamp and hostname of the syslog server in addition to the evendata host. I.E.&lt;/P&gt;

&lt;P&gt;Jul 14 14:15:56 10.128.213.50 Jul 14 14:15:56 my-host-int02 snmpd[7777]: Received SNMP packet(s) from UDP: [10.128.30.20]:54900 &lt;/P&gt;

&lt;P&gt;Notice the additional timestamp above.
I see in the docs and in the answers forum that this is possible to have Splunk strip this out before indexing, but I have not been able to get all the pieces worked out.&lt;/P&gt;

&lt;P&gt;Does someone know the answer that has worked this out already? 
I would like Splunk to strip the event to look like:&lt;/P&gt;

&lt;P&gt;Jul 14 14:15:56 my-host-int02 snmpd[7777]: Received SNMP packet(s) from UDP: [10.128.30.20]:54900 &lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2010 01:19:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/double-host-name-and-timestamps/m-p/17400#M2235</guid>
      <dc:creator>bbear</dc:creator>
      <dc:date>2010-07-15T01:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: double host name and timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/double-host-name-and-timestamps/m-p/17401#M2236</link>
      <description>&lt;P&gt;You could do this by modifying the raw event text with a SEDCMD your props.conf (eg. $SPLUNK_HOME/etc/system/local/props.conf)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::tcp:1514]
SEDCMD-remove-dbl-date=s/^[A-Z][a-z]+\s+\d+\s+\d+:\d+:\d+\s+([A-Z][a-z]+\s+\d+\s+\d+:\d+:\d+\s+)/\1/g
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Jul 2010 02:18:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/double-host-name-and-timestamps/m-p/17401#M2236</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-07-15T02:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: double host name and timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/double-host-name-and-timestamps/m-p/17402#M2237</link>
      <description>&lt;P&gt;I guess I should just keep trying. 
I figured out how to get it to work.&lt;/P&gt;

&lt;P&gt;in $SPLUNK_HOME/etc/system/local create props.conf&lt;/P&gt;

&lt;P&gt;props.conf &lt;/P&gt;

&lt;P&gt;[syslog]
TRANSFORMS = syslog-header-stripper-ts-host
REPORT-syslog = syslog-extractions&lt;/P&gt;

&lt;P&gt;In $SPLUNK_HOME/etc/system/local create transforms.conf&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;P&gt;[syslog-header-stripper-ts-host]
REGEX         = ^[A-Z][a-z]+\s+\d+\s\d+:\d+:\d+\s[^\s]&lt;EM&gt;\s(.&lt;/EM&gt;)$
FORMAT        = $1
DEST_KEY      = _raw&lt;/P&gt;

&lt;P&gt;Restart Splunk and it works&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2010 02:21:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/double-host-name-and-timestamps/m-p/17402#M2237</guid>
      <dc:creator>bbear</dc:creator>
      <dc:date>2010-07-15T02:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: double host name and timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/double-host-name-and-timestamps/m-p/17403#M2238</link>
      <description>&lt;P&gt;It would be best to avoid having the double added in the first place. In inputs.conf, under where you define the input port, add:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;no_appending_timestamp = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;From inputs.conf.spec documentation file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;no_appending_timestamp = true
* If this attribute is set to true, then Splunk does NOT append a timestamp and host to received events.
* NOTE: Do NOT include this key if you want to append timestamp and host to received events.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Jul 2010 05:51:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/double-host-name-and-timestamps/m-p/17403#M2238</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-07-15T05:51:57Z</dc:date>
    </item>
  </channel>
</rss>

