<?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: Splunk Parser Ignore Datetime and Host Fields in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-Parser-Ignore-Datetime-and-Host-Fields/m-p/460541#M79498</link>
    <description>&lt;P&gt;Do you know how i can parse to log giving that the time and host values are in the beggining of it?&lt;/P&gt;</description>
    <pubDate>Wed, 20 May 2020 17:21:11 GMT</pubDate>
    <dc:creator>jmsilva9500</dc:creator>
    <dc:date>2020-05-20T17:21:11Z</dc:date>
    <item>
      <title>Splunk Parser Ignore Datetime and Host Fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-Parser-Ignore-Datetime-and-Host-Fields/m-p/460537#M79494</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm struggling with finding a parser in splunk for the following log:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;May 20 12:22:21 127.0.0.1 {"rootId": "AXIxikL8ao-yaSvA", "requestId": "f6a873jkjjkjk:-8000:5738", "details": {"flag": false, "title": "task 1", "status": "Waiting", "group": "", "order": 0}, "operation": "Creation", "objectId": "AXIyCN5Oao-H5aYyaSvd", "startDate": 1589977341890, "objectType": "case_task", "base": true, "object": {"_routing": "AXIxikL8ao-H5aYyaSvA", "flag": false, "_type": "case_task", "title": "task 1", "createdAt": 1589977341516, "_parent": "AXIxikL8ao-H5aYyaSvA", "createdBy": "user", "_id": "AXIyCN5Oao-H5aYyaSvd", "id": "AXIyCN5Oao-H5aYyaSvd", "_version": 1, "order": 0, "status": "Waiting", "group": ""}}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The log itself is a valid json, and i can parse it well with the default &lt;STRONG&gt;_json&lt;/STRONG&gt; parser. However, splunk inserts the datetime and hostname at the beginning of the log, which makes the parser stop working..&lt;/P&gt;

&lt;P&gt;Is there any workaround for this?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 12:51:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-Parser-Ignore-Datetime-and-Host-Fields/m-p/460537#M79494</guid>
      <dc:creator>jmsilva9500</dc:creator>
      <dc:date>2020-05-20T12:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Parser Ignore Datetime and Host Fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-Parser-Ignore-Datetime-and-Host-Fields/m-p/460538#M79495</link>
      <description>&lt;P&gt;The parser works, but it doesn't work.  Please explain.&lt;BR /&gt;
How is the data getting to Splunk?&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 14:17:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-Parser-Ignore-Datetime-and-Host-Fields/m-p/460538#M79495</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-05-20T14:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Parser Ignore Datetime and Host Fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-Parser-Ignore-Datetime-and-Host-Fields/m-p/460539#M79496</link>
      <description>&lt;P&gt;The data is being sent by remote syslog. the _json parser works for the log that is sent to splunk,  but at indexing time splunk inserts at the beginning of the log the datetime and the host values, which makes the log itself no longer a valid json, therefore the parser fails&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 14:30:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-Parser-Ignore-Datetime-and-Host-Fields/m-p/460539#M79496</guid>
      <dc:creator>jmsilva9500</dc:creator>
      <dc:date>2020-05-20T14:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Parser Ignore Datetime and Host Fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-Parser-Ignore-Datetime-and-Host-Fields/m-p/460540#M79497</link>
      <description>&lt;P&gt;I think it's syslog that is adding the time and host values.  Splunk also adds timestamp and host, but it's in metadata, not the raw data.&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 16:35:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-Parser-Ignore-Datetime-and-Host-Fields/m-p/460540#M79497</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-05-20T16:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Parser Ignore Datetime and Host Fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-Parser-Ignore-Datetime-and-Host-Fields/m-p/460541#M79498</link>
      <description>&lt;P&gt;Do you know how i can parse to log giving that the time and host values are in the beggining of it?&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 17:21:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-Parser-Ignore-Datetime-and-Host-Fields/m-p/460541#M79498</guid>
      <dc:creator>jmsilva9500</dc:creator>
      <dc:date>2020-05-20T17:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Parser Ignore Datetime and Host Fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-Parser-Ignore-Datetime-and-Host-Fields/m-p/460542#M79499</link>
      <description>&lt;P&gt;Try using SEDCMD in props.conf to strip out the timestamp and host info.  Should be easy with &lt;CODE&gt;"s/^.*\{//"&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 18:19:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-Parser-Ignore-Datetime-and-Host-Fields/m-p/460542#M79499</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-05-20T18:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Parser Ignore Datetime and Host Fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-Parser-Ignore-Datetime-and-Host-Fields/m-p/460543#M79500</link>
      <description>&lt;P&gt;default &lt;CODE&gt;_json&lt;/CODE&gt; parser is &lt;CODE&gt;INDEXED_EXTRACTION=json&lt;/CODE&gt;&lt;BR /&gt;
This can't work on using &lt;CODE&gt;SEDCMD&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+)
INDEXED_EXTRACTION = none
KV_MODE = json
TRUNCATE = 0
SEDCMD-trim = s/.*?{/{/
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 23 May 2020 23:39:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-Parser-Ignore-Datetime-and-Host-Fields/m-p/460543#M79500</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-23T23:39:43Z</dc:date>
    </item>
  </channel>
</rss>

