<?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 combine multiple separate fields into one for graphing purposes in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-separate-fields-into-one-for-graphing/m-p/338034#M100262</link>
    <description>&lt;P&gt;This is very helpful! How do I modify it if want every individual event at the time it occurs not the max for a given time interval?&lt;/P&gt;

&lt;P&gt;For example I am running this search:&lt;/P&gt;

&lt;P&gt;index=pwp-prod press=MP230 stats | rex "[.\n]*side-a:\sfa:\s(?\d+),\sfmq:\s(?\d+),\sfq:\s(?\d+),\sfp:\s(?\d+)" | timechart max(side_a_fa) as "side_a_fa" max(side_a_fq) as "side_a_fq" max(side_a_fp) as "side_a_fp" by event&lt;/P&gt;

&lt;P&gt;But some of the events where this is present occur in different time intervals and just want to capture each individual occurrence of this stats block. That is why I added the 'by event' but I am unsure this is what I want.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 15:46:49 GMT</pubDate>
    <dc:creator>hapalmiter</dc:creator>
    <dc:date>2020-09-29T15:46:49Z</dc:date>
    <item>
      <title>How to combine multiple separate fields into one for graphing purposes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-separate-fields-into-one-for-graphing/m-p/338030#M100258</link>
      <description>&lt;P&gt;2017-09-12 12:31:11.817 INFO  [RunMaster] &lt;BR /&gt;
    stats:  jif: 1, fif: 9, fim: 192, f2c: 183&lt;BR /&gt;
    paper:  pc: 9129, uwr: n/a, rwr: n/a&lt;BR /&gt;
    side-a: fa: 0, fmq: 0, fq: 0, fp: 96, #r: 49, frs: 0, f2f ms: 101, fb100 0.00&lt;BR /&gt;
    side-b: fa: 0, fmq: 0, fq: 9, fp: 87, #r: 49, frs: 0, f2f ms: 101, fb200 0.00&lt;/P&gt;

&lt;P&gt;I want to pull out the values for fa, fmq, fq, and fp, but also associate them with either side-a or side-b. I want to be able to graph the these values side by side while also showing side-a vs side-b.&lt;/P&gt;

&lt;P&gt;Currently I can pull out one sides info into separate fields using this regex: "[.\n]*side-a:\sfa:\s(?\d+),\sfmq:\s(?\d+),\sfq:\s(?\d+),\sfp:\s(?\d+)"&lt;/P&gt;

&lt;P&gt;I tried also setting this regex equal to side-a but got no results. Any suggestions on how I am do this?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 18:45:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-separate-fields-into-one-for-graphing/m-p/338030#M100258</guid>
      <dc:creator>hapalmiter</dc:creator>
      <dc:date>2017-09-13T18:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple separate fields into one for graphing purposes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-separate-fields-into-one-for-graphing/m-p/338031#M100259</link>
      <description>&lt;P&gt;Can you describe what you want the final results to look like?&lt;BR /&gt;
If you're using the regex at search time you can use two regex commands to extract side-a and side-b fields (with different field names).&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 20:46:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-separate-fields-into-one-for-graphing/m-p/338031#M100259</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-09-13T20:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple separate fields into one for graphing purposes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-separate-fields-into-one-for-graphing/m-p/338032#M100260</link>
      <description>&lt;P&gt;something like this might be what you're looking for:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=main source="*mylog.log" host="xyz"  | rex field=_raw "side-a: fa:\s+(?&amp;lt;side_a_fa&amp;gt;\d+)\,\s+fmq:\s+(?&amp;lt;side_a_fmq&amp;gt;\d+)\,\s+fq:\s+(?&amp;lt;side_a_fq&amp;gt;\d+)\,\s+fp:\s+(?&amp;lt;side_a_fp&amp;gt;\d+)\,\s+\#r:\s+(?&amp;lt;side_a_r&amp;gt;\d+)\,\s+frs:\s+(?&amp;lt;side_a_frs&amp;gt;\d+)\,\s+f2f\s+ms:\s+(?&amp;lt;side_a_f2f_ms&amp;gt;\d+)\,\s+fb100\s+(?&amp;lt;side_a_fb100&amp;gt;\S+)" | rex field=_raw "side-b:\s+fa:\s+(?&amp;lt;side_b_fa&amp;gt;\d+)\,\s+fmq:\s+(?&amp;lt;side_b_fmq&amp;gt;\d+)\,\s+fq:\s+(?&amp;lt;side_b_fq&amp;gt;\d+)\,\s+fp:\s+(?&amp;lt;side_b_fp&amp;gt;\d+)\,\s+\#r:\s+(?&amp;lt;side_b_r&amp;gt;\d+)\,\s+frs:\s+(?&amp;lt;side_b_frs&amp;gt;\d+)\,\s+f2f\s+ms:\s+(?&amp;lt;side_b_f2f_ms&amp;gt;\d+)\,\s+fb200\s+(?&amp;lt;side_b_fb200&amp;gt;\S+)"  | timechart span=1m  max(side_a_fa) as "1-side_a_fa" max(side_b_fa) as "1-side_b_fa" max(side_a_fmq) as "2-side_a_fmq" max(side_b_fmq) as "2-side_b_fmq" BY host&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 20:55:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-separate-fields-into-one-for-graphing/m-p/338032#M100260</guid>
      <dc:creator>rphillips_splk</dc:creator>
      <dc:date>2017-09-13T20:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple separate fields into one for graphing purposes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-separate-fields-into-one-for-graphing/m-p/338033#M100261</link>
      <description>&lt;P&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/3501iF01C151BF35D8A02/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 20:57:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-separate-fields-into-one-for-graphing/m-p/338033#M100261</guid>
      <dc:creator>rphillips_splk</dc:creator>
      <dc:date>2017-09-13T20:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple separate fields into one for graphing purposes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-separate-fields-into-one-for-graphing/m-p/338034#M100262</link>
      <description>&lt;P&gt;This is very helpful! How do I modify it if want every individual event at the time it occurs not the max for a given time interval?&lt;/P&gt;

&lt;P&gt;For example I am running this search:&lt;/P&gt;

&lt;P&gt;index=pwp-prod press=MP230 stats | rex "[.\n]*side-a:\sfa:\s(?\d+),\sfmq:\s(?\d+),\sfq:\s(?\d+),\sfp:\s(?\d+)" | timechart max(side_a_fa) as "side_a_fa" max(side_a_fq) as "side_a_fq" max(side_a_fp) as "side_a_fp" by event&lt;/P&gt;

&lt;P&gt;But some of the events where this is present occur in different time intervals and just want to capture each individual occurrence of this stats block. That is why I added the 'by event' but I am unsure this is what I want.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:46:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-separate-fields-into-one-for-graphing/m-p/338034#M100262</guid>
      <dc:creator>hapalmiter</dc:creator>
      <dc:date>2020-09-29T15:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple separate fields into one for graphing purposes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-separate-fields-into-one-for-graphing/m-p/338035#M100263</link>
      <description>&lt;P&gt;I'm not completely sure I understand what you want the output to look like but you could use values instead of max,min,avg&lt;BR /&gt;
reduce your span if you are seeing multiple values within one timespan&lt;/P&gt;

&lt;P&gt;...| timechart span=1m values(side_a_fa) as "1-side_a_fa" values(side_b_fa) as "1-side_b_fa" values(side_a_fmq) as "2-side_a_fmq" values(side_b_fmq) as "2-side_b_fmq" BY host&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:00:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-multiple-separate-fields-into-one-for-graphing/m-p/338035#M100263</guid>
      <dc:creator>rphillips_splk</dc:creator>
      <dc:date>2020-09-29T16:00:28Z</dc:date>
    </item>
  </channel>
</rss>

