<?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 extract field from source path? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-field-from-source-path/m-p/646576#M52838</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for your inputs.. The above queries helped me getting my expected field values.&lt;/P&gt;&lt;P&gt;Your kind help is highly appreciated.&lt;/P&gt;&lt;P&gt;Thank you very much..!!&lt;/P&gt;</description>
    <pubDate>Mon, 12 Jun 2023 07:39:48 GMT</pubDate>
    <dc:creator>Mrig342</dc:creator>
    <dc:date>2023-06-12T07:39:48Z</dc:date>
    <item>
      <title>How to extract field from source path?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-field-from-source-path/m-p/646404#M52815</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I want to extract few fields available in the source path. For e.g. the source path is:&lt;/P&gt;
&lt;TABLE width="197"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="197"&gt;/apps/stats/domain/miccep3_mic_ce_sit/4.1/tra/domain/miccep3_mic_ce_sit/application/logs/Host_MediationServices_STE4_0-1-HOST_MediationServices_4_Host_MediationServices_CSAWC.log&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here I want to capture below 3 details:&lt;/P&gt;
&lt;P&gt;1. From "/apps/stats/domain/miccep3_mic_ce_sit" part --- Need to capture "miccep3_mic_ce_sit" as "Domain_Name"&lt;/P&gt;
&lt;P&gt;2. Need to capture "/apps/stats/domain/miccep3_mic_ce_sit/4.1/tra/domain/miccep3_mic_ce_sit/application/" part of the source path as "Application_Path"&lt;/P&gt;
&lt;P&gt;3. After /logs directory in the path I want to capture the part "Host_MediationServices_STE4_0-1" as "Application_Name"&lt;/P&gt;
&lt;P&gt;Please help create a query to capture the above fields from the source path.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your kind help is highly appreciated.&lt;/P&gt;
&lt;P&gt;Thank You..!!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 12:36:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-field-from-source-path/m-p/646404#M52815</guid>
      <dc:creator>Mrig342</dc:creator>
      <dc:date>2023-06-09T12:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need to extract field from source path</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-field-from-source-path/m-p/646407#M52816</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230871"&gt;@Mrig342&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;answering to your questions:&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=source "^\/\w+\/\w+\/\w+\/(?&amp;lt;Domain_Name&amp;gt;\w+)&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/l7KjrG/1" target="_blank"&gt;https://regex101.com/r/l7KjrG/1&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=source "^(?&amp;lt;Application&amp;gt;.+application)\/"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/l7KjrG/2" target="_blank"&gt;https://regex101.com/r/l7KjrG/2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;3)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=source "^.*logs\/(?&amp;lt;Application_Name&amp;gt;.*)-HOST"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/l7KjrG/3" target="_blank"&gt;https://regex101.com/r/l7KjrG/3&lt;/A&gt;&lt;/P&gt;&lt;P&gt;this is the hardest because there are chars (like - that are special chars so I cannot take using \w, this regex runs if there's always the word "HOST" in your path.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 06:02:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-field-from-source-path/m-p/646407#M52816</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-06-09T06:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract field from source path?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-field-from-source-path/m-p/646576#M52838</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for your inputs.. The above queries helped me getting my expected field values.&lt;/P&gt;&lt;P&gt;Your kind help is highly appreciated.&lt;/P&gt;&lt;P&gt;Thank you very much..!!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 07:39:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-field-from-source-path/m-p/646576#M52838</guid>
      <dc:creator>Mrig342</dc:creator>
      <dc:date>2023-06-12T07:39:48Z</dc:date>
    </item>
  </channel>
</rss>

