<?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 How to chart over multiple fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-over-multiple-fields/m-p/651957#M225356</link>
    <description>&lt;P&gt;my query:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=abd   ("start app"  AND  "app listed")  |rex field=_raw "APP:\s+(&amp;lt;application1&amp;gt;\S+)"
|rex field=_raw "LLA:\s+\[?&amp;lt;dip&amp;gt;[^\]]+)."
|dedup dip
|chart over application1
|appendcols
[|search index=abd ("POST /ui/logs" OR  "POST /ui/data" OR "POST /ui/vi/reg") AND  "state: complete"
 |rex field=_raw "APP:  (?&amp;lt;application2&amp;gt;\w+)"
|rex field=_raw "LLA:\s+\[?&amp;lt;dip&amp;gt;[^\]]+)."
|dedup dip
|chart over application2&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;i want output as shown below: HOW TO GET THIS??&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;application1&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;count&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;application2&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;count&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;L1&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;10&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;L1&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;15&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;M2&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;20&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;M2&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;L3&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;45&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;L3&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;100&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
    <pubDate>Tue, 25 Jul 2023 18:37:47 GMT</pubDate>
    <dc:creator>mahesh27</dc:creator>
    <dc:date>2023-07-25T18:37:47Z</dc:date>
    <item>
      <title>How to chart over multiple fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-over-multiple-fields/m-p/651957#M225356</link>
      <description>&lt;P&gt;my query:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=abd   ("start app"  AND  "app listed")  |rex field=_raw "APP:\s+(&amp;lt;application1&amp;gt;\S+)"
|rex field=_raw "LLA:\s+\[?&amp;lt;dip&amp;gt;[^\]]+)."
|dedup dip
|chart over application1
|appendcols
[|search index=abd ("POST /ui/logs" OR  "POST /ui/data" OR "POST /ui/vi/reg") AND  "state: complete"
 |rex field=_raw "APP:  (?&amp;lt;application2&amp;gt;\w+)"
|rex field=_raw "LLA:\s+\[?&amp;lt;dip&amp;gt;[^\]]+)."
|dedup dip
|chart over application2&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;i want output as shown below: HOW TO GET THIS??&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;application1&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;count&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;application2&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;count&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;L1&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;10&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;L1&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;15&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;M2&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;20&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;M2&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="24px"&gt;L3&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;45&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;L3&lt;/TD&gt;
&lt;TD width="25%" height="24px"&gt;100&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Tue, 25 Jul 2023 18:37:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-over-multiple-fields/m-p/651957#M225356</guid>
      <dc:creator>mahesh27</dc:creator>
      <dc:date>2023-07-25T18:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: chart over multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-over-multiple-fields/m-p/651959#M225357</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/249143"&gt;@mahesh27&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;have application1 and application2 the same values? and you want the count of each value in application1 and application2?&lt;/P&gt;&lt;P&gt;if yes, you could try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abd   ("start app"  AND  "app listed") OR (("POST /ui/logs" OR  "POST /ui/data" OR "POST /ui/vi/reg") "state: complete")
| rex field=_raw "APP:\s+(&amp;lt;application&amp;gt;\S+)"
| rex field=_raw "LLA:\s+\[?&amp;lt;dip&amp;gt;[^\]]+)."
| eval app=if(searchmatch("state: complete"),"application2","application1"
| chart 
   count(eval(app="application1")) AS application1
   count(eval(app="application2")) AS application2
   BY application&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 18:01:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-over-multiple-fields/m-p/651959#M225357</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-07-25T18:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: chart over multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-over-multiple-fields/m-p/651968#M225360</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;, application 1 and application 2 has same application names but different counts, so i want to get the application names and count separately for each application.&lt;BR /&gt;&lt;BR /&gt;i tried the query which you provided i am not getting any results.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 18:17:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-over-multiple-fields/m-p/651968#M225360</guid>
      <dc:creator>mahesh27</dc:creator>
      <dc:date>2023-07-25T18:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: chart over multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-over-multiple-fields/m-p/651989#M225370</link>
      <description>&lt;P&gt;Have you accounted for some syntax errors? &amp;nbsp;A valid search would look like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abd  ( ("start app"  AND  "app listed") OR ("POST /ui/logs" OR  "POST /ui/data" OR "POST /ui/vi/reg") AND "state: complete")
| rex field=_raw "APP:\s+(?&amp;lt;application&amp;gt;\S+)"
| rex field=_raw "LLA:\s+\[(?&amp;lt;dip&amp;gt;[^\]]+)."
| dedup dip
| eval app=if(searchmatch("state: complete"),"application2","application1")
| chart 
   count(eval(app="application1")) AS application1
   count(eval(app="application2")) AS application2
   BY application&lt;/LI-CODE&gt;&lt;P&gt;If there is no output, it simply means that&amp;nbsp;&lt;FONT face="courier new,courier"&gt;| rex field=_raw "APP:\s+(?&amp;lt;application&amp;gt;\S+)"&lt;/FONT&gt;&amp;nbsp;(which &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;copied from your sample code) extracts nothing. &amp;nbsp;You need to examine your raw data and find out what is the correct regex. &amp;nbsp;Alternatively, you will need to post data samples to get help on regex.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 23:28:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-over-multiple-fields/m-p/651989#M225370</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-07-25T23:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: chart over multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-over-multiple-fields/m-p/652089#M225393</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/249143"&gt;@mahesh27&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with my solution, you have a different count for application1 and application2.&lt;/P&gt;&lt;P&gt;the issue should be on the regexes, could you share some samples from application1 and application2?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 15:40:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-over-multiple-fields/m-p/652089#M225393</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-07-26T15:40:09Z</dc:date>
    </item>
  </channel>
</rss>

