<?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: Host field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288719#M165797</link>
    <description>&lt;P&gt;"light forwarder" and "Universal forwarders" do not parse the events (except a few exceptions)&lt;BR /&gt;
so the props/transforms has to be setup on your indexers (or on your first heavy forwarders is any are chained)&lt;/P&gt;</description>
    <pubDate>Mon, 09 Oct 2017 17:08:41 GMT</pubDate>
    <dc:creator>yannK</dc:creator>
    <dc:date>2017-10-09T17:08:41Z</dc:date>
    <item>
      <title>Host field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288708#M165786</link>
      <description>&lt;P&gt;one of my data sources has host field in the raw packet. However when we search the events the host field is the name of the forwarder. Where do I rename that? I do use a transform, so can it be done there on ingestion?&lt;/P&gt;

&lt;P&gt;What would be the syntak? in the props.conf file? &lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 17:44:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288708#M165786</guid>
      <dc:creator>pfabrizi</dc:creator>
      <dc:date>2017-10-05T17:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Host field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288709#M165787</link>
      <description>&lt;P&gt;Can you please review &lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/Data/Overridedefaulthostassignments"&gt;this part of our documentation&lt;/A&gt; and let us know if you run into any trouble doing it like that?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 17:50:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288709#M165787</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2017-10-05T17:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Host field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288710#M165788</link>
      <description>&lt;P&gt;The words you were searching for are "override host" &lt;/P&gt;

&lt;P&gt;You will put code stanzas in props.conf and transforms.conf.&lt;/P&gt;

&lt;P&gt;Here's a pretty good answer... &lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/91933/can-you-override-host-for-an-input.html"&gt;https://answers.splunk.com/answers/91933/can-you-override-host-for-an-input.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;And for you it will look something like this...&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype_stanza_name]
TRANSFORMS-host_rename = host_rename_stanza
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[host_rename_stanza]
REGEX = some regex that finds the host=([^\s]+)\s
DEST_KEY = MetaData:Host
FORMAT = host::$1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Oct 2017 17:55:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288710#M165788</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-10-05T17:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Host field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288711#M165789</link>
      <description>&lt;P&gt;If the event does not have a host extraction, it will use the default host field in the forwarder inputs.conf.&lt;BR /&gt;
Do a  &lt;CODE&gt;./splunk btool inputs list --debug&lt;/CODE&gt;  on the forwarder to figure&lt;/P&gt;

&lt;P&gt;To change the host you can :&lt;BR /&gt;
- if all your events fro one input are from the same host,&lt;BR /&gt;
add on the inputs.conf, under the input stanza a setting host=myactualhostname&lt;BR /&gt;
-if your host has to be extracted from the event itself, then use a props/transforms rule on the indexers (or the first heavy forwarder if any)&lt;/P&gt;

&lt;P&gt;If you are in a syslog data situation, look at the default syslog sourcetypes, they try to do that at indextime.&lt;BR /&gt;
Look at the defaults [syslog] definitions in $SPLUNK_HOME/etc/system/default/props.conf and [syslog-host] in  $SPLUNK_HOME/etc/system/default/transforms.conf ) for examples.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:11:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288711#M165789</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2020-09-29T16:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Host field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288712#M165790</link>
      <description>&lt;P&gt;so the 'host' in the raw packet is not splunk forwarder or host of the device sending the event.   Here is an example:&lt;BR /&gt;
|host=teemfsw1.spt.com,&lt;/P&gt;

&lt;P&gt;this is the server and domain space of the offending event. &lt;/P&gt;

&lt;P&gt;I was converting it to shost using this: #EXTRACT-shost = CEF:\s+\d(?:|[^|]+){6}|+host=(?[a-zA-Z0-9.-_]+)&lt;/P&gt;

&lt;P&gt;But it sounds like host is a built in field for device sending to the indexer?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 19:27:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288712#M165790</guid>
      <dc:creator>pfabrizi</dc:creator>
      <dc:date>2017-10-05T19:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Host field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288713#M165791</link>
      <description>&lt;P&gt;I get this stanza error:&lt;BR /&gt;
Undocumented key used in transforms.conf; stanza='hostoverride' setting='DEST_KEY' key='MetData:Host'&lt;/P&gt;

&lt;P&gt;Here is my transforms:&lt;BR /&gt;
[hostoverride]&lt;BR /&gt;
DEST_KEY = MetData:Host&lt;BR /&gt;
REGEX = CEF:\s+\d(?:|[^|]+)(6)|+host=([a-zA-Z0-9.-_]+)&lt;BR /&gt;
FORMAT = host::$1&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:06:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288713#M165791</guid>
      <dc:creator>pfabrizi</dc:creator>
      <dc:date>2020-09-29T16:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Host field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288714#M165792</link>
      <description>&lt;P&gt;The required meta fields in splunk are :&lt;BR /&gt;
source, sourcetype, host (we could consider index and _time to also be always populated)&lt;/P&gt;

&lt;P&gt;If you want to use a field at search time for the "original offending host", maybe you could use a different name to distinguish is from the "event sender host" . &lt;BR /&gt;
example with : offender_host&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; EXTRACT-shost = CEF\:\s+\d(?:\|[^\|]+){6}\|+host=(?&amp;lt;offender_host&amp;gt;[a-zA-Z0-9.-_]+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Oct 2017 19:45:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288714#M165792</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2017-10-05T19:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Host field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288715#M165793</link>
      <description>&lt;P&gt;It's supposed to be MetaData::Host&lt;/P&gt;

&lt;P&gt;you are missing an 'a' and a ':'&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 19:46:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288715#M165793</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2017-10-05T19:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Host field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288716#M165794</link>
      <description>&lt;P&gt;I fixed the missing 'a'. I also checked my regex in regex101 and found that was not correct, I validated my regex finds the value. It is still not giving me host as I want it. &lt;BR /&gt;
2 questions:&lt;BR /&gt;
1. I do the transforms at the forwarder and not the indexer?&lt;BR /&gt;
2. I have 2 transforms. First is the host over ride and the second is to parse the event as it is a custom CEF formatted string. Below is my props.conf for this index.&lt;/P&gt;

&lt;P&gt;[netwitness]&lt;BR /&gt;
FIELDALIAS-severity_as_id = severity as severity_id&lt;BR /&gt;
FIELDALIAS-dst_as_dest = dst as dest&lt;BR /&gt;
EVAL-app = netwitness&lt;BR /&gt;
EXTRACT-subject = CEF:\s+\d(?:|[^|]+){4}|(?[^|]+)&lt;BR /&gt;
EXTRACT-shost = CEF:\s+\d(?:|[^|]+){6}|+host=(?[a-zA-Z0-9.-_]+)&lt;BR /&gt;
TRANSFORMS-ho=hostoverride&lt;BR /&gt;
TRANSFORMS = netwitness-extractions&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:06:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288716#M165794</guid>
      <dc:creator>pfabrizi</dc:creator>
      <dc:date>2020-09-29T16:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Host field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288717#M165795</link>
      <description>&lt;P&gt;props/transforms go where the parsing happens, i.e. the indexer. Unless you use a heavy forwarder, of course. But I am assuming you are collecting using a universal forwarder that sends directly to your indexer(s). If there is any intermediary forwarder in your forwarding chain that is a HEAVY forwarder, you need to put props/transforms there.&lt;/P&gt;

&lt;P&gt;Oh, and I just noticed your second TRANSFORMS is not valid. Should be something like TRANSFORMS-net or sumsuch.&lt;BR /&gt;
You can also write: &lt;CODE&gt;TRANSFORMS-ho=hostoverride, netwitness-extractions&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;What does your transforms.conf look like now? &lt;BR /&gt;
Can you share a sample event as well?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 20:36:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288717#M165795</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2017-10-06T20:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Host field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288718#M165796</link>
      <description>&lt;P&gt;I am using a light forwarder to send the log to the indexer, so I am guessing that is a intermediary?&lt;/P&gt;

&lt;P&gt;[hostoverride]&lt;BR /&gt;
REGEX = host=([a-zA-Z0-9.-_]+)&lt;BR /&gt;
DEST_KEY = MetaData:Host&lt;BR /&gt;
FORMAT = host::$1&lt;/P&gt;

&lt;P&gt;[netwitness-extractions]&lt;BR /&gt;
REGEX = CEF:\d+|([^|]&lt;EM&gt;)|([^|]&lt;/EM&gt;)|([^|]&lt;EM&gt;)|([^|]&lt;/EM&gt;)|([^|]&lt;EM&gt;)|([^|]&lt;/EM&gt;)|([^|]&lt;EM&gt;)|([^|]&lt;/EM&gt;)|([^|]&lt;EM&gt;)|([^|]&lt;/EM&gt;)|([^|]&lt;EM&gt;)|([^|]&lt;/EM&gt;)|([^|]&lt;EM&gt;)|([^|]&lt;/EM&gt;)|([^|]&lt;EM&gt;)|([^|]&lt;/EM&gt;)|([^|]&lt;EM&gt;)|([^|]&lt;/EM&gt;)|([^|]&lt;EM&gt;)|([^|]&lt;/EM&gt;)|([^|]&lt;EM&gt;)|([^|]&lt;/EM&gt;)|([^|]&lt;EM&gt;)|([^|]&lt;/EM&gt;)|([^|]&lt;EM&gt;)|([^|]&lt;/EM&gt;)|([^|]&lt;EM&gt;)|([^|]&lt;/EM&gt;)|([^|]&lt;EM&gt;)|([^|]&lt;/EM&gt;)|([^|]&lt;EM&gt;)|([^|]&lt;/EM&gt;)|&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;sample Event:&lt;/P&gt;

&lt;P&gt;CEF: 1|RSA|Netwitness|10.6|severity=2|Executables|sessionid=94463671599|host=support.content.office.microsoft.com,support.content.office.microsoft.com|src=10.51.0.139|spt=59014|dst=23.36.68.96|dport=80|fname=AF102430631.wat,AF102430631.wat|dorg=Akamai Technologies|client=Microsoft ULS 15.0,Microsoft ULS 15.0 (Windows NT 6.1; Microsoft ULS 15.0.4669)|extension=wat,wat|server=Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0|service=80|threat=|username=|content=application/octet-stream,application/octet-stream|action=get,GET|zone=internet,internet|analysis.service=http1.1 without accept header,http1.1 without referer header,ssl certificate self-signed|analysis.session=0,ratio low transmitted,watchlist port,first carve,long connection,session size 10-50k,first carve not dns|analysis.file=exe filetype,exe two sections,exe filetype but not exe extension,small executable extension mismatch,small executable|filetype=windows executable,x86 pe,windows dll,signed executable|office=|device.host=|ioc=|boc=|eoc=|icf.category=|&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 07:43:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288718#M165796</guid>
      <dc:creator>pfabrizi</dc:creator>
      <dc:date>2017-10-07T07:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Host field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288719#M165797</link>
      <description>&lt;P&gt;"light forwarder" and "Universal forwarders" do not parse the events (except a few exceptions)&lt;BR /&gt;
so the props/transforms has to be setup on your indexers (or on your first heavy forwarders is any are chained)&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 17:08:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288719#M165797</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2017-10-09T17:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Host field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288720#M165798</link>
      <description>&lt;P&gt;Thank You, That worked.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 17:30:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-field/m-p/288720#M165798</guid>
      <dc:creator>pfabrizi</dc:creator>
      <dc:date>2017-10-10T17:30:00Z</dc:date>
    </item>
  </channel>
</rss>

