<?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 rex multiple fields and represent in a chart? in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-rex-multiple-fields-and-represent-in-a-chart/m-p/440821#M1504</link>
    <description>&lt;P&gt;Hi pranay04,&lt;/P&gt;

&lt;P&gt;That's pretty easy and straight forward in Splunk &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;BR /&gt;
Based on your provided examples take this run everywhere command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval flubber="com.ibm.mq.MQException,ORA Error,OutOfMemory Error" 
| makemv delim="," flubber 
| mvexpand flubber 
| rename comment AS "Everything above this was used to create dummy data!" 
| eval status=case(match(flubber, "com.ibm.mq.MQException"), "MQError", match(flubber, "ORA Error"), "DB error",match(flubber, "OutOfMemory Error"), "OOM", 1=1, " ¯\_(ツ)_/¯ ") 
| chart count by status
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The result will look like this:&lt;/P&gt;

&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/6479iBB6E048E9FD040AF/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 this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
    <pubDate>Fri, 01 Feb 2019 05:58:44 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2019-02-01T05:58:44Z</dc:date>
    <item>
      <title>How to rex multiple fields and represent in a chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-rex-multiple-fields-and-represent-in-a-chart/m-p/440819#M1502</link>
      <description>&lt;P&gt;I am trying to chart my output from logs to rex for different errors like &lt;BR /&gt;
i. "com.ibm.mq.MQException" as MQError&lt;BR /&gt;
ii. "ORA Error" as DB error&lt;BR /&gt;
iii. "OutOfMemory Error" as OOM&lt;/P&gt;

&lt;P&gt;The above errors are part of the log event and are not classified by any fields.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 21:10:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-rex-multiple-fields-and-represent-in-a-chart/m-p/440819#M1502</guid>
      <dc:creator>pranay04</dc:creator>
      <dc:date>2019-01-31T21:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to rex multiple fields and represent in a chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-rex-multiple-fields-and-represent-in-a-chart/m-p/440820#M1503</link>
      <description>&lt;P&gt;Please start over and add many more words of description.  I have no idea what you need.  Always provide final output mockups so that even if your descriptions are lacking, we can get the gist.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 23:32:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-rex-multiple-fields-and-represent-in-a-chart/m-p/440820#M1503</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-01-31T23:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to rex multiple fields and represent in a chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-rex-multiple-fields-and-represent-in-a-chart/m-p/440821#M1504</link>
      <description>&lt;P&gt;Hi pranay04,&lt;/P&gt;

&lt;P&gt;That's pretty easy and straight forward in Splunk &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;BR /&gt;
Based on your provided examples take this run everywhere command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval flubber="com.ibm.mq.MQException,ORA Error,OutOfMemory Error" 
| makemv delim="," flubber 
| mvexpand flubber 
| rename comment AS "Everything above this was used to create dummy data!" 
| eval status=case(match(flubber, "com.ibm.mq.MQException"), "MQError", match(flubber, "ORA Error"), "DB error",match(flubber, "OutOfMemory Error"), "OOM", 1=1, " ¯\_(ツ)_/¯ ") 
| chart count by status
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The result will look like this:&lt;/P&gt;

&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/6479iBB6E048E9FD040AF/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 this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 05:58:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-rex-multiple-fields-and-represent-in-a-chart/m-p/440821#M1504</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-02-01T05:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to rex multiple fields and represent in a chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-rex-multiple-fields-and-represent-in-a-chart/m-p/440822#M1505</link>
      <description>&lt;P&gt;Maybe this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=AlwaysSpecifyAnIndex AND sourcetype=AndSourcetypeToo
| eval error=case(
   searchmatch("com.ibm.mq.MQException"), "MQError",
   searchmatch("ORA Error"),              "DB error",
   searchmatch("OutOfMemory Error"),      "OOM",
   true(),                                "Unknown")
| stats count BY error
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Feb 2019 02:49:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-rex-multiple-fields-and-represent-in-a-chart/m-p/440822#M1505</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-02-13T02:49:52Z</dc:date>
    </item>
  </channel>
</rss>

