<?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 Add-on for Amazon Web Services: Why are injested JSON event fields not extracted using a custom sourcetype for Kinesis stream? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Amazon-Web-Services-Why-are-injested-JSON/m-p/257066#M29594</link>
    <description>&lt;P&gt;Hello... @mreynov_splunk can you help? &lt;BR /&gt;
Is this an actual bug like &lt;A href="https://answers.splunk.com/answers/451302/splunk-add-on-for-amazon-web-services-bug-cloudwat.html"&gt;before&lt;/A&gt; or am I doing something wrong?&lt;/P&gt;</description>
    <pubDate>Tue, 06 Dec 2016 01:56:55 GMT</pubDate>
    <dc:creator>markconlin</dc:creator>
    <dc:date>2016-12-06T01:56:55Z</dc:date>
    <item>
      <title>Splunk Add-on for Amazon Web Services: Why are injested JSON event fields not extracted using a custom sourcetype for Kinesis stream?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Amazon-Web-Services-Why-are-injested-JSON/m-p/257065#M29593</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Objective&lt;/STRONG&gt;&lt;BR /&gt;
Using the Splunk Add-on for Amazon Web Services to ingest events from AWS Kinesis with a custom sourcetype.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Issue&lt;/STRONG&gt;&lt;BR /&gt;
Ingested json event fields are not extracted when using custom sourcetype. &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;What I have tried&lt;/STRONG&gt;&lt;BR /&gt;
I have created Kinesis inputs to read from the stream. One with the sourcetype = aws:kinesis (as specified in the documentation here &lt;A href="http://docs.splunk.com/Documentation/AddOns/released/AWS/Kinesis"&gt;http://docs.splunk.com/Documentation/AddOns/released/AWS/Kinesis&lt;/A&gt;) and one with a custom sourcetype.&lt;/P&gt;

&lt;P&gt;The custom sourcetype events do not have extracted json fields. (see picture attached).&lt;BR /&gt;
The standard sourceytpe events do have extracted json fields.&lt;BR /&gt;
I have tested this sourcetype using oneshot to place json data into a test index and the fields were extracted correctly.&lt;/P&gt;

&lt;P&gt;Create indices&lt;BR /&gt;
/opt/splunk/bin# ./splunk add index fromkinesis&lt;BR /&gt;
/opt/splunk/bin# ./splunk add index bythebookkn&lt;BR /&gt;
/opt/splunk/bin# ./splunk add index oneshottest&lt;/P&gt;

&lt;P&gt;Test sourcetype with oneshot &lt;BR /&gt;
/opt/splunk/bin# ./splunk add oneshot /opt/splunk/data/test.json -sourcetype myevents -index oneshottest&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Kinesis inputs&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/opt/splunk/etc/apps/Splunk_TA_aws/local# cat aws_kinesis_tasks.conf

[bythebookkn]
account = splunk
encoding =
format = CloudWatchLogs
index = bythebookkn
init_stream_position = LATEST
region = us-east-1
sourcetype = aws:kinesis
stream_names = stage-my-events

[fromkinesis]
account = splunk
encoding =
format = CloudWatchLogs
index = fromkinesis
init_stream_position = LATEST
region = us-east-1
sourcetype = myevents
stream_names = stage-my-events
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Sourcetype&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/opt/splunk/etc/system/local# cat props.conf
TRUNCATE = 800000

[myevents]
INDEXED_EXTRACTIONS = json
TIMESTAMP_FIELDS = info.created
TIME_FORMAT = %Y-%d-%m %H:%M:%S.%3Q
TZ = UTC
detect_trailing_nulls = auto
SHOULD_LINEMERGE = false
KV_MODE = none
AUTO_KV_JSON = false
category = Custom
disabled = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2207i0A24550A359B2091/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2208i969AB68A7E4D25FA/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 05:01:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Amazon-Web-Services-Why-are-injested-JSON/m-p/257065#M29593</guid>
      <dc:creator>markconlin</dc:creator>
      <dc:date>2016-11-29T05:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Add-on for Amazon Web Services: Why are injested JSON event fields not extracted using a custom sourcetype for Kinesis stream?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Amazon-Web-Services-Why-are-injested-JSON/m-p/257066#M29594</link>
      <description>&lt;P&gt;Hello... @mreynov_splunk can you help? &lt;BR /&gt;
Is this an actual bug like &lt;A href="https://answers.splunk.com/answers/451302/splunk-add-on-for-amazon-web-services-bug-cloudwat.html"&gt;before&lt;/A&gt; or am I doing something wrong?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 01:56:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Amazon-Web-Services-Why-are-injested-JSON/m-p/257066#M29594</guid>
      <dc:creator>markconlin</dc:creator>
      <dc:date>2016-12-06T01:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Add-on for Amazon Web Services: Why are injested JSON event fields not extracted using a custom sourcetype for Kinesis stream?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Amazon-Web-Services-Why-are-injested-JSON/m-p/257067#M29595</link>
      <description>&lt;P&gt;I think you need to remove format=CloudWatchLogs because that strips the JSON wrapper. Set it to "none" and try again.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2016 18:17:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Amazon-Web-Services-Why-are-injested-JSON/m-p/257067#M29595</guid>
      <dc:creator>mreynov_splunk</dc:creator>
      <dc:date>2016-12-09T18:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Add-on for Amazon Web Services: Why are injested JSON event fields not extracted using a custom sourcetype for Kinesis stream?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Amazon-Web-Services-Why-are-injested-JSON/m-p/257068#M29596</link>
      <description>&lt;P&gt;@mreynov_splunk This change does not achieve my objective. &lt;/P&gt;

&lt;P&gt;The result is that I get a well extracted json document that is a kinesis event. Meanwhile my log messages (which are also json) are a text field in the Kinesis json called "message" and are totally not parsed as json. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
   "logGroup":"STAGE-airborne-boeing-logs",
   "owner":"076263846157",
   "logStream":"json-STAGE-airborne-stage-alfa-i-ba21b342",
   "subscriptionFilters":[
      "stage-airborne-boeing"
   ],
   "messageType":"DATA_MESSAGE",
   "logEvents":[
      {
         "id":"33043166675459237061536447207295493120073654567646199808",
         "message":"{\"info\": {\"event_type\": \"session_custom_period\", \"relativeCreated\": 8933604.59113121, \"process\": 17277, \"period\": 120, \"module\": \"sessions\", \"funcName\": \"save\", \"msecs\": 616.2080764770508, \"message\": \"Save custom session expiration period\", \"filename\": \"sessions.py\", \"levelno\": 20, \"processName\": \"MainProcess\", \"lineno\": 147, \"asctime\": \"2016-12-14 09:13:59,616\", \"msg\": \"Save custom session expiration period\", \"loggername\": \"airborne.core.accounts.sessions\", \"exc_text\": null, \"name\": \"airborne.core.accounts.sessions\", \"thread\": 140696234220752, \"created\": \"2016-12-14 17:13:59.616\", \"threadName\": \"GreenThread-430\", \"session_id\": \"8io3n7e518knrklws112pgdmwfrvyqur\", \"pathname\": \"/home/ubuntu/projects/airborne/airborne/core/accounts/sessions.py\", \"exc_info\": null, \"message_type\": \"accounts\", \"levelname\": \"INFO\"}, \"context\": {}}",
         "timestamp":1481706839000
      }
   ]
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2206iD7E6C2971BD6F558/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 17:19:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Amazon-Web-Services-Why-are-injested-JSON/m-p/257068#M29596</guid>
      <dc:creator>markconlin</dc:creator>
      <dc:date>2016-12-14T17:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Add-on for Amazon Web Services: Why are injested JSON event fields not extracted using a custom sourcetype for Kinesis stream?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Amazon-Web-Services-Why-are-injested-JSON/m-p/257069#M29597</link>
      <description>&lt;P&gt;hmm... it should work if it is proper JSON throughout. This is the first question to answer. If not, then yea, you are in a pickle.&lt;/P&gt;

&lt;P&gt;either way, it makes sense to start from Kinesis, because at least it handles the JSON wrapper for you. &lt;BR /&gt;
Send me a sample and I can try it. (I am assuming the sample above is not how your data looked like coming in; I am specifically interested in the back slashes)&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2016 23:01:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Add-on-for-Amazon-Web-Services-Why-are-injested-JSON/m-p/257069#M29597</guid>
      <dc:creator>mreynov_splunk</dc:creator>
      <dc:date>2016-12-18T23:01:51Z</dc:date>
    </item>
  </channel>
</rss>

