<?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 TimeChart for average function avg()? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-TimeChart-for-average-function-avg/m-p/636334#M220994</link>
    <description>&lt;P&gt;I have this search that is working and returning a average Delay value:&lt;BR /&gt;&lt;BR /&gt;Search Command&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval epoch_timestamp=strptime(timestamp,"%Y-%m-%dT%H:%M:%S.%3N%:z")
| stats range(epoch_timestamp) as Delay by "logId"
| stats avg(Delay)&lt;/LI-CODE&gt;
&lt;P&gt;However, I want to display the daily averages in a timechart graph to see the performance evolution by day.&lt;BR /&gt;Tried the following based on research but It does not return Statistic or Vizualization values (just returning events):&lt;/P&gt;
&lt;P&gt;Search Command&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval epoch_timestamp=strptime(timestamp,"%Y-%m-%dT%H:%M:%S.%3N%:z")
| stats range(epoch_timestamp) as Delay by "logId"
| bucket _time span=1d
| stats avg(Delay) as Performance by _time&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 28 Mar 2023 16:22:08 GMT</pubDate>
    <dc:creator>DPOIRE</dc:creator>
    <dc:date>2023-03-28T16:22:08Z</dc:date>
    <item>
      <title>How to TimeChart for average function avg()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-TimeChart-for-average-function-avg/m-p/636334#M220994</link>
      <description>&lt;P&gt;I have this search that is working and returning a average Delay value:&lt;BR /&gt;&lt;BR /&gt;Search Command&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval epoch_timestamp=strptime(timestamp,"%Y-%m-%dT%H:%M:%S.%3N%:z")
| stats range(epoch_timestamp) as Delay by "logId"
| stats avg(Delay)&lt;/LI-CODE&gt;
&lt;P&gt;However, I want to display the daily averages in a timechart graph to see the performance evolution by day.&lt;BR /&gt;Tried the following based on research but It does not return Statistic or Vizualization values (just returning events):&lt;/P&gt;
&lt;P&gt;Search Command&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval epoch_timestamp=strptime(timestamp,"%Y-%m-%dT%H:%M:%S.%3N%:z")
| stats range(epoch_timestamp) as Delay by "logId"
| bucket _time span=1d
| stats avg(Delay) as Performance by _time&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 28 Mar 2023 16:22:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-TimeChart-for-average-function-avg/m-p/636334#M220994</guid>
      <dc:creator>DPOIRE</dc:creator>
      <dc:date>2023-03-28T16:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: TimeChart for average function avg()</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-TimeChart-for-average-function-avg/m-p/636337#M220996</link>
      <description>&lt;P&gt;Try something by this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval epoch_timestamp=strptime(timestamp,"%Y-%m-%dT%H:%M:%S.%3N%:z")
| stats range(epoch_timestamp) as Delay max(_time) as _time by "logId"
| bucket _time span=1d
| stats avg(Delay) as Performance by _time&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 28 Mar 2023 14:31:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-TimeChart-for-average-function-avg/m-p/636337#M220996</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-28T14:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: TimeChart for average function avg()</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-TimeChart-for-average-function-avg/m-p/636340#M220997</link>
      <description>&lt;P&gt;Thanks, appears to partially work.&lt;BR /&gt;You provided the solution to my question.&lt;BR /&gt;However, I have this result now where Sunday is returning a zero value which is screwing up the results and trend.&lt;BR /&gt;How can I remove these from the results and graph?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DPOIRE_0-1680015199100.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24582i4C16BAF048A9BDAD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DPOIRE_0-1680015199100.png" alt="DPOIRE_0-1680015199100.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 14:53:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-TimeChart-for-average-function-avg/m-p/636340#M220997</guid>
      <dc:creator>DPOIRE</dc:creator>
      <dc:date>2023-03-28T14:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: TimeChart for average function avg()</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-TimeChart-for-average-function-avg/m-p/636343#M220998</link>
      <description>&lt;LI-CODE lang="markup"&gt;| eval Performance=if(Performance == 0,null(),Performance)&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ITWhisperer_0-1680016474944.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24583i5090591B979C45F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ITWhisperer_0-1680016474944.png" alt="ITWhisperer_0-1680016474944.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 15:14:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-TimeChart-for-average-function-avg/m-p/636343#M220998</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-28T15:14:42Z</dc:date>
    </item>
  </channel>
</rss>

