<?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: splunk search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/splunk-search/m-p/539915#M152714</link>
    <description>&lt;P&gt;awesome, it worked, thanks for ur help&lt;/P&gt;</description>
    <pubDate>Mon, 15 Feb 2021 11:06:46 GMT</pubDate>
    <dc:creator>foysal0124</dc:creator>
    <dc:date>2021-02-15T11:06:46Z</dc:date>
    <item>
      <title>splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search/m-p/539873#M152698</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an event value like this&amp;nbsp;&amp;nbsp;&lt;SPAN class="t"&gt;2021-02-15&lt;/SPAN&gt; &lt;SPAN class="t"&gt;18:07:33&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class="t h"&gt;936, where the last value after comma(936) means the response time in ms. i tried to extract that value and want to average response time but it did not work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t h"&gt;how i can extract the value after comma from that field. i tried something like this&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t h"&gt;avg(mvindex(split(TimeStamp,","),-1)) as AverageResponse&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t h"&gt;TimeStamp=&lt;SPAN class="t"&gt;2021-02-15&lt;/SPAN&gt; &lt;SPAN class="t"&gt;18:07:33&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;936&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t h"&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t h"&gt;Foysal&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 07:26:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search/m-p/539873#M152698</guid>
      <dc:creator>foysal0124</dc:creator>
      <dc:date>2021-02-15T07:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search/m-p/539875#M152700</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231529"&gt;@foysal0124&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You use rex command like below;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=TimeStamp "\,(?&amp;lt;AverageResponse&amp;gt;\d+)"&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 15 Feb 2021 07:33:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search/m-p/539875#M152700</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-02-15T07:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search/m-p/539876#M152701</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231529"&gt;@foysal0124&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you can extract the values between commas using a regex and then calculate average using the stats command, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Your_search
| rex ",(?&amp;lt;response_time&amp;gt;\d+),"
| stats avg(response_time) AS average&lt;/LI-CODE&gt;&lt;P&gt;if in your logs there's the possibility to have also other numbers between commas, you have to use a just a little more complex regex like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Your_search
| rex "^\d+-\d+-\d+\s+\d+:\d+:\d+,(?&amp;lt;response_time&amp;gt;\d+),"
| stats avg(response_time) AS average&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/q4VyFQ/1" target="_blank"&gt;https://regex101.com/r/q4VyFQ/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 07:36:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search/m-p/539876#M152701</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-02-15T07:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search/m-p/539912#M152712</link>
      <description>&lt;P&gt;awesome, it worked&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 11:05:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search/m-p/539912#M152712</guid>
      <dc:creator>foysal0124</dc:creator>
      <dc:date>2021-02-15T11:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search/m-p/539913#M152713</link>
      <description>&lt;P&gt;awesome test tool, thanks&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 11:05:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search/m-p/539913#M152713</guid>
      <dc:creator>foysal0124</dc:creator>
      <dc:date>2021-02-15T11:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-search/m-p/539915#M152714</link>
      <description>&lt;P&gt;awesome, it worked, thanks for ur help&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 11:06:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-search/m-p/539915#M152714</guid>
      <dc:creator>foysal0124</dc:creator>
      <dc:date>2021-02-15T11:06:46Z</dc:date>
    </item>
  </channel>
</rss>

