<?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: How to break multiple values into a new row ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311117#M93270</link>
    <description>&lt;P&gt;Thanks again for your time!&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jan 2018 16:38:56 GMT</pubDate>
    <dc:creator>rsokolova</dc:creator>
    <dc:date>2018-01-18T16:38:56Z</dc:date>
    <item>
      <title>How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311099#M93252</link>
      <description>&lt;P&gt;Thanks in advance, &lt;/P&gt;

&lt;P&gt;We are having a hard time trying to split free and used space by partition, hope you can help. &lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4163i76169A45179056C8/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4164i45D15F1A371F7AD0/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 14:12:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311099#M93252</guid>
      <dc:creator>rsokolova</dc:creator>
      <dc:date>2018-01-18T14:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311100#M93253</link>
      <description>&lt;P&gt;Hi @rsokolova &lt;/P&gt;

&lt;P&gt;Can you please change | stats in your query to something like this &lt;CODE&gt;..... | stats list(capacity) AS capacity, list(space) AS space, list(percent) AS percent by cluster.name, vm_name, partition&lt;/CODE&gt; ?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 14:19:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311100#M93253</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-01-18T14:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311101#M93254</link>
      <description>&lt;P&gt;It doesnt work , still need to break capacity and space, which we already tried and didnt work either. &lt;/P&gt;

&lt;P&gt;&lt;IMG src="http://file:///D:/Splunk/space.JPG" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 14:43:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311101#M93254</guid>
      <dc:creator>rsokolova</dc:creator>
      <dc:date>2018-01-18T14:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311102#M93255</link>
      <description>&lt;P&gt;Can you please provide one sample event (Please mask any sensitive data) ?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 14:47:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311102#M93255</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-01-18T14:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311103#M93256</link>
      <description>&lt;P&gt;I have added another screenshot to the first post. Thanks for checking. &lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 14:52:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311103#M93256</guid>
      <dc:creator>rsokolova</dc:creator>
      <dc:date>2018-01-18T14:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311104#M93257</link>
      <description>&lt;P&gt;Looks like you have mutiple different value for single partition for same vm_name and cluster.name. If you try this query &lt;CODE&gt;..... | stats values(capacity) AS capacity, values(space) AS space, values(percent) AS percent by cluster.name, vm_name, partition&lt;/CODE&gt; it will give you less result but it will still provide you more than one value on capacity and space column. Can you please provide some sample events ?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:44:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311104#M93257</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2020-09-29T17:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311105#M93258</link>
      <description>&lt;P&gt;Can you try &lt;BR /&gt;
&lt;CODE&gt;| stats count by cluster.name vm_name partition capacity space percent | fields - count&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 15:02:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311105#M93258</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-18T15:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311106#M93259</link>
      <description>&lt;P&gt;I have uploaded another screenshot. &lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 15:04:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311106#M93259</guid>
      <dc:creator>rsokolova</dc:creator>
      <dc:date>2018-01-18T15:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311107#M93260</link>
      <description>&lt;P&gt;As I mentioned earlier there are still multiple values but strange thing is that why single partition on same machine have multiple values, that's why I am asking raw sample data.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 15:07:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311107#M93260</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-01-18T15:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311108#M93261</link>
      <description>&lt;P&gt;I have uploaded screenshot of the raw data.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 15:13:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311108#M93261</guid>
      <dc:creator>rsokolova</dc:creator>
      <dc:date>2018-01-18T15:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311109#M93262</link>
      <description>&lt;P&gt;Didnt quite work, I have uploaded screenshot to the first post of the raw data that might help.&lt;/P&gt;

&lt;P&gt;cluster.name     vm_name    partition   capacity    space&lt;BR /&gt;
Development_General MISEDIDEV01 /   10622074880 10588340224&lt;BR /&gt;
Development_General MISEDIDEV01 /   10622074880 12790001664&lt;BR /&gt;
Development_General MISEDIDEV01 /   10622074880 12790087680&lt;BR /&gt;
Development_General MISEDIDEV01 /   10622074880 2040201216&lt;BR /&gt;
Development_General MISEDIDEV01 /   10622074880 2074800128&lt;BR /&gt;
Development_General MISEDIDEV01 /   10622074880 31894880256&lt;BR /&gt;
Development_General MISEDIDEV01 /   10622074880 31895392256&lt;BR /&gt;
Development_General MISEDIDEV01 /   10622074880 31902117888&lt;BR /&gt;
Development_General MISEDIDEV01 /   10622074880 31902179328&lt;BR /&gt;
Development_General MISEDIDEV01 /   10622074880 3368103936&lt;BR /&gt;
Development_General MISEDIDEV01 /   10622074880 3553128448&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:40:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311109#M93262</guid>
      <dc:creator>rsokolova</dc:creator>
      <dc:date>2020-09-29T17:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311110#M93263</link>
      <description>&lt;P&gt;This is a piece of the raw data without being organized. &lt;/P&gt;

&lt;P&gt;disk": [{"capacity": "12874416128", "diskPath": "/", "freeSpace": "12790087680"}, {"capacity": "7505707008", "diskPath": "/usr", "freeSpace": "3691720704"}, {"capacity": "1063256064", "diskPath": "/boot", "freeSpace": "825552896"}, {"capacity": "42392092672", "diskPath": "/logs", "freeSpace": "41320570880"}, {"capacity": "21250441216", "diskPath": "/shBC", "freeSpace": "2040201216"}, {"capacity": "7505707008", "diskPath": "/home", "freeSpace": "7430582272"}, {"capacity": "4284481536", "diskPath": "/tmp", "freeSpace": "4196638720"}, {"capacity": "10622074880", "diskPath": "/logarch", "freeSpace": "10588340224"}, {"capacity": "63319834624", "diskPath": "/apps", "freeSpace": "31894880256"}, {"capacity": "7505707008", "diskPath": "/var", "freeSpace": "5256704000"}, {"capacity": "7505707008", "diskPath": "/var/tmp", "freeSpace": "5256704000"}],&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 15:42:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311110#M93263</guid>
      <dc:creator>rsokolova</dc:creator>
      <dc:date>2018-01-18T15:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311111#M93264</link>
      <description>&lt;P&gt;looking at what @harsmarvania57 provided, i think something like that might work for you, aside from the percent field. I'm not sure where that is coming from in your original post. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.... | stats max(capacity) AS capacity, max(space) AS space by cluster.name, vm_name, partition
|eval percent=round((space/capacity)*100,2)."%"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if not, can you provide what isn't working or a sample output of what exactly you're looking for?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 15:59:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311111#M93264</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2018-01-18T15:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311112#M93265</link>
      <description>&lt;P&gt;Didnt work, its showing the same capacity and free space for all the partitions. &lt;/P&gt;

&lt;P&gt;cluster.name                        vm_name partitio    capacity                             space             percent&lt;BR /&gt;
Development_General MISEDIDEV01 /   12874416128        41338839040          321.09%&lt;BR /&gt;
Development_General MISEDIDEV01 /apps   12874416128 41338839040 321.09%&lt;BR /&gt;
Development_General MISEDIDEV01 /boot   12874416128 41338839040 321.09%&lt;/P&gt;

&lt;P&gt;I expected to see the same output but with the right capacity and space to be able to calculate the percent by partition. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:41:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311112#M93265</guid>
      <dc:creator>rsokolova</dc:creator>
      <dc:date>2020-09-29T17:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311113#M93266</link>
      <description>&lt;P&gt;Try something like this, first 2 lines are used to generate sample data only.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval _raw="{\"disk\": [{\"capacity\": \"12874416128\", \"diskPath\": \"/\", \"freeSpace\": \"12790087680\"}, {\"capacity\": \"7505707008\", \"diskPath\": \"/usr\", \"freeSpace\": \"3691720704\"}, {\"capacity\": \"1063256064\", \"diskPath\": \"/boot\", \"freeSpace\": \"825552896\"}, {\"capacity\": \"42392092672\", \"diskPath\": \"/logs\", \"freeSpace\": \"41320570880\"}, {\"capacity\": \"21250441216\", \"diskPath\": \"/shBC\", \"freeSpace\": \"2040201216\"}, {\"capacity\": \"7505707008\", \"diskPath\": \"/home\", \"freeSpace\": \"7430582272\"}, {\"capacity\": \"4284481536\", \"diskPath\": \"/tmp\", \"freeSpace\": \"4196638720\"}, {\"capacity\": \"10622074880\", \"diskPath\": \"/logarch\", \"freeSpace\": \"10588340224\"}, {\"capacity\": \"63319834624\", \"diskPath\": \"/apps\", \"freeSpace\": \"31894880256\"}, {\"capacity\": \"7505707008\", \"diskPath\": \"/var\", \"freeSpace\": \"5256704000\"}, {\"capacity\": \"7505707008\", \"diskPath\": \"/var/tmp\", \"freeSpace\": \"5256704000\"}]}"
| spath
| rename disk{}.capacity AS capacity, disk{}.diskPath AS path, disk{}.freeSpace AS space
| eval cap_path=mvzip(capacity,path)
| eval cap_path_space=mvzip(cap_path,space)
| mvexpand cap_path_space
| makemv delim="," cap_path_space
| eval capacity=mvindex(cap_path_space,0), path=mvindex(cap_path_space,1), space=mvindex(cap_path_space,2)
| fields - cap_path,cap_path_space
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:13:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311113#M93266</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-01-18T16:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311114#M93267</link>
      <description>&lt;P&gt;It worked. Thank you so much.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:29:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311114#M93267</guid>
      <dc:creator>rsokolova</dc:creator>
      <dc:date>2018-01-18T16:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311115#M93268</link>
      <description>&lt;P&gt;I have converted my comment to answer so you can accept/upvote it.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:32:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311115#M93268</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-01-18T16:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311116#M93269</link>
      <description>&lt;P&gt;right, that means it's still taking all the values and grabbing the max, and it'll do that if you use values or list, as well. &lt;/P&gt;

&lt;P&gt;@harsmarvania57 nailed it with joining the fields together using mvzip. &lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/MultivalueEvalFunctions#mvzip.28X.2CY.2C.22Z.22.29"&gt;https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/MultivalueEvalFunctions#mvzip.28X.2CY.2C.22Z.22.29&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;extract your fields with spath, and then add something like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval cap_path=mvzip(capacity,path)
 | eval cap_path_space=mvzip(cap_path,space)
 | mvexpand cap_path_space
 | makemv delim="," cap_path_space
 | eval capacity=mvindex(cap_path_space,0), path=mvindex(cap_path_space,1), space=mvindex(cap_path_space,2)| eval percent=round((space/capacity)*100,2)."%"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:32:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311116#M93269</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2018-01-18T16:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311117#M93270</link>
      <description>&lt;P&gt;Thanks again for your time!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:38:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311117#M93270</guid>
      <dc:creator>rsokolova</dc:creator>
      <dc:date>2018-01-18T16:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to break multiple values into a new row ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311118#M93271</link>
      <description>&lt;P&gt;Great solution @harsmarvania57 ! &lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:53:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-break-multiple-values-into-a-new-row/m-p/311118#M93271</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-01-18T16:53:44Z</dc:date>
    </item>
  </channel>
</rss>

