<?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: How to extract fields from json ? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-fields-from-json/m-p/471437#M81022</link>
    <description>&lt;P&gt;@jerzy999 &lt;/P&gt;

&lt;P&gt;JSON string in your event is not accurate. Bcoz I can see &lt;CODE&gt;[+]&lt;/CODE&gt; unexpanded value in your event. So please provide full event with valid JSON string.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;affectedPackage: [ [+]
  ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you have a mixed-format event then we need to extract JSON from that event then fields from them. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;  &lt;/P&gt;</description>
    <pubDate>Wed, 04 Sep 2019 13:18:13 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2019-09-04T13:18:13Z</dc:date>
    <item>
      <title>How to extract fields from json ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-fields-from-json/m-p/471436#M81021</link>
      <description>&lt;P&gt;I do have a single (unfortunately not very repetitive in terms of number of characters and overall form) JSON event with many fields that I would like to extract:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   affectedPackage: [ [+]
     ]
     bulletinFamily: unix
     cvelist: [ [-]
       CVE-2019-9511
       CVE-2019-9513
     ]
     cvss: { [-]
       score: 7.8
       vector: AV:N/AC:L/Au:N/C:N/I:N/A:C
     }
     description: - -------------------------------------------------------------------------
Debian Security Advisory DSA-4511-1                   security@debian.org
&lt;A href="https://www.debian.org/security/" target="test_blank"&gt;https://www.debian.org/security/&lt;/A&gt;                       Moritz Muehlenhoff
September 01, 2019                    &lt;A href="https://www.debian.org/security/faq" target="test_blank"&gt;https://www.debian.org/security/faq&lt;/A&gt;
- -------------------------------------------------------------------------

Package        : nghttp2
CVE ID         : CVE-2019-9511 CVE-2019-9513

Two vulnerabilities were discovered in the HTTP/2 code of the nghttp2
HTTP server, which could result in denial of service.

For the oldstable distribution (stretch), these problems have been fixed
in version 1.18.1-1+deb9u1.

For the stable distribution (buster), these problems have been fixed in
version 1.36.0-2+deb10u1.

We recommend that you upgrade your nghttp2 packages.

For the detailed security status of nghttp2 please refer to
its security tracker page at:
&lt;A href="https://security-tracker.debian.org/tracker/nghttp2" target="test_blank"&gt;https://security-tracker.debian.org/tracker/nghttp2&lt;/A&gt;

Further information about Debian Security Advisories, how to apply
these updates to your system and frequently asked questions can be
found at: &lt;A href="https://www.debian.org/security/" target="test_blank"&gt;https://www.debian.org/security/&lt;/A&gt;

Mailing list: debian-security-announce@lists.debian.org

     href: &lt;A href="https://lists.debian.org/debian-security-announce/debian-security-announce-2019/msg00159.html" target="test_blank"&gt;https://lists.debian.org/debian-security-announce/debian-security-announce-2019/msg00159.html&lt;/A&gt;
     id: DEBIAN:DSA-4511-1:15C61
     modified: 2019-09-01T21:08:24
     published: 2019-09-01T21:08:24
     title: [SECURITY] [DSA 4511-1] nghttp2 security update
     type: debian
     vhref: &lt;A href="https://vulners.com/debian/DEBIAN:DSA-4511-1:15C61" target="test_blank"&gt;https://vulners.com/debian/DEBIAN:DSA-4511-1:15C61&lt;/A&gt; 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What is the most optimal way to perform field extraction from this type of event. I am interested in dividing following example for fields such as: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;affectedPackage
bulletinFamily
cvelist
href 
title 
published
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and so on...&lt;/P&gt;

&lt;P&gt;I do ingestion for single day in terms of technologies that I am interested in into single event using a python script -&amp;gt; (HEC) Splunk&lt;BR /&gt;
and want to generate alerts in Splunk based on critical events which I collect &lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 12:51:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-fields-from-json/m-p/471436#M81021</guid>
      <dc:creator>jerzy999</dc:creator>
      <dc:date>2019-09-04T12:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields from json ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-fields-from-json/m-p/471437#M81022</link>
      <description>&lt;P&gt;@jerzy999 &lt;/P&gt;

&lt;P&gt;JSON string in your event is not accurate. Bcoz I can see &lt;CODE&gt;[+]&lt;/CODE&gt; unexpanded value in your event. So please provide full event with valid JSON string.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;affectedPackage: [ [+]
  ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you have a mixed-format event then we need to extract JSON from that event then fields from them. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;  &lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 13:18:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-fields-from-json/m-p/471437#M81022</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2019-09-04T13:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields from json ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-fields-from-json/m-p/471438#M81023</link>
      <description>&lt;P&gt;Assuming the event is true JSON, set the input sourcetype to either "json_no_timestamp" or "_json". These are built-in Splunk sourcetypes. As &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt; said, the event you posted is not in true JSON format, but that might just be because you didn't copy the true raw value.&lt;/P&gt;

&lt;P&gt;Changing the input will only apply to future events. Once updated, if you go this route, trigger more events or wait, and all of your fields should be automatically extracted similar to the way you described.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:59:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-fields-from-json/m-p/471438#M81023</guid>
      <dc:creator>jacobpevans</dc:creator>
      <dc:date>2020-09-30T01:59:17Z</dc:date>
    </item>
  </channel>
</rss>

