<?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 Splunk searching nested json in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-searching-nested-json/m-p/399610#M115840</link>
    <description>&lt;P&gt;Hello&lt;BR /&gt;
I use automatic translation because I am not good at English. sorry.&lt;/P&gt;

&lt;P&gt;I took NVD 's CVE list (Json Feed) into Splunk.&lt;BR /&gt;
That's index="testIndex" product_name = "openssl" "version_data" = "1.6.0" Searching with&lt;BR /&gt;
There is no "1.6.0" in the version of openssl&lt;/P&gt;

&lt;P&gt;I want to link product with version but it does not work as expected.&lt;BR /&gt;
I can't get spath or mvexpand to extract the nested arrays properly&lt;BR /&gt;
Someone help me.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; {
            "cve" : {
              "CVE_data_meta" : {
                "ID" : "CVE-2013-0169",
                "ASSIGNER" : "cve@mitre.org"
              },
              "affects" : {
                "vendor" : {
                  "vendor_data" : [ {
                    "vendor_name" : "openssl",
                    "product" : {
                      "product_data" : [ {
                        "product_name" : "openssl",
                        "version" : {
                          "version_data" : [ {
                            "version_value" : "*"
                          }, {
                            "version_value" : "0.9.8"
                          }, {
                            "version_value" : "0.9.8a"
                          }, {
                            "version_value" : "0.9.8b"
                          }, {
                            "version_value" : "0.9.8c"
                          }, {
                            "version_value" : "0.9.8d"
                          }, {
                            "version_value" : "0.9.8f"
                          }, {
                            "version_value" : "0.9.8g"
                          } ]
                        }
                      } ]
                    }
                  }, {
                    "vendor_name" : "oracle",
                    "product" : {
                      "product_data" : [ {
                        "product_name" : "openjdk",
                        "version" : {
                          "version_data" : [ {
                            "version_value" : "-"
                          }, {
                            "version_value" : "1.6.0"
                          }, {
                            "version_value" : "1.7.0"
                          } ]
                        }
                      } ]
                    }
                  }, {
                    "vendor_name" : "polarssl",
                    "product" : {
                      "product_data" : [ {
                        "product_name" : "polarssl",
                        "version" : {
                          "version_data" : [ {
                            "version_value" : "0.10.0"
                          }, {
                            "version_value" : "0.10.1"
                          }, {
                            "version_value" : "0.11.0"
                          } ]
                        }
                      } ]
                    }
                  } ]
                }
              }
            },
            "publishedDate" : "2013-02-08T19:55Z",
            "lastModifiedDate" : "2018-08-09T01:29Z"
          }
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 29 Sep 2020 20:50:56 GMT</pubDate>
    <dc:creator>blaku</dc:creator>
    <dc:date>2020-09-29T20:50:56Z</dc:date>
    <item>
      <title>Splunk searching nested json</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-searching-nested-json/m-p/399610#M115840</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;
I use automatic translation because I am not good at English. sorry.&lt;/P&gt;

&lt;P&gt;I took NVD 's CVE list (Json Feed) into Splunk.&lt;BR /&gt;
That's index="testIndex" product_name = "openssl" "version_data" = "1.6.0" Searching with&lt;BR /&gt;
There is no "1.6.0" in the version of openssl&lt;/P&gt;

&lt;P&gt;I want to link product with version but it does not work as expected.&lt;BR /&gt;
I can't get spath or mvexpand to extract the nested arrays properly&lt;BR /&gt;
Someone help me.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; {
            "cve" : {
              "CVE_data_meta" : {
                "ID" : "CVE-2013-0169",
                "ASSIGNER" : "cve@mitre.org"
              },
              "affects" : {
                "vendor" : {
                  "vendor_data" : [ {
                    "vendor_name" : "openssl",
                    "product" : {
                      "product_data" : [ {
                        "product_name" : "openssl",
                        "version" : {
                          "version_data" : [ {
                            "version_value" : "*"
                          }, {
                            "version_value" : "0.9.8"
                          }, {
                            "version_value" : "0.9.8a"
                          }, {
                            "version_value" : "0.9.8b"
                          }, {
                            "version_value" : "0.9.8c"
                          }, {
                            "version_value" : "0.9.8d"
                          }, {
                            "version_value" : "0.9.8f"
                          }, {
                            "version_value" : "0.9.8g"
                          } ]
                        }
                      } ]
                    }
                  }, {
                    "vendor_name" : "oracle",
                    "product" : {
                      "product_data" : [ {
                        "product_name" : "openjdk",
                        "version" : {
                          "version_data" : [ {
                            "version_value" : "-"
                          }, {
                            "version_value" : "1.6.0"
                          }, {
                            "version_value" : "1.7.0"
                          } ]
                        }
                      } ]
                    }
                  }, {
                    "vendor_name" : "polarssl",
                    "product" : {
                      "product_data" : [ {
                        "product_name" : "polarssl",
                        "version" : {
                          "version_data" : [ {
                            "version_value" : "0.10.0"
                          }, {
                            "version_value" : "0.10.1"
                          }, {
                            "version_value" : "0.11.0"
                          } ]
                        }
                      } ]
                    }
                  } ]
                }
              }
            },
            "publishedDate" : "2013-02-08T19:55Z",
            "lastModifiedDate" : "2018-08-09T01:29Z"
          }
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:50:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-searching-nested-json/m-p/399610#M115840</guid>
      <dc:creator>blaku</dc:creator>
      <dc:date>2020-09-29T20:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk searching nested json</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-searching-nested-json/m-p/399611#M115841</link>
      <description>&lt;P&gt;@blaku,&lt;/P&gt;

&lt;P&gt;Try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|makeresults |eval json="  {
             \"cve\" : {
               \"CVE_data_meta\" : {
                 \"ID\" : \"CVE-2013-0169\",
                 \"ASSIGNER\" : \"cve@mitre.org\"
               },
               \"affects\" : {
                 \"vendor\" : {
                   \"vendor_data\" : [ {
                     \"vendor_name\" : \"openssl\",
                     \"product\" : {
                       \"product_data\" : [ {
                         \"product_name\" : \"openssl\",
                         \"version\" : {
                           \"version_data\" : [ {
                             \"version_value\" : \"*\"
                           }, {
                             \"version_value\" : \"0.9.8\"
                           }, {
                             \"version_value\" : \"0.9.8a\"
                           }, {
                             \"version_value\" : \"0.9.8b\"
                           }, {
                             \"version_value\" : \"0.9.8c\"
                           }, {
                             \"version_value\" : \"0.9.8d\"
                           }, {
                             \"version_value\" : \"0.9.8f\"
                           }, {
                             \"version_value\" : \"0.9.8g\"
                           } ]
                         }
                       } ]
                     }
                   }, {
                     \"vendor_name\" : \"oracle\",
                     \"product\" : {
                       \"product_data\" : [ {
                         \"product_name\" : \"openjdk\",
                         \"version\" : {
                           \"version_data\" : [ {
                             \"version_value\" : \"-\"
                           }, {
                             \"version_value\" : \"1.6.0\"
                           }, {
                             \"version_value\" : \"1.7.0\"
                           } ]
                         }
                       } ]
                     }
                   }, {
                     \"vendor_name\" : \"polarssl\",
                     \"product\" : {
                       \"product_data\" : [ {
                         \"product_name\" : \"polarssl\",
                         \"version\" : {
                           \"version_data\" : [ {
                             \"version_value\" : \"0.10.0\"
                           }, {
                             \"version_value\" : \"0.10.1\"
                           }, {
                             \"version_value\" : \"0.11.0\"
                           } ]
                         }
                       } ]
                     }
                   } ]
                 }
               }
             },
             \"publishedDate\" : \"2013-02-08T19:55Z\",
             \"lastModifiedDate\" : \"2018-08-09T01:29Z\"
           }"
           |spath input=json output=product_name path=cve.affects.vendor.vendor_data{}.product{}.product_data{}.product_name
           |spath input=json output=version path=cve.affects.vendor.vendor_data{}.product{}.product_data{}.version 
           |eval z=mvzip(product_name,version,"#")|table z| mvexpand z
           |eval s=split(z,"#")|eval Product=mvindex(s,0),Version=mvindex(s,1)|fields Product,Version
           |spath input=Version output=Versions path=version_data{}.version_value
           |table Product,Versions
           |mvexpand Versions
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 12 Aug 2018 08:11:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-searching-nested-json/m-p/399611#M115841</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-08-12T08:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk searching nested json</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-searching-nested-json/m-p/399612#M115842</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Map JSON logs to _json sourcetype. &lt;/P&gt;

&lt;P&gt;In the props.conf file create stanza like below.&lt;/P&gt;

&lt;P&gt;[_json]&lt;BR /&gt;
KV_MODE= json&lt;/P&gt;

&lt;P&gt;It will extract fields. So don't need to search nested json files. Just search fields you require. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:54:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-searching-nested-json/m-p/399612#M115842</guid>
      <dc:creator>afroz</dc:creator>
      <dc:date>2020-09-29T20:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk searching nested json</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-searching-nested-json/m-p/399613#M115843</link>
      <description>&lt;P&gt;@renjith.nair&lt;BR /&gt;
Hi&lt;BR /&gt;
When I tried it worked without problem.&lt;BR /&gt;
It is movement as expected.&lt;BR /&gt;
Thank you very much&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 04:23:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-searching-nested-json/m-p/399613#M115843</guid>
      <dc:creator>blaku</dc:creator>
      <dc:date>2018-08-15T04:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk searching nested json</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-searching-nested-json/m-p/399614#M115844</link>
      <description>&lt;P&gt;Here is another solution, but this one does not need mvzip, split or mvindex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|makeresults |eval json="  {
              \"cve\" : {
                \"CVE_data_meta\" : {
                  \"ID\" : \"CVE-2013-0169\",
                  \"ASSIGNER\" : \"cve@mitre.org\"
                },
                \"affects\" : {
                  \"vendor\" : {
                    \"vendor_data\" : [ {
                      \"vendor_name\" : \"openssl\",
                      \"product\" : {
                        \"product_data\" : [ {
                          \"product_name\" : \"openssl\",
                          \"version\" : {
                            \"version_data\" : [ {
                              \"version_value\" : \"*\"
                            }, {
                              \"version_value\" : \"0.9.8\"
                            }, {
                              \"version_value\" : \"0.9.8a\"
                            }, {
                              \"version_value\" : \"0.9.8b\"
                            }, {
                              \"version_value\" : \"0.9.8c\"
                            }, {
                              \"version_value\" : \"0.9.8d\"
                            }, {
                              \"version_value\" : \"0.9.8f\"
                            }, {
                              \"version_value\" : \"0.9.8g\"
                            } ]
                          }
                        } ]
                      }
                    }, {
                      \"vendor_name\" : \"oracle\",
                      \"product\" : {
                        \"product_data\" : [ {
                          \"product_name\" : \"openjdk\",
                          \"version\" : {
                            \"version_data\" : [ {
                              \"version_value\" : \"-\"
                            }, {
                              \"version_value\" : \"1.6.0\"
                            }, {
                              \"version_value\" : \"1.7.0\"
                            } ]
                          }
                        } ]
                      }
                    }, {
                      \"vendor_name\" : \"polarssl\",
                      \"product\" : {
                        \"product_data\" : [ {
                          \"product_name\" : \"polarssl\",
                          \"version\" : {
                            \"version_data\" : [ {
                              \"version_value\" : \"0.10.0\"
                            }, {
                              \"version_value\" : \"0.10.1\"
                            }, {
                              \"version_value\" : \"0.11.0\"
                            } ]
                          }
                        } ]
                      }
                    } ]
                  }
                }
              },
              \"publishedDate\" : \"2013-02-08T19:55Z\",
              \"lastModifiedDate\" : \"2018-08-09T01:29Z\"
            }"
            |spath input=json output=product_data path=cve.affects.vendor.vendor_data{}.product{}.product_data{}
            |mvexpand product_data
            |spath input=product_data path=product_name
            |spath input=product_data output=version path=version.version_data{}.version_value
            |mvexpand version
            |table product_name, version
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Dec 2019 20:39:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-searching-nested-json/m-p/399614#M115844</guid>
      <dc:creator>vmacedo</dc:creator>
      <dc:date>2019-12-04T20:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk searching nested json</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-searching-nested-json/m-p/399615#M115845</link>
      <description>&lt;P&gt;Great! thank you&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 13:38:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-searching-nested-json/m-p/399615#M115845</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-05T13:38:18Z</dc:date>
    </item>
  </channel>
</rss>

