<?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: Run predict command for multiple disk in same query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Run-predict-command-for-multiple-disk-in-same-query/m-p/745472#M241453</link>
    <description>&lt;P&gt;Assuming instance contains the disk you want to predict, you could try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=main host="localhost"  instance="C:" sourcetype="Perfmon:LogicalDisk" counter="% Free Space" 
| eval instance=substr(instance,0,1)
| timechart min(value) as "Used Space" by instance
| appendpipe
    [| fields _time C
    | where isnotnull(C)
    | predict C algorithm=LLP5 future_timespan=180]
| appendpipe
    [| fields _time D
    | where isnotnull(D)
    | predict D algorithm=LLP5 future_timespan=180]
| appendpipe
    [| fields _time E
    | where isnotnull(E)
    | predict E algorithm=LLP5 future_timespan=180]&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 05 May 2025 08:16:21 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2025-05-05T08:16:21Z</dc:date>
    <item>
      <title>Run predict command for multiple disk in same query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Run-predict-command-for-multiple-disk-in-same-query/m-p/745465#M241447</link>
      <description>&lt;P&gt;I have multiple disk like C, D &amp;amp; E on server and want to do the prediction for multiple disk in same query.&lt;/P&gt;&lt;P&gt;index=main host="localhost"&amp;nbsp; instance="C:" sourcetype="Perfmon:LogicalDisk" counter="% Free Space" | timechart min(Value) as "Used Space" | predict "Used Space" algorithm=LLP5 future_timespan=180&lt;/P&gt;&lt;P&gt;Could anyone help with modified query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 May 2025 07:40:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Run-predict-command-for-multiple-disk-in-same-query/m-p/745465#M241447</guid>
      <dc:creator>RSS_STT</dc:creator>
      <dc:date>2025-05-05T07:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Run predict command for multiple disk in same query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Run-predict-command-for-multiple-disk-in-same-query/m-p/745472#M241453</link>
      <description>&lt;P&gt;Assuming instance contains the disk you want to predict, you could try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=main host="localhost"  instance="C:" sourcetype="Perfmon:LogicalDisk" counter="% Free Space" 
| eval instance=substr(instance,0,1)
| timechart min(value) as "Used Space" by instance
| appendpipe
    [| fields _time C
    | where isnotnull(C)
    | predict C algorithm=LLP5 future_timespan=180]
| appendpipe
    [| fields _time D
    | where isnotnull(D)
    | predict D algorithm=LLP5 future_timespan=180]
| appendpipe
    [| fields _time E
    | where isnotnull(E)
    | predict E algorithm=LLP5 future_timespan=180]&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 05 May 2025 08:16:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Run-predict-command-for-multiple-disk-in-same-query/m-p/745472#M241453</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-05-05T08:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Run predict command for multiple disk in same query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Run-predict-command-for-multiple-disk-in-same-query/m-p/745476#M241456</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261968"&gt;@RSS_STT&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The predict command can take a number of fields, such as in this example below, allowing you to run the predict against all your drives.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=5
| streamstats count
| eval instance = case(count%3==1, "C:", count%3==2, "D:", true(), "E:")
| eval Value = case(instance=="C:", 90 - count*5, instance=="D:", 80 - count*4, instance=="E:", 70 - count*3)
| append [| makeresults count=5
| eval _time = relative_time(now(), "-1h")
| streamstats count
| eval instance = case(count%3==1, "C:", count%3==2, "D:", true(), "E:")
| eval Value = case(instance=="C:", 880 - count*5, instance=="D:", 82 - count*4, instance=="E:", 70 - count*3)]
| fields _time, instance, Value
| timechart min(Value) as "FreeSpace" by instance
| fillnull "C:" "D:" "E:"
| predict "C:" "D:" "E:" algorithm=LLP5 future_timespan=180&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="livehybrid_0-1746437121904.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/38849i7F1D92D7548FB0D8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="livehybrid_0-1746437121904.png" alt="livehybrid_0-1746437121904.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Did this answer help you?&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;If so, please consider:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Adding karma to show it was useful&lt;/LI&gt;&lt;LI&gt;Marking it as the solution if it resolved your issue&lt;/LI&gt;&lt;LI&gt;Commenting if you need any clarification&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Your feedback encourages the volunteers in this community to continue contributing&lt;/P&gt;</description>
      <pubDate>Mon, 05 May 2025 09:25:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Run-predict-command-for-multiple-disk-in-same-query/m-p/745476#M241456</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-05-05T09:25:29Z</dc:date>
    </item>
  </channel>
</rss>

