<?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 do i convert a Json Multi key value pair to multi line chart in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-i-convert-a-Json-Multi-key-value-pair-to-multi-line-chart/m-p/486434#M83289</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I have X number of "totalHitCount" in a JSON file (mtr.gauges.caching_metrics.nodes{}.totalHitCount). Within multiple node{} and i am looking to graphs each node{}totalHitCount with time on Y and nodes{}.totalHitCount values - multiple series on the Y axis.&lt;/P&gt;

&lt;P&gt;index=amber_live_* sourcetype=AMBER_METRIC usedMemoryMB | spath "mtr.gauges.caching_metrics.nodes{}.totalHitCount" | sort _time| table mtr.gauges.caching_metrics.nodes{}.totalHitCount _time&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{ [-]
   h: mx12405vm
   mtr: { [-]
     counters: { [+]
     }
     gauges: { [-]
       caching_metrics: { [-]
         clientCount: 5
         locatorCount: 1
         maxMemoryMB: 10240
         memberCount: 4
         nodes: [ [-]
           { [-]
             bytesReceivedPerSecond: 0
             bytesSentPerSecond: 0
             cpuUsage: 0.21666667
             gcCount: 96
             gcTimeMilliseconds: 884
             getsPerSecond: 0
             locator: true
             lruEvictionsPerSecond: 0
             maxMemoryMB: 2048
             nodeName: positions-gf-locator-v1-1
             putsPerSecond: 0
             readsPerSecond: 0
             server: false
             totalHitCount: 0
             totalMissCount: 0
             totalRegionCount: 0
             totalRegionEntryCount: 0
             usedMemoryMB: 205
             writesPerSecond: 0
           }
           { [-]
             bytesReceivedPerSecond: 0
             bytesSentPerSecond: 0
             cpuUsage: 0.81666666
             gcCount: 196
             gcTimeMilliseconds: 1337
             getsPerSecond: 0
             locator: false
             lruEvictionsPerSecond: 0
             maxMemoryMB: 2048
             nodeName: positions-gf-cacheserver-v1-1
             putsPerSecond: 0
             readsPerSecond: 0
             server: true
             totalHitCount: 1751992
             totalMissCount: 114
             totalRegionCount: 17
             totalRegionEntryCount: 120
             usedMemoryMB: 254
             writesPerSecond: 0
           }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;etc...&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/276576-2019-11-18-13-29-06-search-splunk-800.png" alt="alt text" /&gt; &lt;/P&gt;

&lt;P&gt;Any help would be super thanks.&lt;BR /&gt;
I did look at this&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/302236/how-to-take-multiple-key-value-pairs-and-draw-a-li.html" target="_blank"&gt;https://answers.splunk.com/answers/302236/how-to-take-multiple-key-value-pairs-and-draw-a-li.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;But the number of nodes could be dynamic, so not sure what to do.&lt;/P&gt;

&lt;P&gt;Rob&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 03:00:20 GMT</pubDate>
    <dc:creator>robertlynch2020</dc:creator>
    <dc:date>2020-09-30T03:00:20Z</dc:date>
    <item>
      <title>How do i convert a Json Multi key value pair to multi line chart</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-i-convert-a-Json-Multi-key-value-pair-to-multi-line-chart/m-p/486434#M83289</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I have X number of "totalHitCount" in a JSON file (mtr.gauges.caching_metrics.nodes{}.totalHitCount). Within multiple node{} and i am looking to graphs each node{}totalHitCount with time on Y and nodes{}.totalHitCount values - multiple series on the Y axis.&lt;/P&gt;

&lt;P&gt;index=amber_live_* sourcetype=AMBER_METRIC usedMemoryMB | spath "mtr.gauges.caching_metrics.nodes{}.totalHitCount" | sort _time| table mtr.gauges.caching_metrics.nodes{}.totalHitCount _time&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{ [-]
   h: mx12405vm
   mtr: { [-]
     counters: { [+]
     }
     gauges: { [-]
       caching_metrics: { [-]
         clientCount: 5
         locatorCount: 1
         maxMemoryMB: 10240
         memberCount: 4
         nodes: [ [-]
           { [-]
             bytesReceivedPerSecond: 0
             bytesSentPerSecond: 0
             cpuUsage: 0.21666667
             gcCount: 96
             gcTimeMilliseconds: 884
             getsPerSecond: 0
             locator: true
             lruEvictionsPerSecond: 0
             maxMemoryMB: 2048
             nodeName: positions-gf-locator-v1-1
             putsPerSecond: 0
             readsPerSecond: 0
             server: false
             totalHitCount: 0
             totalMissCount: 0
             totalRegionCount: 0
             totalRegionEntryCount: 0
             usedMemoryMB: 205
             writesPerSecond: 0
           }
           { [-]
             bytesReceivedPerSecond: 0
             bytesSentPerSecond: 0
             cpuUsage: 0.81666666
             gcCount: 196
             gcTimeMilliseconds: 1337
             getsPerSecond: 0
             locator: false
             lruEvictionsPerSecond: 0
             maxMemoryMB: 2048
             nodeName: positions-gf-cacheserver-v1-1
             putsPerSecond: 0
             readsPerSecond: 0
             server: true
             totalHitCount: 1751992
             totalMissCount: 114
             totalRegionCount: 17
             totalRegionEntryCount: 120
             usedMemoryMB: 254
             writesPerSecond: 0
           }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;etc...&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/276576-2019-11-18-13-29-06-search-splunk-800.png" alt="alt text" /&gt; &lt;/P&gt;

&lt;P&gt;Any help would be super thanks.&lt;BR /&gt;
I did look at this&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/302236/how-to-take-multiple-key-value-pairs-and-draw-a-li.html" target="_blank"&gt;https://answers.splunk.com/answers/302236/how-to-take-multiple-key-value-pairs-and-draw-a-li.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;But the number of nodes could be dynamic, so not sure what to do.&lt;/P&gt;

&lt;P&gt;Rob&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:00:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-i-convert-a-Json-Multi-key-value-pair-to-multi-line-chart/m-p/486434#M83289</guid>
      <dc:creator>robertlynch2020</dc:creator>
      <dc:date>2020-09-30T03:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do i convert a Json Multi key value pair to multi line chart</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-i-convert-a-Json-Multi-key-value-pair-to-multi-line-chart/m-p/486435#M83290</link>
      <description>&lt;P&gt;hi &lt;/P&gt;

&lt;P&gt;i got it&lt;/P&gt;

&lt;P&gt;index=amber_live_* sourcetype=AMBER_METRIC usedMemoryMB &lt;BR /&gt;
| spath "mtr.gauges.caching_metrics.nodes{}.totalRegionEntryCount" &lt;BR /&gt;
| rename mtr.gauges.caching_metrics.nodes{}.totalRegionEntryCount AS totalRegionEntryCount &lt;BR /&gt;
| rename mtr.gauges.caching_metrics.nodes{}.nodeName AS nodeName &lt;BR /&gt;
| eval x=mvzip(nodeName,totalRegionEntryCount) &lt;BR /&gt;
| mvexpand x &lt;BR /&gt;
| eval x = split(x,",") &lt;BR /&gt;
| eval totalRegionEntryCount=mvindex(x,0) &lt;BR /&gt;
| eval nodeName=mvindex(x,1) | table _time totalRegionEntryCount nodeName | timechart bins=1000 max(nodeName) by totalRegionEntryCount&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:00:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-i-convert-a-Json-Multi-key-value-pair-to-multi-line-chart/m-p/486435#M83290</guid>
      <dc:creator>robertlynch2020</dc:creator>
      <dc:date>2020-09-30T03:00:39Z</dc:date>
    </item>
  </channel>
</rss>

