<?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 use timechart command to calculate the average of a field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-command-to-calculate-the-average-of-a-field/m-p/281747#M85028</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;If you were able to extract field  bandwidth 1 and 3600 then extract or split another field called type  Gbps and Mbps and use If condition type = Gbps  then bandwidth/1000 else bandwidth and then use timechart for average.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 08 Feb 2017 07:07:18 GMT</pubDate>
    <dc:creator>mpreddy</dc:creator>
    <dc:date>2017-02-08T07:07:18Z</dc:date>
    <item>
      <title>How to use timechart command to calculate the average of a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-command-to-calculate-the-average-of-a-field/m-p/281743#M85024</link>
      <description>&lt;P&gt;My raw data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Feb  7 18:18:23 impact 1 Gbps/137.54 Kpps, importance 2...
Feb  7 18:18:23 impact 3600 Mbps/137.54 Kpps, importance 2...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want use timechart search command calculate avg(1Gbps &amp;amp; 3600Mbps) by week or month. Now i use rex to extract field 1G and 3600Mbps values but the field name is same. i wish to change 3600Mbps to Gbps then run &lt;CODE&gt;timechart avg(field)&lt;/CODE&gt;. What should i do? Thanks. &lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 00:52:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-command-to-calculate-the-average-of-a-field/m-p/281743#M85024</guid>
      <dc:creator>chengyu</dc:creator>
      <dc:date>2017-02-08T00:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart command to calculate the average of a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-command-to-calculate-the-average-of-a-field/m-p/281744#M85025</link>
      <description>&lt;P&gt;Can you share your current search that you've so far?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 01:05:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-command-to-calculate-the-average-of-a-field/m-p/281744#M85025</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-08T01:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart command to calculate the average of a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-command-to-calculate-the-average-of-a-field/m-p/281745#M85026</link>
      <description>&lt;P&gt;try like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base query |rex "impact\s(?&amp;lt;bandwidth&amp;gt;.*)/(?&amp;lt;mbps&amp;gt;.\d+.\d+)"  |timechart span=1mon avg(mbps) as avg by bandwidth
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Feb 2017 01:43:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-command-to-calculate-the-average-of-a-field/m-p/281745#M85026</guid>
      <dc:creator>mpreddy</dc:creator>
      <dc:date>2017-02-08T01:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart command to calculate the average of a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-command-to-calculate-the-average-of-a-field/m-p/281746#M85027</link>
      <description>&lt;P&gt;Hi Sir, data is 1 Gbps/137.54 Kpps or 3600 Mbps/137.54 Kpps, i want calculate 1Gbps &amp;amp; 3600 Mbps avg value, not Kpps value.  So i can use rex extract field capture 1 and 3600 value and call field name "bandwidth", but 3600 need transfer to gigabyte,   finally use splunk command "timechart sapn=1mon avg(bandwidth)"&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 06:00:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-command-to-calculate-the-average-of-a-field/m-p/281746#M85027</guid>
      <dc:creator>chengyu</dc:creator>
      <dc:date>2017-02-08T06:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart command to calculate the average of a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-command-to-calculate-the-average-of-a-field/m-p/281747#M85028</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;If you were able to extract field  bandwidth 1 and 3600 then extract or split another field called type  Gbps and Mbps and use If condition type = Gbps  then bandwidth/1000 else bandwidth and then use timechart for average.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Feb 2017 07:07:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-command-to-calculate-the-average-of-a-field/m-p/281747#M85028</guid>
      <dc:creator>mpreddy</dc:creator>
      <dc:date>2017-02-08T07:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to use timechart command to calculate the average of a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-command-to-calculate-the-average-of-a-field/m-p/281748#M85029</link>
      <description>&lt;P&gt;myserarch ... |table bandwidth,_time |  rex field=bandwidth "^(?P\d+.\d+)\s(?P\w+)$" | eval Unit=case(Unit="Gbps",1024,true(),1)  | eval InGbps=(Value*Unit)/1024 |eval InGbps=round(InGbps,2) | timechart span=1d max(InGbps) as MaxGbps  avg(InGbps) as AvgGbps&lt;/P&gt;

&lt;P&gt;extract fields : &lt;BR /&gt;
1.04 Gbps&lt;BR /&gt;
384.05 Mbps&lt;BR /&gt;
5.01 Gbps&lt;BR /&gt;
...&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 03:47:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-timechart-command-to-calculate-the-average-of-a-field/m-p/281748#M85029</guid>
      <dc:creator>chengyu</dc:creator>
      <dc:date>2017-02-14T03:47:29Z</dc:date>
    </item>
  </channel>
</rss>

