<?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: Extracting host from host segment doesn't work in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extracting-host-from-host-segment-doesn-t-work/m-p/358928#M106086</link>
    <description>&lt;P&gt;4th segment&lt;/P&gt;</description>
    <pubDate>Tue, 02 May 2017 17:23:18 GMT</pubDate>
    <dc:creator>mmohiuddin1512</dc:creator>
    <dc:date>2017-05-02T17:23:18Z</dc:date>
    <item>
      <title>Extracting host from host segment doesn't work</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-host-from-host-segment-doesn-t-work/m-p/358925#M106083</link>
      <description>&lt;P&gt;Hi :&lt;/P&gt;

&lt;P&gt;I have a monitoring stanza which splunk process is monitoring logs from:&lt;/P&gt;

&lt;P&gt;/var/log/hosts//Tue/-2017050209&lt;/P&gt;

&lt;P&gt;This is what I have defined in inputs.conf:&lt;/P&gt;

&lt;P&gt;[monitor:///var/log/hosts/56.*/.../(\d+).(\d+).(\d+).(\d+)-(\d+)]&lt;BR /&gt;
host_segment = 4&lt;BR /&gt;
sourcetype = syslog&lt;BR /&gt;
index = networkperimeter_firewalls&lt;BR /&gt;
source = ASA-casyslog1_server&lt;BR /&gt;
blacklist = .(gz|bz2|z|zip)$&lt;BR /&gt;
ignoreOlderThan = 1d&lt;BR /&gt;
crcSalt = &lt;/P&gt;

&lt;P&gt;But while checking the logs on Splunk Search Head, the host value shows the host where the UF is installed, it is not monitoring the host from host_segment value, is there something I am missing, or doing incorrect.&lt;/P&gt;

&lt;P&gt;Your inputs are highly appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:54:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-host-from-host-segment-doesn-t-work/m-p/358925#M106083</guid>
      <dc:creator>mmohiuddin1512</dc:creator>
      <dc:date>2020-09-29T13:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting host from host segment doesn't work</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-host-from-host-segment-doesn-t-work/m-p/358926#M106084</link>
      <description>&lt;P&gt;It should work. This will only update the host for events coming from this monitor stanza, unless some setting is overriding it again at heavy forwarder/indexer level.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 16:48:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-host-from-host-segment-doesn-t-work/m-p/358926#M106084</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-05-02T16:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting host from host segment doesn't work</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-host-from-host-segment-doesn-t-work/m-p/358927#M106085</link>
      <description>&lt;P&gt;What part of that directory is the hostname?&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 16:58:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-host-from-host-segment-doesn-t-work/m-p/358927#M106085</guid>
      <dc:creator>xavierashe</dc:creator>
      <dc:date>2017-05-02T16:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting host from host segment doesn't work</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-host-from-host-segment-doesn-t-work/m-p/358928#M106086</link>
      <description>&lt;P&gt;4th segment&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 17:23:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-host-from-host-segment-doesn-t-work/m-p/358928#M106086</guid>
      <dc:creator>mmohiuddin1512</dc:creator>
      <dc:date>2017-05-02T17:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting host from host segment doesn't work</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-host-from-host-segment-doesn-t-work/m-p/358929#M106087</link>
      <description>&lt;P&gt;So did you delete the hostname?  So is it this? &lt;/P&gt;

&lt;P&gt;/var/log/hosts/HOSTNAME/Tue/-2017050209&lt;/P&gt;

&lt;P&gt;Have you tried this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/hosts/*/.../(\d+).(\d+).(\d+).(\d+)-(\d+)]
host_segment = 4
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 May 2017 17:45:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-host-from-host-segment-doesn-t-work/m-p/358929#M106087</guid>
      <dc:creator>xavierashe</dc:creator>
      <dc:date>2017-05-02T17:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting host from host segment doesn't work</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-host-from-host-segment-doesn-t-work/m-p/358930#M106088</link>
      <description>&lt;P&gt;I feel , the reason is because you have mentioned sourcetype as "syslog" and it will use the inbuilt  syslog-host transform&lt;BR /&gt;
Can you just try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/hosts/56.*/.../(\d+).(\d+).(\d+).(\d+)-(\d+)]
host_segment = 4
sourcetype = mydummy
index = networkperimeter_firewalls
source = ASA-casyslog1_server
blacklist = .(gz|bz2|z|zip)$
ignoreOlderThan = 1d
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if This is successful, we will then think of how to override the sourcetype to use host_segment &lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 09:40:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-host-from-host-segment-doesn-t-work/m-p/358930#M106088</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2017-05-03T09:40:25Z</dc:date>
    </item>
  </channel>
</rss>

