<?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 override at search time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Host-override-at-search-time/m-p/189932#M54698</link>
    <description>&lt;P&gt;Does this work?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-field = (?P&amp;lt;otherField&amp;gt;my_regex)
EVAL-host = otherField
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 15 Feb 2017 15:51:44 GMT</pubDate>
    <dc:creator>jkat54</dc:creator>
    <dc:date>2017-02-15T15:51:44Z</dc:date>
    <item>
      <title>Host override at search time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-override-at-search-time/m-p/189926#M54692</link>
      <description>&lt;P&gt;I want to override the Host value at search time, not at index time because I need to override it just in the context of a specific app.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-field = (?P&amp;lt;host&amp;gt;my_regex)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It does not work. Why?&lt;BR /&gt;
Is there another way to do this?&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2015 12:38:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-override-at-search-time/m-p/189926#M54692</guid>
      <dc:creator>giorgio_adami_m</dc:creator>
      <dc:date>2015-05-18T12:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Host override at search time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-override-at-search-time/m-p/189927#M54693</link>
      <description>&lt;P&gt;make sure u search within the context of the app&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2015 13:36:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-override-at-search-time/m-p/189927#M54693</guid>
      <dc:creator>kheli</dc:creator>
      <dc:date>2015-05-18T13:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Host override at search time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-override-at-search-time/m-p/189928#M54694</link>
      <description>&lt;P&gt;I am damn sure.&lt;BR /&gt;
The problem is the name "host". If I try to give another name to my field, the EXTRACT works, but I need to override "host".&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2015 13:38:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-override-at-search-time/m-p/189928#M54694</guid>
      <dc:creator>giorgio_adami_m</dc:creator>
      <dc:date>2015-05-18T13:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Host override at search time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-override-at-search-time/m-p/189929#M54695</link>
      <description>&lt;P&gt;I don't think this is possible. I was trying to do the same thing. &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.3/Data/Overridedefaulthostassignments"&gt;Here&lt;/A&gt; are instructions for overriding the host value. Note, however, that the doc for &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Transformsconf"&gt;transforms.conf&lt;/A&gt; indicates that the &lt;CODE&gt;DEST_KEY&lt;/CODE&gt; attribute is only valid for index-time operations. Also, the &lt;CODE&gt;TRANSFORMS&lt;/CODE&gt; attribute in &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Propsconf"&gt;props.conf&lt;/A&gt; is only valid at index-time as well.&lt;/P&gt;

&lt;P&gt;Given this, I plan on re-importing my data.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2015 17:54:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-override-at-search-time/m-p/189929#M54695</guid>
      <dc:creator>bnorthway</dc:creator>
      <dc:date>2015-06-15T17:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Host override at search time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-override-at-search-time/m-p/189930#M54696</link>
      <description>&lt;P&gt;I was able to do it in SPL for a top event (replacing the hostname with the extracted user name). Perhaps you could make a macro for ease of implementation?&lt;/P&gt;

&lt;P&gt;Here's the sample event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;20861  root              20     0  130284    1956    1192   R    11.8     0.0       0:00.03  top
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here's the query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=os sourcetype=top| rex field=_raw "^\s+\d+\s+(?P&amp;lt;host&amp;gt;\w+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Jun 2015 18:11:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-override-at-search-time/m-p/189930#M54696</guid>
      <dc:creator>mkemmerer</dc:creator>
      <dc:date>2015-06-15T18:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Host override at search time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-override-at-search-time/m-p/189931#M54697</link>
      <description>&lt;P&gt;I had an another approach which is a bit hacky but seems to work so far:&lt;BR /&gt;
Extracting the host with extract or report in a new field called host_temp (i used report and transforms) &lt;BR /&gt;
Created an alias for host_temp to host&lt;/P&gt;

&lt;P&gt;Thats it, don't ask me how stable that solution is.&lt;BR /&gt;
Cheers &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:53:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-override-at-search-time/m-p/189931#M54697</guid>
      <dc:creator>claudio_manig</dc:creator>
      <dc:date>2020-09-29T12:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Host override at search time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Host-override-at-search-time/m-p/189932#M54698</link>
      <description>&lt;P&gt;Does this work?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-field = (?P&amp;lt;otherField&amp;gt;my_regex)
EVAL-host = otherField
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Feb 2017 15:51:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Host-override-at-search-time/m-p/189932#M54698</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-02-15T15:51:44Z</dc:date>
    </item>
  </channel>
</rss>

