<?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: parsing json and sending as search command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/parsing-json-and-sending-as-search-command/m-p/132675#M36225</link>
    <description>&lt;P&gt;There are two things you might want to look into. If the whole event is JSON, then you should look into the KV_MODE = json configuration in props.conf:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.2/Admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.2/Admin/Propsconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If this is the value of a field, then you can look into the spath command:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.2/SearchReference/Spath"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.2/SearchReference/Spath&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Jul 2014 20:23:02 GMT</pubDate>
    <dc:creator>dshpritz</dc:creator>
    <dc:date>2014-07-07T20:23:02Z</dc:date>
    <item>
      <title>parsing json and sending as search command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/parsing-json-and-sending-as-search-command/m-p/132672#M36222</link>
      <description>&lt;P&gt;Hi Guys &lt;/P&gt;

&lt;P&gt;I have a json with 75 elements. Normally i can put them in macro and run in search but that means 75 macro search which is not efficient. &lt;/P&gt;

&lt;P&gt;I would like to parse json data rule, description, tags and impact values from json file and use those as search&lt;/P&gt;

&lt;P&gt;Sample JSON is below &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
 "filters":{
  "filter":[
   {
    "id":"1",
    "rule":"(?:\"[^\"]*[^-]?&amp;gt;)|(?:[^\\w\\s]\\s*\\\/&amp;gt;)|(?:&amp;gt;\")",
    "description":"Finds html breaking injections including whitespace attacks",
    "tags":{
      "tag":[
        "xss",
        "csrf"
      ]
    },
    "impact":"4"
  },
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What would be the efficient way to use thos element in search? &lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2014 19:16:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/parsing-json-and-sending-as-search-command/m-p/132672#M36222</guid>
      <dc:creator>CorpusCallosum</dc:creator>
      <dc:date>2014-07-07T19:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: parsing json and sending as search command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/parsing-json-and-sending-as-search-command/m-p/132673#M36223</link>
      <description>&lt;P&gt;can you share how you're parsing them in macro?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2014 19:50:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/parsing-json-and-sending-as-search-command/m-p/132673#M36223</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-07-07T19:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: parsing json and sending as search command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/parsing-json-and-sending-as-search-command/m-p/132674#M36224</link>
      <description>&lt;P&gt;macro i manually copy paste the regex and description. nothing special &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2014 20:04:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/parsing-json-and-sending-as-search-command/m-p/132674#M36224</guid>
      <dc:creator>CorpusCallosum</dc:creator>
      <dc:date>2014-07-07T20:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: parsing json and sending as search command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/parsing-json-and-sending-as-search-command/m-p/132675#M36225</link>
      <description>&lt;P&gt;There are two things you might want to look into. If the whole event is JSON, then you should look into the KV_MODE = json configuration in props.conf:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.2/Admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.2/Admin/Propsconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If this is the value of a field, then you can look into the spath command:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.2/SearchReference/Spath"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.2/SearchReference/Spath&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2014 20:23:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/parsing-json-and-sending-as-search-command/m-p/132675#M36225</guid>
      <dc:creator>dshpritz</dc:creator>
      <dc:date>2014-07-07T20:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: parsing json and sending as search command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/parsing-json-and-sending-as-search-command/m-p/132676#M36226</link>
      <description>&lt;P&gt;this JSON file is actually kind of search db for me. not the list of events. My logs are in syslog format. i just want to parse this json and search in the logs.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jul 2014 05:02:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/parsing-json-and-sending-as-search-command/m-p/132676#M36226</guid>
      <dc:creator>CorpusCallosum</dc:creator>
      <dc:date>2014-07-08T05:02:28Z</dc:date>
    </item>
  </channel>
</rss>

