<?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: Regex refining in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743967#M241194</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273888"&gt;@Karthikeya&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "vs_name\":\"\w-(?&amp;lt;fqdn&amp;gt;.+)-\d+"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/TDLukW/1" target="_blank"&gt;https://regex101.com/r/TDLukW/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Thu, 10 Apr 2025 14:48:17 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2025-04-10T14:48:17Z</dc:date>
    <item>
      <title>Regex refining</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743939#M241182</link>
      <description>&lt;P&gt;Regex&lt;/P&gt;&lt;P&gt;Please tell me what will be the best and effective way to write regex here:&lt;/P&gt;&lt;P&gt;"vs_name":"v-juniper-uat.opco.sony-443",&lt;/P&gt;&lt;P&gt;Need to extract juniper-uat.opco.sony from every event as FQDN.&lt;/P&gt;&lt;P&gt;I am writing the below regex and it worked. Please tell me is this good or any suggestions you give for more reliable?&lt;/P&gt;&lt;P&gt;|rex "vs_name\"\:\"[^\/]\-(?&amp;lt;fqdn&amp;gt;[^\/]+)\-\d+\"\,"&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 11:56:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743939#M241182</guid>
      <dc:creator>Karthikeya</dc:creator>
      <dc:date>2025-04-10T11:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: Regex refining</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743943#M241183</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273888"&gt;@Karthikeya&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;if it's runs it's correct!&lt;/P&gt;&lt;P&gt;anyway I'd use this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "vs_name\"\:\"\w\-(?&amp;lt;fqdn&amp;gt;[^-]+)-\d+"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 12:18:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743943#M241183</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-04-10T12:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Regex refining</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743946#M241184</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273888"&gt;@Karthikeya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kiran_panchavat_0-1744288071294.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/38526iEA120A8A0CA5517D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kiran_panchavat_0-1744288071294.png" alt="kiran_panchavat_0-1744288071294.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kiran_panchavat_1-1744288102037.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/38527iB916B63CFB6ED30C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kiran_panchavat_1-1744288102037.png" alt="kiran_panchavat_1-1744288102037.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 12:29:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743946#M241184</guid>
      <dc:creator>kiran_panchavat</dc:creator>
      <dc:date>2025-04-10T12:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Regex refining</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743949#M241185</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;For some reason, the provided regex is not working. Can you please re check?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Karthikeya_0-1744288317890.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/38528i6E4936AAA3797816/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Karthikeya_0-1744288317890.png" alt="Karthikeya_0-1744288317890.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 12:32:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743949#M241185</guid>
      <dc:creator>Karthikeya</dc:creator>
      <dc:date>2025-04-10T12:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Regex refining</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743950#M241186</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264857"&gt;@kiran_panchavat&lt;/a&gt;&amp;nbsp;always v is not guaranteed before fqdn as per user&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 12:33:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743950#M241186</guid>
      <dc:creator>Karthikeya</dc:creator>
      <dc:date>2025-04-10T12:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Regex refining</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743952#M241187</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273888"&gt;@Karthikeya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if the "v-" prefix is &lt;STRONG&gt;not guaranteed&lt;/STRONG&gt;, then your regex needs to be updated&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kiran_panchavat_0-1744288510817.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/38529i89B9F488FFCA69B9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kiran_panchavat_0-1744288510817.png" alt="kiran_panchavat_0-1744288510817.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kiran_panchavat_0-1744288651716.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/38530iDFC6A23BE5B277E8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kiran_panchavat_0-1744288651716.png" alt="kiran_panchavat_0-1744288651716.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 12:37:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743952#M241187</guid>
      <dc:creator>kiran_panchavat</dc:creator>
      <dc:date>2025-04-10T12:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Regex refining</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743963#M241192</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273888"&gt;@Karthikeya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does the following work well for you? This allows v- to be optional:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="livehybrid_0-1744294479625.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/38531i7CAED643AEC65EDE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="livehybrid_0-1744294479625.png" alt="livehybrid_0-1744294479625.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|makeresults | eval _raw="\"vs_name\":\"v-juniper-uat.opco.sony-443\","
| append [|makeresults | eval _raw="\"vs_name\":\"juniper-uat.opco.sony-443\","]
| rex field=_raw "vs_name\"\s*:\s*\"(?:v-)?(?&amp;lt;fqdn&amp;gt;.+)-\d+"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Did this answer help you?&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;If so, please consider:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Adding karma to show it was useful&lt;/LI&gt;&lt;LI&gt;Marking it as the solution if it resolved your issue&lt;/LI&gt;&lt;LI&gt;Commenting if you need any clarification&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Your feedback encourages the volunteers in this community to continue contributing&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 14:14:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743963#M241192</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-04-10T14:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Regex refining</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743967#M241194</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273888"&gt;@Karthikeya&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "vs_name\":\"\w-(?&amp;lt;fqdn&amp;gt;.+)-\d+"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/TDLukW/1" target="_blank"&gt;https://regex101.com/r/TDLukW/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 14:48:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743967#M241194</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-04-10T14:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Regex refining</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743972#M241198</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;this is working. and how to make this extraction at index time I mean while indexing this field should be extracted? Please guide me.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 16:06:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743972#M241198</guid>
      <dc:creator>Karthikeya</dc:creator>
      <dc:date>2025-04-10T16:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Regex refining</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743980#M241200</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273888"&gt;@Karthikeya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apply the below configurations for the index time field extractions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kiran_panchavat_0-1744307883918.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/38532i83B438369FC85B4B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kiran_panchavat_0-1744307883918.png" alt="kiran_panchavat_0-1744307883918.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kiran_panchavat_1-1744307904610.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/38533iAAB557385CAE5167/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kiran_panchavat_1-1744307904610.png" alt="kiran_panchavat_1-1744307904610.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have uploaded the sample events to my lab environment and applied the above configurations. The fqdn field was successfully extracted. Please refer to the screenshot below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kiran_panchavat_2-1744307958030.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/38534i323026D31BA9400C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kiran_panchavat_2-1744307958030.png" alt="kiran_panchavat_2-1744307958030.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kiran_panchavat_3-1744308003738.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/38535iC7F89ACCB1A67E2B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kiran_panchavat_3-1744308003738.png" alt="kiran_panchavat_3-1744308003738.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample events:&lt;/P&gt;&lt;P&gt;{"timestamp":"2025-04-10T12:34:56Z", "vs_name":"v-juniper-uat.opco.sony-443", "status":"active"}&lt;BR /&gt;{"timestamp":"2025-04-10T12:35:01Z", "vs_name":"qa-nginx-dev.opco.abc-8443", "status":"active"}&lt;BR /&gt;{"timestamp":"2025-04-10T12:35:06Z", "vs_name":"prod-apache.opco.xyz-9443", "status":"inactive"}&lt;BR /&gt;{"timestamp":"2025-04-10T12:35:10Z", "vs_name":"test-web1.opco.something-8080", "status":"active"}&lt;BR /&gt;{"timestamp":"2025-04-10T12:35:15Z", "vs_name":"edge-juniper-uat.opco.sony-443", "status":"active"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you use heavy forwarders, the props.conf and transforms.conf changes should be applied to the heavy forwarders instead of the indexers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 18:19:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743980#M241200</guid>
      <dc:creator>kiran_panchavat</dc:creator>
      <dc:date>2025-04-10T18:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Regex refining</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743982#M241201</link>
      <description>&lt;P&gt;Don't use indexed extractions! Unless you have a very good reason for it (if you don't know what reason that would be you probably don't have one). Just define a proper search-time extracted field.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 18:31:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/743982#M241201</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-04-10T18:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Regex refining</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/744002#M241203</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/273888"&gt;@Karthikeya&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;are you sure that you want to apply this extraction at index time?&lt;/P&gt;&lt;P&gt;this means a greater job for indexers and this usually depends on the volume of indexed logs for extractions, how many logs must you index daily and in the peak period?&lt;/P&gt;&lt;P&gt;here, you can find a comparation between the two modes and a description:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.4.1/Indexer/Indextimeversussearchtime" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.4.1/Indexer/Indextimeversussearchtime&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 11 Apr 2025 06:02:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-refining/m-p/744002#M241203</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-04-11T06:02:43Z</dc:date>
    </item>
  </channel>
</rss>

