<?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 How to extract specific field values from JSON format events? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/668915#M229444</link>
    <description>&lt;P&gt;I am looking to extract some information from a Values field that has two values within it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jialiu907_0-1700167889802.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/28148i04835933FEDC7648/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jialiu907_0-1700167889802.png" alt="jialiu907_0-1700167889802.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How can i specify which one of the values I need in a search as the two values is meant to be "read" and "written"?&lt;/P&gt;&lt;P&gt;This is my current search right now and I think it is including both values together.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="collectd_test" plugin=disk type=disk_octets plugin_instance=$plugin_instance1$
| stats  min(value) as min max(value) as max avg(value) as avg
| eval min=round(min, 2)
| eval max=round(max, 2)
| eval avg=round(avg, 2)&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 16 Nov 2023 20:57:30 GMT</pubDate>
    <dc:creator>jialiu907</dc:creator>
    <dc:date>2023-11-16T20:57:30Z</dc:date>
    <item>
      <title>How to extract specific field values from JSON format events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/668915#M229444</link>
      <description>&lt;P&gt;I am looking to extract some information from a Values field that has two values within it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jialiu907_0-1700167889802.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/28148i04835933FEDC7648/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jialiu907_0-1700167889802.png" alt="jialiu907_0-1700167889802.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How can i specify which one of the values I need in a search as the two values is meant to be "read" and "written"?&lt;/P&gt;&lt;P&gt;This is my current search right now and I think it is including both values together.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="collectd_test" plugin=disk type=disk_octets plugin_instance=$plugin_instance1$
| stats  min(value) as min max(value) as max avg(value) as avg
| eval min=round(min, 2)
| eval max=round(max, 2)
| eval avg=round(avg, 2)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 16 Nov 2023 20:57:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/668915#M229444</guid>
      <dc:creator>jialiu907</dc:creator>
      <dc:date>2023-11-16T20:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract specific field values from JSON format events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/668950#M229462</link>
      <description>&lt;P&gt;instead of values, you should see a field named values{} because that's an array. &amp;nbsp;Because you are only interested in numeric min, max, and avg, you only need to substitute this name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="collectd_test" plugin=disk type=disk_octets plugin_instance=$plugin_instance1$
| stats  min(value{}) as min max(value{}) as max avg(value{}) as avg
| eval min=round(min, 2)
| eval max=round(max, 2)
| eval avg=round(avg, 2)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 04:59:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/668950#M229462</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-11-17T04:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract specific field values from JSON format events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/669021#M229477</link>
      <description>&lt;P&gt;So I changed the search with your suggestion and also added another array that its sorting by, but its giving me the same numbers for both read and write. I am looking to show the value of min, max, and avg for read and then the same for write and it should be different.&lt;/P&gt;&lt;P&gt;This is my current search.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="collectd_test" plugin=disk type=disk_octets plugin_instance=$plugin_instance1$
| stats min(values{}) as min max(values{}) as max avg(values{}) as avg by dsnames{}
| eval min=round(min, 2)
| eval max=round(max, 2)
| eval avg=round(avg, 2)&lt;/LI-CODE&gt;&lt;P&gt;This is the current output.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jialiu907_1-1700233945728.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/28155i60DAAE2DD46C654C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jialiu907_1-1700233945728.png" alt="jialiu907_1-1700233945728.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And this is the JSON format events.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jialiu907_2-1700234044882.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/28156iB1B0D04FDC55CDCD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jialiu907_2-1700234044882.png" alt="jialiu907_2-1700234044882.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 15:15:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/669021#M229477</guid>
      <dc:creator>jialiu907</dc:creator>
      <dc:date>2023-11-17T15:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract specific field values from JSON format events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/669075#M229495</link>
      <description>&lt;P&gt;Please use raw text to post sample JSON events, not screenshot and not Splunk's contracted pretty format.&lt;/P&gt;&lt;P&gt;Do you mean the value{0} correspond to dsnames{0}, and value{1} to dsnames{1}? This is about as wasteful as JSON data design goes. &amp;nbsp;If you have influence on developers who wrote these logs, implore them to change the structure to array of hashes instead of hash of arrays. &amp;nbsp;Like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"whatever":
 [
  {"dsname":"read", "dstype":"typefoo", "value": 123},
  {"dsname":"write", "dstype":"typebar", "value": 456}
 ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before that happens, you can contain the damage from your developers' crimes with some reconstruction. &amp;nbsp;Traditionally, this is done with string concatenation; and usually, you need mvmap to handle indeterminant number or large number of array elements.&lt;/P&gt;&lt;P&gt;In this case, there are only two semantic values so I'll not be bothered with mvmap. &amp;nbsp;I will also use structured JSON instead of string concatenation. (JSON function was introduced in Splunk 8.0.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval data = mvappend(json_object("dsname", mvindex('dsnames{}', 0), "value", mvindex('values{}', 0)),
  json_object("dsname", mvindex('dsnames{}', 1), "value", mvindex('values{}', 1)))
| mvexpand data
| spath input=data
| stats min(value) as min max(value) as max avg(value) as avg by dsname
| eval min=round(min, 2)
| eval max=round(max, 2)
| eval avg=round(avg, 2)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is some mock data that I use to test the above&lt;/P&gt;&lt;TABLE width="492px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="362.140625px"&gt;_raw&lt;/TD&gt;&lt;TD width="71.921875px"&gt;&lt;DIV class=""&gt;dsnames{}&lt;/DIV&gt;&lt;/TD&gt;&lt;TD width="56.953125px"&gt;&lt;DIV class=""&gt;values{}&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="362.140625px"&gt;{"dsnames": ["read", "write"], "values": [123, 234]}&lt;/TD&gt;&lt;TD width="71.921875px"&gt;&lt;DIV class=""&gt;read&lt;/DIV&gt;&lt;DIV class=""&gt;write&lt;/DIV&gt;&lt;/TD&gt;&lt;TD width="56.953125px"&gt;&lt;DIV class=""&gt;123&lt;/DIV&gt;&lt;DIV class=""&gt;234&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="362.140625px"&gt;{"dsnames": ["read", "write"], "values": [456, 567]}&lt;/TD&gt;&lt;TD width="71.921875px"&gt;&lt;DIV class=""&gt;read&lt;/DIV&gt;&lt;DIV class=""&gt;write&lt;/DIV&gt;&lt;/TD&gt;&lt;TD width="56.953125px"&gt;&lt;DIV class=""&gt;456&lt;/DIV&gt;&lt;DIV class=""&gt;567&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;This is an emulation to get the above&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval data=mvappend("{\"dsnames\": [\"read\", \"write\"], \"values\": [123, 234]}", "{\"dsnames\": [\"read\", \"write\"], \"values\": [456, 567]}")
| mvexpand data
| rename data as _raw
| spath
``` data emulation above ```&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can play with this and compare with real data. &amp;nbsp;This mock data gives&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;dsname&lt;/TD&gt;&lt;TD&gt;min&lt;/TD&gt;&lt;TD&gt;max&lt;/TD&gt;&lt;TD&gt;avg&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;read&lt;/TD&gt;&lt;TD&gt;123.00&lt;/TD&gt;&lt;TD&gt;456.00&lt;/TD&gt;&lt;TD&gt;289.50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;write&lt;/TD&gt;&lt;TD&gt;234.00&lt;/TD&gt;&lt;TD&gt;567.00&lt;/TD&gt;&lt;TD&gt;400.50&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Sat, 18 Nov 2023 06:57:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/669075#M229495</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-11-18T06:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract specific field values from JSON format events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/669093#M229498</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The solution given does work and it is exactly what I am looking for. The&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;value{0} does correspond to dsnames{0}, and value{1} to dsnames{1}. I am&amp;nbsp;unfortunately&amp;nbsp;not able to change the logs.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;SPAN&gt;The only problem I have still is that the max for read and write is displaying the same number and I am almost certain they should be different numbers.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;DIV&gt;&amp;nbsp;&lt;DIV&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;SPAN&gt;This is the current search&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;SPAN&gt;index="collectd_test" plugin=disk type=disk_octets plugin_instance=dm-0 &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;SPAN&gt;| eval data = mvappend(json_object("dsname", mvindex('dsnames{}', 0), "value", mvindex('values{}', 0)), json_object("dsname", mvindex('dsnames{}', 1), "value", mvindex('values{}', 1))) &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;SPAN&gt;| mvexpand data &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;SPAN&gt;| spath input=data &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;SPAN&gt;| stats min(value) as min max(value) as max avg(value) as avg by dsname &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;SPAN&gt;| eval min=round(min, 2) &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;SPAN&gt;| eval max=round(max, 2) &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;SPAN&gt;| eval avg=round(avg, 2)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;FONT face="splunk_data_sans, Arial, sans-serif" color="#363c44"&gt;&lt;SPAN&gt;This is the raw text of the JSON event.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{"&lt;SPAN class=""&gt;values&lt;SPAN&gt;"&lt;SPAN class=""&gt;:&lt;SPAN&gt;[&lt;SPAN class=""&gt;0&lt;SPAN&gt;,&lt;SPAN class=""&gt;35225.165651947&lt;SPAN&gt;],"&lt;SPAN class=""&gt;dstypes&lt;SPAN&gt;"&lt;SPAN class=""&gt;:&lt;SPAN&gt;["&lt;SPAN class=""&gt;derive&lt;SPAN&gt;","&lt;SPAN class=""&gt;derive&lt;SPAN&gt;"],"&lt;SPAN class=""&gt;dsnames&lt;SPAN&gt;"&lt;SPAN class=""&gt;:&lt;SPAN&gt;["&lt;SPAN class=""&gt;read&lt;SPAN&gt;","&lt;SPAN class=""&gt;write&lt;SPAN&gt;"],"&lt;SPAN class=""&gt;time&lt;SPAN&gt;"&lt;SPAN class=""&gt;:1700320094.109&lt;SPAN&gt;,"&lt;SPAN class=""&gt;interval&lt;SPAN&gt;"&lt;SPAN class=""&gt;:10.000&lt;SPAN&gt;,"&lt;SPAN class=""&gt;host&lt;SPAN&gt;"&lt;SPAN class=""&gt;:&lt;SPAN&gt;"&lt;SPAN class=""&gt;usorla7sw101x.ad101.siemens-energy.net&lt;SPAN&gt;","&lt;SPAN class=""&gt;plugin&lt;SPAN&gt;"&lt;SPAN class=""&gt;:&lt;SPAN&gt;"&lt;SPAN class=""&gt;disk&lt;SPAN&gt;","&lt;SPAN class=""&gt;plugin_instance&lt;SPAN&gt;"&lt;SPAN class=""&gt;:&lt;SPAN&gt;"&lt;SPAN class=""&gt;dm-0&lt;SPAN&gt;","&lt;SPAN class=""&gt;type&lt;SPAN&gt;"&lt;SPAN class=""&gt;:&lt;SPAN&gt;"&lt;SPAN class=""&gt;disk_octets&lt;SPAN&gt;","&lt;SPAN class=""&gt;type_instance&lt;SPAN&gt;"&lt;SPAN class=""&gt;:&lt;SPAN&gt;"","&lt;SPAN class=""&gt;meta&lt;SPAN&gt;"&lt;SPAN class=""&gt;:&lt;SPAN&gt;{"&lt;SPAN class=""&gt;network:received&lt;SPAN&gt;"&lt;SPAN class=""&gt;:true&lt;SPAN&gt;,"&lt;SPAN class=""&gt;network:ip_address&lt;SPAN&gt;"&lt;SPAN class=""&gt;:&lt;SPAN&gt;"&lt;SPAN class=""&gt;129.73.170.204&lt;SPAN&gt;"}}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is the current output.&lt;/SPAN&gt;&lt;/P&gt;dsname min&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;max&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;avg &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;read&lt;/TD&gt;&lt;TD&gt;0.00&lt;/TD&gt;&lt;TD&gt;192626230.85&lt;/TD&gt;&lt;TD&gt;53306.64&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;write&lt;/TD&gt;&lt;TD&gt;0.00&lt;/TD&gt;&lt;TD&gt;192626230.85&lt;/TD&gt;&lt;TD&gt;65185.22&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 18 Nov 2023 15:21:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/669093#M229498</guid>
      <dc:creator>jialiu907</dc:creator>
      <dc:date>2023-11-18T15:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract specific field values from JSON format events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/669102#M229501</link>
      <description>&lt;P&gt;Given that min, max, avg operated on the same field, unless all three give the same value for both groupby values, the only conclusion is that max for both is the same. &amp;nbsp;You can examine actual data.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval data = mvappend(json_object("dsname", mvindex('dsnames{}', 0), "value", mvindex('values{}', 0)),
  json_object("dsname", mvindex('dsnames{}', 1), "value", mvindex('values{}', 1)))
| mvexpand data
| spath input=data
| eventstats min(value) as min max(value) as max avg(value) as avg by dsname
| where value == max&lt;/LI-CODE&gt;&lt;P&gt;This will show you events that matches max.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2023 02:34:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/669102#M229501</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-11-19T02:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract specific field values from JSON format events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/669103#M229502</link>
      <description>&lt;P&gt;I tried to input your search to examine actual data and the results are coming back as 0 events matched and i tried it for min and avg as well, changing "| where value == max" to "| where value == min" or "| where value == avg".&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2023 03:07:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/669103#M229502</guid>
      <dc:creator>jialiu907</dc:creator>
      <dc:date>2023-11-19T03:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract specific field values from JSON format events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/669110#M229505</link>
      <description>&lt;P&gt;That's impossible. &amp;nbsp;Mathematically, it is extremely improbable for any real event to have avg value. &amp;nbsp;But min and max must be there. &amp;nbsp;Are you sure you didn't round the max after eventstats as in your initial code? &amp;nbsp;Can you post stats without rounding?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="collectd_test" plugin=disk type=disk_octets plugin_instance=dm-0
| eval data = mvappend(json_object("dsname", mvindex('dsnames{}', 0), "value", mvindex('values{}', 0)), json_object("dsname", mvindex('dsnames{}', 1), "value", mvindex('values{}', 1)))
| mvexpand data
| spath input=data
| stats min(value) as min max(value) as max avg(value) as avg by dsname​&lt;/LI-CODE&gt;&lt;P&gt;Another way to examine data is to sort and compare with max.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="collectd_test" plugin=disk type=disk_octets plugin_instance=dm-0
| eval data = mvappend(json_object("dsname", mvindex('dsnames{}', 0), "value", mvindex('values{}', 0)), json_object("dsname", mvindex('dsnames{}', 1), "value", mvindex('values{}', 1)))
| mvexpand data
| spath input=data
| table data _raw
| sort - value
| eventstats min(value) as min max(value) as max avg(value) as avg by dsname&lt;/LI-CODE&gt;&lt;P&gt;The first row should match one of max. &amp;nbsp;You can also make a comparison of values in data with those in _raw directly.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2023 07:40:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/669110#M229505</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-11-19T07:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract specific field values from JSON format events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/669114#M229507</link>
      <description>&lt;P&gt;Yes I did not&amp;nbsp;&lt;SPAN&gt;round the max after eventstats and I am able to post stats without rounding.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tested the _raw data from earlier and it does work with this search, showing the min, max and avg properly.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval data=mvappend("{\"dsnames\": [\"read\", \"write\"], \"values\": [123, 234]}", "{\"dsnames\": [\"read\", \"write\"], \"values\": [456, 567]}")
| mvexpand data
| rename data as _raw
| spath
| eval data = mvappend(json_object("dsname", mvindex('dsnames{}', 0), "value", mvindex('values{}', 0)),
  json_object("dsname", mvindex('dsnames{}', 1), "value", mvindex('values{}', 1)))
| mvexpand data
| spath input=data
| stats min(value) as min max(value) as max avg(value) as avg by dsname
| eval min=round(min, 2)
| eval max=round(max, 2)
| eval avg=round(avg, 2)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The other way to sort and compare with max does give me results.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"dsname":"read","value":"0"}&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;{"values":[0,23347.1366453364],"dstypes":["derive","derive"],"dsnames":["read","write"],"time":1700387069.996,"interval":10.000,"host":"usorla7sp103x.ad101.siemens-energy.net","plugin":"disk","plugin_instance":"dm-0","type":"disk_octets","type_instance":""}&lt;/LI-CODE&gt;&lt;P&gt;I am still not sure why Max would still be the same as those values should be different just on the basis that the "maximum number of disk operations or disk time for operations or disk traffic" should be different for read and written data, logically speaking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2023 09:56:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-specific-field-values-from-JSON-format-events/m-p/669114#M229507</guid>
      <dc:creator>jialiu907</dc:creator>
      <dc:date>2023-11-19T09:56:44Z</dc:date>
    </item>
  </channel>
</rss>

