<?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: Query to show specified time per day in timechart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Query-to-show-specified-time-per-day-in-timechart/m-p/692081#M235596</link>
    <description>&lt;P&gt;Because you are using _time as your x-axis, the chart will show all times in your time range. You could change your chart settings so that the lines are not joined&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ITWhisperer_0-1719834419449.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31571i2B097187895DB714/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ITWhisperer_0-1719834419449.png" alt="ITWhisperer_0-1719834419449.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Alternatively, you could rename the _time field to something else, but then you would also have to format the time - you may also have to remove events where the value is null (depending on how your search is setup)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rename _time as time
| fieldformat time=strftime(time,"%F %T")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, this is likely to lead to the x-axis values having ellipses in, so you could rotate the labels&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ITWhisperer_1-1719834666512.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31572i5A61ED54022731FB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ITWhisperer_1-1719834666512.png" alt="ITWhisperer_1-1719834666512.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2024 11:53:20 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-07-01T11:53:20Z</dc:date>
    <item>
      <title>Query to show specified time per day in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-to-show-specified-time-per-day-in-timechart/m-p/692073#M235594</link>
      <description>&lt;P&gt;Hi, I would like to create a time chart for a specified time suppose 8AM to 2PM everyday for last 30 days. I am able to chart it however in visualisation, the line from 2PM to next day 8AM is a straight line.&lt;BR /&gt;&lt;BR /&gt;How can we exclude that line for duration(2PM to next day 8AM) and just show chart for 8AM to 2PM everyday as a single line.&lt;BR /&gt;&lt;BR /&gt;Can we exclude the Green box line?&lt;BR /&gt;&lt;BR /&gt;Query Used(just conditions):&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval hour=tonumber(strftime(_time,"%H"))
| where hour &amp;gt;=8
| where hour &amp;lt;=14
| fields - hour&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Splunk issue.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31570iB2DEF192D51BD3C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Splunk issue.png" alt="Splunk issue.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 12:05:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-to-show-specified-time-per-day-in-timechart/m-p/692073#M235594</guid>
      <dc:creator>Codie</dc:creator>
      <dc:date>2024-07-01T12:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Query to show specified time per day in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-to-show-specified-time-per-day-in-timechart/m-p/692081#M235596</link>
      <description>&lt;P&gt;Because you are using _time as your x-axis, the chart will show all times in your time range. You could change your chart settings so that the lines are not joined&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ITWhisperer_0-1719834419449.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31571i2B097187895DB714/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ITWhisperer_0-1719834419449.png" alt="ITWhisperer_0-1719834419449.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Alternatively, you could rename the _time field to something else, but then you would also have to format the time - you may also have to remove events where the value is null (depending on how your search is setup)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rename _time as time
| fieldformat time=strftime(time,"%F %T")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, this is likely to lead to the x-axis values having ellipses in, so you could rotate the labels&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ITWhisperer_1-1719834666512.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31572i5A61ED54022731FB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ITWhisperer_1-1719834666512.png" alt="ITWhisperer_1-1719834666512.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 11:53:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-to-show-specified-time-per-day-in-timechart/m-p/692081#M235596</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-07-01T11:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Query to show specified time per day in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-to-show-specified-time-per-day-in-timechart/m-p/692318#M235649</link>
      <description>&lt;P&gt;If you only have one count to display, another potentially useful visualization is to shift all days into one 24-hour period. &amp;nbsp;Here is a demonstration for 9am - 5pm:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index=_internal earliest=-30d latest=+0d@d by _time span=1h
| eval day = relative_time(_time, "-0d@d")
| where relative_time(_time, "-8h@h") &amp;gt; day AND relative_time(_time, "-18h@h") &amp;lt; day
| timechart span=1h sum(count)
| timewrap 1day&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="Screenshot 2024-07-03 at 8.41.09 AM.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31606iCBEFCE1F96220464/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-07-03 at 8.41.09 AM.png" alt="Screenshot 2024-07-03 at 8.41.09 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 15:43:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-to-show-specified-time-per-day-in-timechart/m-p/692318#M235649</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-07-03T15:43:57Z</dc:date>
    </item>
  </channel>
</rss>

