<?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 do I individual count each of them in this path. I would like to spit them then count individually. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-individual-count-each-of-them-in-this-path/m-p/635196#M108698</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming the format of "path" including location of segments is static, you can extract each segment as separate field, like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your current search which fetch field path
| rex field=path "\/(?&amp;lt;env&amp;gt;[^\/]+)\/site\/(?&amp;lt;country&amp;gt;[^\/]+)\/(?&amp;lt;status&amp;gt;[^\/]+)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then run your aggregation per your requirement&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your current search which fetch field path
| rex field=path "\/(?&amp;lt;env&amp;gt;[^\/]+)\/site\/(?&amp;lt;country&amp;gt;[^\/]+)\/(?&amp;lt;status&amp;gt;[^\/]+)"
| stats count by env country status
| where country="usa" AND env="dev" AND status="active"
| sort 5 -count&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 20 Mar 2023 20:05:23 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2023-03-20T20:05:23Z</dc:date>
    <item>
      <title>How do I individual count each of them in this path?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-individual-count-each-of-them-in-this-path/m-p/635170#M108695</link>
      <description>&lt;P&gt;&lt;BR /&gt;So, I wanted to Split the path into multiple events so that i can count whatever i want to count like active or dev or usa or etc.&lt;BR /&gt;&lt;BR /&gt;We have few path i.e below&lt;BR /&gt;&lt;BR /&gt;path=/dev/site/usa/active&lt;/P&gt;
&lt;P&gt;path=/prod/site/usa/inactive&lt;/P&gt;
&lt;P&gt;path=/dev/site/Germany/cleaning&lt;/P&gt;
&lt;P&gt;path=/qa/site/Austria/maintenancemode&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So now i want to count each of active by usa, dev&lt;BR /&gt;then I want to get the top 5 counts of it.&lt;BR /&gt;&lt;BR /&gt;In the results i want to see the bar graph like&lt;BR /&gt;active&amp;nbsp;&lt;BR /&gt;cleaning&amp;nbsp;&lt;/P&gt;
&lt;P&gt;maintenancemode&lt;/P&gt;
&lt;P&gt;instead of whole path.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: I don't have backend access.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 22:02:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-individual-count-each-of-them-in-this-path/m-p/635170#M108695</guid>
      <dc:creator>thiruyadav17</dc:creator>
      <dc:date>2023-03-20T22:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I individual count each of them in this path. I would like to spit them then count individually.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-individual-count-each-of-them-in-this-path/m-p/635171#M108696</link>
      <description>&lt;LI-CODE lang="markup"&gt;| eval part=split(path,"/")
| stats count by part&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 20 Mar 2023 17:00:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-individual-count-each-of-them-in-this-path/m-p/635171#M108696</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-20T17:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I individual count each of them in this path. I would like to spit them then count individually.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-individual-count-each-of-them-in-this-path/m-p/635196#M108698</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming the format of "path" including location of segments is static, you can extract each segment as separate field, like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your current search which fetch field path
| rex field=path "\/(?&amp;lt;env&amp;gt;[^\/]+)\/site\/(?&amp;lt;country&amp;gt;[^\/]+)\/(?&amp;lt;status&amp;gt;[^\/]+)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then run your aggregation per your requirement&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your current search which fetch field path
| rex field=path "\/(?&amp;lt;env&amp;gt;[^\/]+)\/site\/(?&amp;lt;country&amp;gt;[^\/]+)\/(?&amp;lt;status&amp;gt;[^\/]+)"
| stats count by env country status
| where country="usa" AND env="dev" AND status="active"
| sort 5 -count&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 20 Mar 2023 20:05:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-individual-count-each-of-them-in-this-path/m-p/635196#M108698</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2023-03-20T20:05:23Z</dc:date>
    </item>
  </channel>
</rss>

