<?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: Makeresult with hosts and date range in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Makeresult-with-hosts-and-date-range/m-p/550966#M156330</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/131920"&gt;@cboonyan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You're on the right track with makeresults. Here's one possible solution:&lt;/P&gt;&lt;P&gt;| makeresults count=7&lt;BR /&gt;| streamstats count&lt;BR /&gt;| eval _time=relative_time(_time-86400*count, "@d")&lt;BR /&gt;| fields - count&lt;BR /&gt;| eval host="host1 host2 host3", host=split(host, " ")&lt;BR /&gt;| mvexpand host&lt;BR /&gt;| table host _time&lt;BR /&gt;| sort host _time&lt;BR /&gt;| rename host as HOST, _time as DATE&lt;BR /&gt;| fieldformat DATE=strftime(DATE, "%F")&lt;/P&gt;</description>
    <pubDate>Sat, 08 May 2021 14:51:57 GMT</pubDate>
    <dc:creator>tscroggins</dc:creator>
    <dc:date>2021-05-08T14:51:57Z</dc:date>
    <item>
      <title>Makeresult with hosts and date range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Makeresult-with-hosts-and-date-range/m-p/550963#M156328</link>
      <description>&lt;P&gt;I am aiming to provide headers to my generated report. I have 3 hosts, host1 host2 and host3. My report is configured with -7d@d to -1d@d (past 7 days).&lt;/P&gt;&lt;P&gt;I would like to makeresults for the following output:&lt;/P&gt;&lt;P&gt;HOST &amp;nbsp; DATE&lt;/P&gt;&lt;P&gt;host1 &amp;nbsp; Date1&lt;/P&gt;&lt;P&gt;host1 &amp;nbsp; Date2&lt;/P&gt;&lt;P&gt;host1 &amp;nbsp; Date3&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;host1 &amp;nbsp; Date7&lt;/P&gt;&lt;P&gt;host2 &amp;nbsp; Date1&lt;/P&gt;&lt;P&gt;host2 &amp;nbsp; Date2&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;host3 &amp;nbsp; &amp;nbsp;Date7&lt;/P&gt;&lt;P&gt;i have tried the following:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;| makeresults&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;| eval HOST=“host1 host2 host3”&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;| makemv delims=“ “ HOST&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;| mvexpand HOST&lt;/P&gt;&lt;P&gt;and a combination of&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;| bucket _time span=1d&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;| stats count by HOST, _time&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;appreciate any insights into this, thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 08 May 2021 14:31:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Makeresult-with-hosts-and-date-range/m-p/550963#M156328</guid>
      <dc:creator>cboonyan</dc:creator>
      <dc:date>2021-05-08T14:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Makeresult with hosts and date range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Makeresult-with-hosts-and-date-range/m-p/550966#M156330</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/131920"&gt;@cboonyan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You're on the right track with makeresults. Here's one possible solution:&lt;/P&gt;&lt;P&gt;| makeresults count=7&lt;BR /&gt;| streamstats count&lt;BR /&gt;| eval _time=relative_time(_time-86400*count, "@d")&lt;BR /&gt;| fields - count&lt;BR /&gt;| eval host="host1 host2 host3", host=split(host, " ")&lt;BR /&gt;| mvexpand host&lt;BR /&gt;| table host _time&lt;BR /&gt;| sort host _time&lt;BR /&gt;| rename host as HOST, _time as DATE&lt;BR /&gt;| fieldformat DATE=strftime(DATE, "%F")&lt;/P&gt;</description>
      <pubDate>Sat, 08 May 2021 14:51:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Makeresult-with-hosts-and-date-range/m-p/550966#M156330</guid>
      <dc:creator>tscroggins</dc:creator>
      <dc:date>2021-05-08T14:51:57Z</dc:date>
    </item>
  </channel>
</rss>

