<?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 overlay two graphs with different time ranges in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-overlay-two-graphs-with-different-time-ranges/m-p/565137#M196880</link>
    <description>&lt;P&gt;Calculate the hour from the _time variable and use that as your common x-axis&lt;/P&gt;</description>
    <pubDate>Sat, 28 Aug 2021 09:03:24 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-08-28T09:03:24Z</dc:date>
    <item>
      <title>How to overlay two graphs with different time ranges</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-overlay-two-graphs-with-different-time-ranges/m-p/564706#M196711</link>
      <description>&lt;P&gt;Would you know how can I display an overlay of two charts that have different time ranges on the X-axis?&lt;BR /&gt;For example, I would like to compare CPU utilization yesterday with the CPU utilization a week ago.&lt;/P&gt;&lt;P&gt;Is it possible to combine the results of two searches below into one chart?&lt;BR /&gt;&amp;nbsp; | mstats avg(cpu.pctIdle) AS cpu_idle_pct WHERE index=mymetrics host=myserver span=5min earliest=-2days latest=-1days | timechart min(cpu_idle_pct) span=1hour&lt;BR /&gt;&amp;nbsp; | mstats avg(cpu.pctIdle) AS cpu_idle_pct WHERE index=mymetrics host=myserver span=5min earliest=-9days latest=-8days | timechart min(cpu_idle_pct) span=1hour&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 13:18:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-overlay-two-graphs-with-different-time-ranges/m-p/564706#M196711</guid>
      <dc:creator>OctoberP</dc:creator>
      <dc:date>2021-08-25T13:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to overlay two graphs with different time ranges</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-overlay-two-graphs-with-different-time-ranges/m-p/565123#M196875</link>
      <description>&lt;P&gt;Hello, please have a look at the timewrap command.&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.1/SearchReference/Timewrap?ref=hk" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.1/SearchReference/Timewrap?ref=hk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This may be what youre looking for.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Aug 2021 00:42:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-overlay-two-graphs-with-different-time-ranges/m-p/565123#M196875</guid>
      <dc:creator>nyc_jason</dc:creator>
      <dc:date>2021-08-28T00:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to overlay two graphs with different time ranges</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-overlay-two-graphs-with-different-time-ranges/m-p/565137#M196880</link>
      <description>&lt;P&gt;Calculate the hour from the _time variable and use that as your common x-axis&lt;/P&gt;</description>
      <pubDate>Sat, 28 Aug 2021 09:03:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-overlay-two-graphs-with-different-time-ranges/m-p/565137#M196880</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-08-28T09:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to overlay two graphs with different time ranges</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-overlay-two-graphs-with-different-time-ranges/m-p/565187#M196898</link>
      <description>&lt;P&gt;Hi OctoberP&lt;/P&gt;&lt;P&gt;As suggested the &lt;STRONG&gt;timewrap&lt;/STRONG&gt; command should help. The trick here is just showing the two days you're interesting in and not everthing else inbetween (otherwise when it's graphed you have a long empty stretch).&lt;/P&gt;&lt;P&gt;I came up with the following which gets the data for the complete time period where the two days you're interested in overlap, and then time wraps it by a week ('w') so that the two days will overlap when plotted on a graph. The results are then cropped by the where command on the last line to just show the day you're interested in.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| mstats avg(Processor.%_Processor_Time) AS CPUUsage WHERE index=mymetrics host=myserver span=5min earliest=-9days@d latest=-1days@d
| timechart span=1h avg(CPUUsage) AS "CPUUsage"
| timewrap w
| where strftime(_time, "%A") == strftime( relative_time(now(), "-2days@d") ,"%A" )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 00:02:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-overlay-two-graphs-with-different-time-ranges/m-p/565187#M196898</guid>
      <dc:creator>eddieddieddie</dc:creator>
      <dc:date>2021-08-30T00:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to overlay two graphs with different time ranges</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-overlay-two-graphs-with-different-time-ranges/m-p/565238#M196923</link>
      <description>&lt;P&gt;Thank you! The approach with 'timewrap' command worked perfectly for me.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 14:06:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-overlay-two-graphs-with-different-time-ranges/m-p/565238#M196923</guid>
      <dc:creator>OctoberP</dc:creator>
      <dc:date>2021-08-30T14:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to overlay two graphs with different time ranges</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-overlay-two-graphs-with-different-time-ranges/m-p/565239#M196924</link>
      <description>&lt;P&gt;Thank you! The approach with 'timewrap' command worked perfectly for me.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 14:07:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-overlay-two-graphs-with-different-time-ranges/m-p/565239#M196924</guid>
      <dc:creator>OctoberP</dc:creator>
      <dc:date>2021-08-30T14:07:23Z</dc:date>
    </item>
  </channel>
</rss>

