<?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 Regex Hostname for multiple scenario in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-Hostname-for-multiple-scenario/m-p/669772#M229656</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have log which the field name is called "name". The regex cannot get the hostname from the name field because have multiple scenario. Eg as below:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(DR) &lt;FONT color="#FF0000"&gt;HostA&lt;/FONT&gt;-AIX-172.0.0.0-root&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;01-HostA-10&lt;/FONT&gt;-Cambodia-Cisco_Router-10.0.0.0-root1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;172.0.0.0-Malaysia-Windows Server 2016-&lt;FONT color="#FF0000"&gt;HostA&lt;/FONT&gt;-admin&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;172.0.0.0 - &lt;FONT color="#FF0000"&gt;HostA&lt;/FONT&gt;-Indonesia-Win2012-172.0.0.0-admin&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3D-(DR) &lt;FONT color="#FF0000"&gt;HostA&lt;/FONT&gt;-Win2003-172.0.0.0 [NAT IP 192.0.0.0] (dmin)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AD-&lt;FONT color="#FF0000"&gt;HostA&lt;/FONT&gt;.local-srv_AB_CDD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;HostA&lt;/FONT&gt;-India-Solaris10-172.0.0.0-root&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;These are the sample inconsistent log that we need to get Hostname. The highlighted one should we get for the hostname.&lt;/P&gt;&lt;P&gt;Please assist on this by creating new regex&lt;/P&gt;</description>
    <pubDate>Mon, 27 Nov 2023 03:34:40 GMT</pubDate>
    <dc:creator>Akmal57</dc:creator>
    <dc:date>2023-11-27T03:34:40Z</dc:date>
    <item>
      <title>Regex Hostname for multiple scenario</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Hostname-for-multiple-scenario/m-p/669772#M229656</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have log which the field name is called "name". The regex cannot get the hostname from the name field because have multiple scenario. Eg as below:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(DR) &lt;FONT color="#FF0000"&gt;HostA&lt;/FONT&gt;-AIX-172.0.0.0-root&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;01-HostA-10&lt;/FONT&gt;-Cambodia-Cisco_Router-10.0.0.0-root1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;172.0.0.0-Malaysia-Windows Server 2016-&lt;FONT color="#FF0000"&gt;HostA&lt;/FONT&gt;-admin&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;172.0.0.0 - &lt;FONT color="#FF0000"&gt;HostA&lt;/FONT&gt;-Indonesia-Win2012-172.0.0.0-admin&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3D-(DR) &lt;FONT color="#FF0000"&gt;HostA&lt;/FONT&gt;-Win2003-172.0.0.0 [NAT IP 192.0.0.0] (dmin)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AD-&lt;FONT color="#FF0000"&gt;HostA&lt;/FONT&gt;.local-srv_AB_CDD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;HostA&lt;/FONT&gt;-India-Solaris10-172.0.0.0-root&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;These are the sample inconsistent log that we need to get Hostname. The highlighted one should we get for the hostname.&lt;/P&gt;&lt;P&gt;Please assist on this by creating new regex&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 03:34:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Hostname-for-multiple-scenario/m-p/669772#M229656</guid>
      <dc:creator>Akmal57</dc:creator>
      <dc:date>2023-11-27T03:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Hostname for multiple scenario</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Hostname-for-multiple-scenario/m-p/669777#M229657</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Have you any document which describes your naming policy? Or should we just guess which part are standard like&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;(DR)&lt;/LI&gt;&lt;LI&gt;Country-Cisco_Router-&amp;lt;IP&amp;gt;-&amp;lt;content&amp;gt;&lt;/LI&gt;&lt;LI&gt;&amp;lt;IP&amp;gt;-Country-Server type-&amp;lt;host&amp;gt;-&amp;lt;user&amp;gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 07:10:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Hostname-for-multiple-scenario/m-p/669777#M229657</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2023-11-27T07:10:12Z</dc:date>
    </item>
  </channel>
</rss>

