<?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: Json files Fields counting in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Json-files-Fields-counting/m-p/177535#M35572</link>
    <description>&lt;P&gt;Thanks its working !! I have all event with 31 fields so I cant find which event has more or less fields. BTW it is a good one , Appreciated , I am liking it !!&lt;/P&gt;

&lt;P&gt;Thanks a lot !!&lt;/P&gt;</description>
    <pubDate>Fri, 07 Mar 2014 14:53:52 GMT</pubDate>
    <dc:creator>abhayneilam</dc:creator>
    <dc:date>2014-03-07T14:53:52Z</dc:date>
    <item>
      <title>Json files Fields counting</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-files-Fields-counting/m-p/177529#M35566</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
how to find the total number of fields in each event in json file in splunk&lt;BR /&gt;
thanks in advance !!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2014 08:27:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-files-Fields-counting/m-p/177529#M35566</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2014-03-07T08:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Json files Fields counting</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-files-Fields-counting/m-p/177530#M35567</link>
      <description>&lt;P&gt;You can count the number of fields in any given Splunk event like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search yielding that event | fieldsummary| stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.2/SearchReference/Fieldsummary"&gt;http://docs.splunk.com/Documentation/Splunk/6.0.2/SearchReference/Fieldsummary&lt;/A&gt; for reference.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2014 12:43:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-files-Fields-counting/m-p/177530#M35567</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-03-07T12:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Json files Fields counting</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-files-Fields-counting/m-p/177531#M35568</link>
      <description>&lt;P&gt;I checked that, I have total of 31 fields in my Json File in each event, but after giving this it is coming 48 count , it is also picking up some extra fields from "interesting fields" which is not the part of the JSON file.&lt;BR /&gt;
The output is coming as 48 but I need "Total Number of Fields per events "&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2014 14:06:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-files-Fields-counting/m-p/177531#M35568</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2014-03-07T14:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Json files Fields counting</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-files-Fields-counting/m-p/177532#M35569</link>
      <description>&lt;P&gt;Those seventeen extra fields probably are these:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;date_hour
date_mday
date_minute
date_month
date_second
date_wday
date_year
date_zone
host
index
linecount
punct
source
sourcetype
splunk_server
timeendpos
timestartpos
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;They're added to each event by default. You could either remove them from your search pipeline using the &lt;CODE&gt;fields&lt;/CODE&gt; command, or just subtract 17 from your result.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2014 14:14:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-files-Fields-counting/m-p/177532#M35569</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-03-07T14:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Json files Fields counting</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-files-Fields-counting/m-p/177533#M35570</link>
      <description>&lt;P&gt;In case your last sentence meant you were looking for a field calculated for each event, you can do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | eval fieldcount = -18 | foreach * [eval fieldcount = fieldcount + 1]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will deduct itself and the 17 fields listed above from the total count and requires Splunk 6 to work.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2014 14:17:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-files-Fields-counting/m-p/177533#M35570</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-03-07T14:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Json files Fields counting</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-files-Fields-counting/m-p/177534#M35571</link>
      <description>&lt;P&gt;I have splunk 6, lemme work on that, will get back to you soon !!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2014 14:35:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-files-Fields-counting/m-p/177534#M35571</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2014-03-07T14:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Json files Fields counting</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Json-files-Fields-counting/m-p/177535#M35572</link>
      <description>&lt;P&gt;Thanks its working !! I have all event with 31 fields so I cant find which event has more or less fields. BTW it is a good one , Appreciated , I am liking it !!&lt;/P&gt;

&lt;P&gt;Thanks a lot !!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2014 14:53:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Json-files-Fields-counting/m-p/177535#M35572</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2014-03-07T14:53:52Z</dc:date>
    </item>
  </channel>
</rss>

