<?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: Division of two sums - subfield parsed out of a field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Division-of-two-sums-subfield-parsed-out-of-a-field/m-p/76309#M19283</link>
    <description>&lt;P&gt;Use &lt;CODE&gt;eval&lt;/CODE&gt; something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=*output/ora_queries/cluster10/processKpis.csv
| rex field=module_name "(?&amp;lt;server&amp;gt;PROCESS[0-9]qa_server)"
| timechart span=2h sum(EVOCATIONS) by server
| eval ratio=qa_cluster1 / qa_cluster2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 01 Oct 2012 15:59:53 GMT</pubDate>
    <dc:creator>dwaddle</dc:creator>
    <dc:date>2012-10-01T15:59:53Z</dc:date>
    <item>
      <title>Division of two sums - subfield parsed out of a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Division-of-two-sums-subfield-parsed-out-of-a-field/m-p/76308#M19282</link>
      <description>&lt;P&gt;Let's say I have a .csv content of the following structure,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;PROCESS_5 (qa_cluster1server3),1,100,131,2012-10-01 15:50:00  
PROCESS_6 (qa_cluster2server2),2,100,97,2012-10-01 15:50:00
....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need to parse the cluster from which the data belongs out of the first comma delimited value,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=*output/ora_queries/cluster10/processKpis.csv
| rex field=module_name "(?&amp;lt;server&amp;gt;PROCESS[0-9]qa_server)"
| timechart span=2h sum(EVOCATIONS) by server
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which gets the following output,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time                   qa_cluster1 qa_cluster2
01/10/2012 11:00:00.000 17785   34852
01/10/2012 11:05:00.000 17529   35039
....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But how can I get the ratio evolution between each different cluster?&lt;BR /&gt;
(dividing the sum(EVOCATIONS) of one server by the other)&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2012 15:13:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Division-of-two-sums-subfield-parsed-out-of-a-field/m-p/76308#M19282</guid>
      <dc:creator>splunk_zen</dc:creator>
      <dc:date>2012-10-01T15:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Division of two sums - subfield parsed out of a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Division-of-two-sums-subfield-parsed-out-of-a-field/m-p/76309#M19283</link>
      <description>&lt;P&gt;Use &lt;CODE&gt;eval&lt;/CODE&gt; something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=*output/ora_queries/cluster10/processKpis.csv
| rex field=module_name "(?&amp;lt;server&amp;gt;PROCESS[0-9]qa_server)"
| timechart span=2h sum(EVOCATIONS) by server
| eval ratio=qa_cluster1 / qa_cluster2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Oct 2012 15:59:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Division-of-two-sums-subfield-parsed-out-of-a-field/m-p/76309#M19283</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-10-01T15:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Division of two sums - subfield parsed out of a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Division-of-two-sums-subfield-parsed-out-of-a-field/m-p/76310#M19284</link>
      <description>&lt;P&gt;Thanks dwadlle.&lt;BR /&gt;
It IS easy... I was overcomplicating it.&lt;BR /&gt;
I just had to filter the fields to get the graph I intended.&lt;/P&gt;

&lt;P&gt;source=*output/ora_queries/cluster10/processKpis.csv&lt;BR /&gt;
| rex field=module_name "(?&lt;SERVER&gt;PROCESS[0-9]qa_server)"&lt;BR /&gt;
| timechart span=2h sum(EVOCATIONS) by server&lt;BR /&gt;
| eval ratio=qa_cluster1 / qa_cluster2&lt;BR /&gt;
| fields _time, EvocationRatio&lt;/SERVER&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:32:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Division-of-two-sums-subfield-parsed-out-of-a-field/m-p/76310#M19284</guid>
      <dc:creator>splunk_zen</dc:creator>
      <dc:date>2020-09-28T12:32:16Z</dc:date>
    </item>
  </channel>
</rss>

