<?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 use results from one search to create a timechart? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-results-from-one-search-to-create-a-timechart/m-p/586487#M204293</link>
    <description>&lt;P&gt;I am in the process of creating a search to detect significant hard drive decreases.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the results from my search, I would like to then create a timechart to show how the usage has changed over time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my search:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=perfmon collection=LogicalDisk sourcetype="Perfmon:LogicalDisk" counter="% Free Space" (instance!="HarddiskVolume*") (instance!=_Total)
| eval usedSpace=round(100-Value,0) 
|stats min(usedSpace) as min, avg(usedSpace) as avg by host, instance
|eval delta = avg - min
|where delta&amp;gt;10
|rename instance as drive&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;My results return the hostname, the drive letter, the minimum, the average, and the delta for the disk space usage in a tabular format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say it returns one host, I would then like to use that same host to return a timechart for the host and drive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Feb 2022 19:54:25 GMT</pubDate>
    <dc:creator>Stefanie</dc:creator>
    <dc:date>2022-02-24T19:54:25Z</dc:date>
    <item>
      <title>How to use results from one search to create a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-results-from-one-search-to-create-a-timechart/m-p/586487#M204293</link>
      <description>&lt;P&gt;I am in the process of creating a search to detect significant hard drive decreases.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the results from my search, I would like to then create a timechart to show how the usage has changed over time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my search:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=perfmon collection=LogicalDisk sourcetype="Perfmon:LogicalDisk" counter="% Free Space" (instance!="HarddiskVolume*") (instance!=_Total)
| eval usedSpace=round(100-Value,0) 
|stats min(usedSpace) as min, avg(usedSpace) as avg by host, instance
|eval delta = avg - min
|where delta&amp;gt;10
|rename instance as drive&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;My results return the hostname, the drive letter, the minimum, the average, and the delta for the disk space usage in a tabular format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say it returns one host, I would then like to use that same host to return a timechart for the host and drive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 19:54:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-results-from-one-search-to-create-a-timechart/m-p/586487#M204293</guid>
      <dc:creator>Stefanie</dc:creator>
      <dc:date>2022-02-24T19:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to use results from one search to create a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-results-from-one-search-to-create-a-timechart/m-p/586544#M204308</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236717"&gt;@Stefanie&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;after a stats command you have only the fields in the stats, in your case min, avg, host and instance, you don't have more _time&lt;/P&gt;&lt;P&gt;So you have to put also -time in you stats, but before of this you have to group _time using the bin command.&lt;/P&gt;&lt;P&gt;So you could try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=perfmon collection=LogicalDisk sourcetype="Perfmon:LogicalDisk" counter="% Free Space" (instance!="HarddiskVolume*") (instance!=_Total)
| eval usedSpace=round(100-Value,0) 
| rename instance as drive
| bin span=1d _time
| stats min(usedSpace) AS min avg(usedSpace) AS avg BY host drive _time
| eval delta = avg - min
| where delta&amp;gt;10
| eval column=host." ".drive
| timechart max(delta) AS max_delta BY column&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 07:12:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-results-from-one-search-to-create-a-timechart/m-p/586544#M204308</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-02-25T07:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to use results from one search to create a timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-results-from-one-search-to-create-a-timechart/m-p/586600#M204330</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp; You are a wizard! Thank you so much!!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 13:24:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-results-from-one-search-to-create-a-timechart/m-p/586600#M204330</guid>
      <dc:creator>Stefanie</dc:creator>
      <dc:date>2022-02-25T13:24:55Z</dc:date>
    </item>
  </channel>
</rss>

