<?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 calculate xdelay average per mouth in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-xdelay-average-per-mouth/m-p/337335#M170345</link>
    <description>&lt;P&gt;use the eval round function ....&lt;BR /&gt;
if it solved it for you, please accept the answer and up vote any comments / answers that you found helpful&lt;/P&gt;</description>
    <pubDate>Tue, 17 Apr 2018 01:21:28 GMT</pubDate>
    <dc:creator>adonio</dc:creator>
    <dc:date>2018-04-17T01:21:28Z</dc:date>
    <item>
      <title>how to calculate xdelay average per mouth</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-xdelay-average-per-mouth/m-p/337330#M170340</link>
      <description>&lt;P&gt;hello  &lt;/P&gt;

&lt;P&gt;my company start to use splunk to check maillog&lt;/P&gt;

&lt;P&gt;Jan 7 11:14:36 mailserver sm-mta[00228]: a070yZwR021222: to=, delay=00:00:25, xdelay=00:00:25, mailer=smtp, pri=0250112, relay=[10.140.12.43] [10.140.12.43],&lt;/P&gt;

&lt;P&gt;how to calculate the average xdelay per mouth  &lt;/P&gt;

&lt;P&gt;please help me&lt;BR /&gt;&lt;BR /&gt;
thanks so much&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 11:51:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-xdelay-average-per-mouth/m-p/337330#M170340</guid>
      <dc:creator>baoamin</dc:creator>
      <dc:date>2018-04-16T11:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate xdelay average per mouth</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-xdelay-average-per-mouth/m-p/337331#M170341</link>
      <description>&lt;P&gt;hello there,&lt;/P&gt;

&lt;P&gt;assuming you captured the values for the field &lt;CODE&gt;xdelay&lt;/CODE&gt; you can try something like this, run it anywhere:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=1
| eval xdelay = "00:00:25, 00:01:13, 02:34:15, 00:32:11, 01:12:12"
| makemv delim="," xdelay
| mvexpand xdelay
| rex field="xdelay" "(?&amp;lt;xdelay_hour&amp;gt;\d{2}):(?&amp;lt;xdelay_min&amp;gt;\d{2}):(?&amp;lt;xdelay_sec&amp;gt;\d{2})"
| eval xdelay_duration_seconds = ((xdelay_hour*3600)+(xdelay_min*60)+xdelay_sec)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;now calculate however you want, for example:&lt;BR /&gt;
&lt;CODE&gt;| timechart span=1m avg(xdelay_duration_seconds) as avg_xdelay&lt;/CODE&gt; &lt;BR /&gt;
checkout below screenshot:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4768iF988C8E0158A803A/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 17:21:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-xdelay-average-per-mouth/m-p/337331#M170341</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-04-16T17:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate xdelay average per mouth</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-xdelay-average-per-mouth/m-p/337332#M170342</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your current search with field _time and xdelay
| convert dur2sec(xdelay)
| timechart span=1mon avg(xdelay) as "AverageXDelay"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Apr 2018 18:04:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-xdelay-average-per-mouth/m-p/337332#M170342</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-04-16T18:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate xdelay average per mouth</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-xdelay-average-per-mouth/m-p/337333#M170343</link>
      <description>&lt;P&gt;upvote for the function! &lt;CODE&gt;dur2sec&lt;/CODE&gt; i will use it!&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 18:16:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-xdelay-average-per-mouth/m-p/337333#M170343</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-04-16T18:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate xdelay average per mouth</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-xdelay-average-per-mouth/m-p/337334#M170344</link>
      <description>&lt;P&gt;thank you very much  it works  &lt;/P&gt;

&lt;P&gt;but I also have a question  that how to set the value of 0.577539820 like 0.577&lt;/P&gt;

&lt;P&gt;thanks so much&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 01:13:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-xdelay-average-per-mouth/m-p/337334#M170344</guid>
      <dc:creator>baoamin</dc:creator>
      <dc:date>2018-04-17T01:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate xdelay average per mouth</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-xdelay-average-per-mouth/m-p/337335#M170345</link>
      <description>&lt;P&gt;use the eval round function ....&lt;BR /&gt;
if it solved it for you, please accept the answer and up vote any comments / answers that you found helpful&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 01:21:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-xdelay-average-per-mouth/m-p/337335#M170345</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-04-17T01:21:28Z</dc:date>
    </item>
  </channel>
</rss>

