<?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: Dropping blank paths in a JSON search in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Dropping-blank-paths-in-a-JSON-search/m-p/387395#M69486</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;    {
         "event":
                {
                "time": "2019-02-10T05:52:03",
                 "StatsMonitor": {
                         "time": "2019-02-10T05:52:03",
                         "name": "StatsMonitor",
                         "LocalTimetDelta": 0,
                         "CaptureTimetDelta": 0,
                         "DeltaTimeAuditLog": 0,
                         "ActiveUsers": 26
                    }
                }


    }

AND
    {
         "action":
                {
                     "StatsMonitor": {
                         "time": "2019-02-10T05:52:03",
                         "name": "StatsMonitor",
                         "LocalTimetDelta": 0,
                         "CaptureTimetDelta": 0,
                         "DeltaTimeAuditLog": 0,
                         "ActiveUsers": 26
                    }
                }
                ,
        "action":
                {
                     "StatsMonitorx": {
                         "time": "2019-01-10T06:52:03",
                         "name": "StatsMonitor",
                         "LocalTimetDelta": 0,
                         "CaptureTimetDelta": 0,
                         "DeltaTimeAuditLog": 0,
                         "ActiveUsers": 52
                    }
                }


    }
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 13 Feb 2019 16:51:25 GMT</pubDate>
    <dc:creator>brutecat</dc:creator>
    <dc:date>2019-02-13T16:51:25Z</dc:date>
    <item>
      <title>Dropping blank paths in a JSON search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Dropping-blank-paths-in-a-JSON-search/m-p/387393#M69484</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am doing some experimentation wirh regards JSON events. I have two events loaded:&lt;/P&gt;

&lt;P&gt;{&lt;BR /&gt;
     "event":&lt;BR /&gt;
            {&lt;BR /&gt;
            "time": "2019-02-10T05:52:03",&lt;BR /&gt;
             "StatsMonitor": {&lt;BR /&gt;
                     "time": "2019-02-10T05:52:03",&lt;BR /&gt;
                     "name": "StatsMonitor",&lt;BR /&gt;
                     "LocalTimetDelta": 0,&lt;BR /&gt;
                     "CaptureTimetDelta": 0,&lt;BR /&gt;
                     "DeltaTimeAuditLog": 0,&lt;BR /&gt;
                     "ActiveUsers": 26&lt;BR /&gt;
                }&lt;BR /&gt;
            }&lt;/P&gt;

&lt;P&gt;}&lt;/P&gt;

&lt;P&gt;and&lt;/P&gt;

&lt;P&gt;{&lt;BR /&gt;
     "action":&lt;BR /&gt;
            {&lt;BR /&gt;
                 "StatsMonitor": {&lt;BR /&gt;
                     "time": "2019-02-10T05:52:03",&lt;BR /&gt;
                     "name": "StatsMonitor",&lt;BR /&gt;
                     "LocalTimetDelta": 0,&lt;BR /&gt;
                     "CaptureTimetDelta": 0,&lt;BR /&gt;
                     "DeltaTimeAuditLog": 0,&lt;BR /&gt;
                     "ActiveUsers": 26&lt;BR /&gt;
                }&lt;BR /&gt;
            }&lt;BR /&gt;
            ,&lt;BR /&gt;
    "action":&lt;BR /&gt;
            {&lt;BR /&gt;
                 "StatsMonitorx": {&lt;BR /&gt;
                     "time": "2019-01-10T06:52:03",&lt;BR /&gt;
                     "name": "StatsMonitor",&lt;BR /&gt;
                     "LocalTimetDelta": 0,&lt;BR /&gt;
                     "CaptureTimetDelta": 0,&lt;BR /&gt;
                     "DeltaTimeAuditLog": 0,&lt;BR /&gt;
                     "ActiveUsers": 52&lt;BR /&gt;
                }&lt;BR /&gt;
            }&lt;/P&gt;

&lt;P&gt;}&lt;/P&gt;

&lt;P&gt;The index I am using is 'conship'&lt;/P&gt;

&lt;P&gt;I have a search:&lt;/P&gt;

&lt;P&gt;index=conship | spath &lt;BR /&gt;
 path=event.StatsMonitor&lt;BR /&gt;
|  rename  event.time as time, event.StatsMonitor.* as * &lt;BR /&gt;
|  table time ActiveUsers&lt;/P&gt;

&lt;P&gt;which is returning both events as results, but has duplicate data coming from the first (which is the correct data).&lt;/P&gt;

&lt;P&gt;I would have thought:&lt;/P&gt;

&lt;P&gt;spath  path=event.StatsMonitor&lt;/P&gt;

&lt;P&gt;would have eliminated the data altogether from the second event. Perhaps I could get a blank line, but why am I getting a duplicate from the correct event.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Stan&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 15:58:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Dropping-blank-paths-in-a-JSON-search/m-p/387393#M69484</guid>
      <dc:creator>brutecat</dc:creator>
      <dc:date>2019-02-13T15:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dropping blank paths in a JSON search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Dropping-blank-paths-in-a-JSON-search/m-p/387394#M69485</link>
      <description>&lt;P&gt;@brutecat&lt;/P&gt;

&lt;P&gt;Can you please share sample events using precode block (101010 in text editor) ?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 16:41:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Dropping-blank-paths-in-a-JSON-search/m-p/387394#M69485</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2019-02-13T16:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Dropping blank paths in a JSON search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Dropping-blank-paths-in-a-JSON-search/m-p/387395#M69486</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;    {
         "event":
                {
                "time": "2019-02-10T05:52:03",
                 "StatsMonitor": {
                         "time": "2019-02-10T05:52:03",
                         "name": "StatsMonitor",
                         "LocalTimetDelta": 0,
                         "CaptureTimetDelta": 0,
                         "DeltaTimeAuditLog": 0,
                         "ActiveUsers": 26
                    }
                }


    }

AND
    {
         "action":
                {
                     "StatsMonitor": {
                         "time": "2019-02-10T05:52:03",
                         "name": "StatsMonitor",
                         "LocalTimetDelta": 0,
                         "CaptureTimetDelta": 0,
                         "DeltaTimeAuditLog": 0,
                         "ActiveUsers": 26
                    }
                }
                ,
        "action":
                {
                     "StatsMonitorx": {
                         "time": "2019-01-10T06:52:03",
                         "name": "StatsMonitor",
                         "LocalTimetDelta": 0,
                         "CaptureTimetDelta": 0,
                         "DeltaTimeAuditLog": 0,
                         "ActiveUsers": 52
                    }
                }


    }
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Feb 2019 16:51:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Dropping-blank-paths-in-a-JSON-search/m-p/387395#M69486</guid>
      <dc:creator>brutecat</dc:creator>
      <dc:date>2019-02-13T16:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Dropping blank paths in a JSON search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Dropping-blank-paths-in-a-JSON-search/m-p/387396#M69487</link>
      <description>&lt;P&gt;Sorry - I realise the search was also cobbled. The asterisk was dropped:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=conship | spath 
path=event.StatsMonitor
| rename event.time as time, event.StatsMonitor.* as *
| table time ActiveUsers
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Feb 2019 02:07:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Dropping-blank-paths-in-a-JSON-search/m-p/387396#M69487</guid>
      <dc:creator>brutecat</dc:creator>
      <dc:date>2019-02-14T02:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dropping blank paths in a JSON search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Dropping-blank-paths-in-a-JSON-search/m-p/387397#M69488</link>
      <description>&lt;P&gt;Hello @brutecat,&lt;/P&gt;

&lt;P&gt;the bellow does the trick&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="{
          \"event\":
                 {
                 \"time\": \"2019-02-10T05:52:03\",
                  \"StatsMonitor\": {
                          \"time\": \"2019-02-10T05:52:03\",
                          \"name\": \"StatsMonitor\",
                          \"LocalTimetDelta\": 0,
                          \"CaptureTimetDelta\": 0,
                          \"DeltaTimeAuditLog\": 0,
                          \"ActiveUsers\": 26
                     }
                 },
          \"action\":
                 {
                      \"StatsMonitor\": {
                          \"time\": \"2019-02-10T05:52:03\",
                          \"name\": \"StatsMonitor\",
                          \"LocalTimetDelta\": 0,
                          \"CaptureTimetDelta\": 0,
                          \"DeltaTimeAuditLog\": 0,
                          \"ActiveUsers\": 26
                     }
                 }
                 ,
         \"action\":
                 {
                      \"StatsMonitor\": {
                          \"time\": \"2019-01-10T06:52:03\",
                          \"name\": \"StatsMonitor\",
                          \"LocalTimetDelta\": 0,
                          \"CaptureTimetDelta\": 0,
                          \"DeltaTimeAuditLog\": 0,
                          \"ActiveUsers\": 52
                     }
                 }

     }"
| spath
| rename event.time as time
| spath path=event
| rename event.StatsMonitor.* as *
| table time ActiveUsers
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Aug 2019 08:39:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Dropping-blank-paths-in-a-JSON-search/m-p/387397#M69488</guid>
      <dc:creator>poete</dc:creator>
      <dc:date>2019-08-27T08:39:44Z</dc:date>
    </item>
  </channel>
</rss>

