<?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 Why do some logs come into indexer with empty host field? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-some-logs-come-into-indexer-with-empty-host-field/m-p/644969#M109759</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;There are some logs that come to Indexer with empty host field (host= ). These logs come to main index and I would like them to come to another index. I have source and sourcetype. &amp;nbsp; I try to override index and route the logs to another index but it does not work. Here is my config. I would appreciate any help. Thx.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;props:&lt;/P&gt;
&lt;P&gt;[host:: ]&lt;BR /&gt;TRANSFORMS-myindex=override-index&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;transforms:&lt;/P&gt;
&lt;P&gt;[override-index]&lt;BR /&gt;REGEX = .&lt;BR /&gt;DEST_KEY = _MetaData:Index&lt;BR /&gt;FORMAT = myindex&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 May 2023 04:03:33 GMT</pubDate>
    <dc:creator>Adpafer</dc:creator>
    <dc:date>2023-05-30T04:03:33Z</dc:date>
    <item>
      <title>Why do some logs come into indexer with empty host field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-some-logs-come-into-indexer-with-empty-host-field/m-p/644969#M109759</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;There are some logs that come to Indexer with empty host field (host= ). These logs come to main index and I would like them to come to another index. I have source and sourcetype. &amp;nbsp; I try to override index and route the logs to another index but it does not work. Here is my config. I would appreciate any help. Thx.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;props:&lt;/P&gt;
&lt;P&gt;[host:: ]&lt;BR /&gt;TRANSFORMS-myindex=override-index&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;transforms:&lt;/P&gt;
&lt;P&gt;[override-index]&lt;BR /&gt;REGEX = .&lt;BR /&gt;DEST_KEY = _MetaData:Index&lt;BR /&gt;FORMAT = myindex&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 04:03:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-some-logs-come-into-indexer-with-empty-host-field/m-p/644969#M109759</guid>
      <dc:creator>Adpafer</dc:creator>
      <dc:date>2023-05-30T04:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: empty host field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-some-logs-come-into-indexer-with-empty-host-field/m-p/644970#M109760</link>
      <description>Hi&lt;BR /&gt;Any idea from where those are coming and why they didn't contain host value? Usually that should be there!&lt;BR /&gt;I try to figure out and fix this instead of trying send those to specific index with props and transforms.conf.&lt;BR /&gt;r. Ismo</description>
      <pubDate>Mon, 29 May 2023 18:18:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-some-logs-come-into-indexer-with-empty-host-field/m-p/644970#M109760</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2023-05-29T18:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Why do some logs come into indexer with empty host field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-some-logs-come-into-indexer-with-empty-host-field/m-p/644993#M109762</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250536"&gt;@Adpafer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;probably the issue is that in the regex of the override-index standa you have to put a regex that reads the value to assign to the host field, using "REGEX = ." you use a string not acceptable for the host index.&lt;/P&gt;&lt;P&gt;Probably in the first part of your logs, there's the hostname definition, you have to use that regex to assign a correct value to the host, e.g. having an event like the following&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2023-05-29 11:22:54 my_hostname 12345 ...&lt;/LI-CODE&gt;&lt;P&gt;you have to use a regex like the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;REGEX = ^\d\d\d\-\d\d-\d\d\s\d\d:\d\d:\d\d\s($1)
DEST_KEY = MetaData:Host
FORMAT = host::$1&lt;/LI-CODE&gt;&lt;P&gt;you can use the "REGEX = ." expression only if you want to assign a fixed value to the host field.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 06:41:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-some-logs-come-into-indexer-with-empty-host-field/m-p/644993#M109762</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-05-30T06:41:34Z</dc:date>
    </item>
  </channel>
</rss>

