<?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 Can you extract JSON syslog automatically? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-extract-JSON-syslog-automatically/m-p/352470#M64602</link>
    <description>&lt;P&gt;Trying to get my syslog in json format to extract properly.&lt;/P&gt;

&lt;P&gt;I've tried using INDEXED_EXTRACTIONS=JSON as well as KV_MODE=json(not at the same time)  and neither have worked.&lt;/P&gt;

&lt;P&gt;Here is a short sample log&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Jun 13 15:41:27 host.domain.com {"account_id":"678", "legacy_domain_id":"12345", "visitor_ip":"xx.xxx.xxx.xx", "time":"1497368487.007","request":"GET /stuff/search/stuff/morestuff"}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Unfortunately it doesnt seem to be working as nothing gets extracted.&lt;BR /&gt;
I'm sure its something I'm doing or something with the log format.&lt;BR /&gt;
Any help would be apprciated.&lt;BR /&gt;
Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 14:29:40 GMT</pubDate>
    <dc:creator>tkwaller</dc:creator>
    <dc:date>2020-09-29T14:29:40Z</dc:date>
    <item>
      <title>Can you extract JSON syslog automatically?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-extract-JSON-syslog-automatically/m-p/352470#M64602</link>
      <description>&lt;P&gt;Trying to get my syslog in json format to extract properly.&lt;/P&gt;

&lt;P&gt;I've tried using INDEXED_EXTRACTIONS=JSON as well as KV_MODE=json(not at the same time)  and neither have worked.&lt;/P&gt;

&lt;P&gt;Here is a short sample log&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Jun 13 15:41:27 host.domain.com {"account_id":"678", "legacy_domain_id":"12345", "visitor_ip":"xx.xxx.xxx.xx", "time":"1497368487.007","request":"GET /stuff/search/stuff/morestuff"}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Unfortunately it doesnt seem to be working as nothing gets extracted.&lt;BR /&gt;
I'm sure its something I'm doing or something with the log format.&lt;BR /&gt;
Any help would be apprciated.&lt;BR /&gt;
Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:29:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-extract-JSON-syslog-automatically/m-p/352470#M64602</guid>
      <dc:creator>tkwaller</dc:creator>
      <dc:date>2020-09-29T14:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can you extract JSON syslog automatically?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-extract-JSON-syslog-automatically/m-p/352471#M64603</link>
      <description>&lt;P&gt;JSON will not auto-extract with the timestamp/host prefix in your data. You can use a SEDCMD to strip it out in props.conf.&lt;/P&gt;

&lt;P&gt;e.g.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_sourcetype]
SEDCMD-strip_prefix = s/^[^{]+//g
INDEXED_EXTRACTIONS=JSON
KV_MODE=none
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You'll want to add TIME_PREFIX, TIME_FORMAT, etc. as well. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:29:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-extract-JSON-syslog-automatically/m-p/352471#M64603</guid>
      <dc:creator>masonmorales</dc:creator>
      <dc:date>2020-09-29T14:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can you extract JSON syslog automatically?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-extract-JSON-syslog-automatically/m-p/352472#M64604</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;
Sorry for the delay, was super busy with work.&lt;BR /&gt;
I knew it had to be something with the preceding data but wasn't sure. I added to the config and now it looks as such:&lt;BR /&gt;
[syslogtest]&lt;BR /&gt;
SEDCMD-strip_prefix = s/^[^{]+//g&lt;BR /&gt;
INDEXED_EXTRACTIONS=JSON&lt;BR /&gt;
KV_MODE=none&lt;BR /&gt;
DATETIME_CONFIG = &lt;BR /&gt;
TIME_FORMAT = %s.%6N&lt;BR /&gt;
TIME_PREFIX = "time":"&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
category = Custom&lt;BR /&gt;
description = syslogtest&lt;BR /&gt;
disabled = false&lt;BR /&gt;
pulldown_type = true&lt;/P&gt;

&lt;P&gt;I left the default stuff there.&lt;/P&gt;

&lt;P&gt;Only now parsing doesnt take place:&lt;BR /&gt;
06-19-2017 09:36:04.310 -0500 ERROR JsonLineBreaker - JSON StreamId:5377901818726410745 had parsing error:Unexpected character while looking for value: 'J' - data_source="C:\syslog.log", data_host="L-BDL-10007862", data_sourcetype="syslogtest"&lt;/P&gt;

&lt;P&gt;Any thoughts?&lt;BR /&gt;
Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:31:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-extract-JSON-syslog-automatically/m-p/352472#M64604</guid>
      <dc:creator>tkwaller</dc:creator>
      <dc:date>2020-09-29T14:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can you extract JSON syslog automatically?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-extract-JSON-syslog-automatically/m-p/352473#M64605</link>
      <description>&lt;P&gt;So it seems it wouldn't work with:&lt;BR /&gt;
INDEXED_EXTRACTIONS=JSON&lt;/P&gt;

&lt;P&gt;but it DID work with:&lt;BR /&gt;
KV_MODE=json&lt;/P&gt;

&lt;P&gt;Thanks for the help, I appreciate it!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 16:18:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-extract-JSON-syslog-automatically/m-p/352473#M64605</guid>
      <dc:creator>tkwaller</dc:creator>
      <dc:date>2017-06-19T16:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can you extract JSON syslog automatically?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-extract-JSON-syslog-automatically/m-p/352474#M64606</link>
      <description>&lt;P&gt;Thank you, just what I needed....  &lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 21:35:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-extract-JSON-syslog-automatically/m-p/352474#M64606</guid>
      <dc:creator>andygerber</dc:creator>
      <dc:date>2017-09-28T21:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can you extract JSON syslog automatically?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-extract-JSON-syslog-automatically/m-p/352475#M64607</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;

&lt;P&gt;I'm facing the same issue.  &lt;/P&gt;

&lt;P&gt;I've added the following to my props.conf but still not working.&lt;/P&gt;

&lt;P&gt;SEDCMD-StripHeader = s/^[^{]+//g&lt;BR /&gt;
KV_MODE=json&lt;/P&gt;

&lt;P&gt;Does the associated TA need to be pushed to indexers as well as search heads?&lt;/P&gt;

&lt;P&gt;Does there need to be a reference later in props.conf to the SEDCMD-StripHeader line?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 21:01:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-extract-JSON-syslog-automatically/m-p/352475#M64607</guid>
      <dc:creator>darlas</dc:creator>
      <dc:date>2018-02-23T21:01:26Z</dc:date>
    </item>
  </channel>
</rss>

