<?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: set host value based on event in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/set-host-value-based-on-event/m-p/28310#M4824</link>
    <description>&lt;P&gt;So I finally figured it out, the config that I tried were put on the universal forwarder and was not honored, when put on the indexer it was all good.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Apr 2012 13:41:31 GMT</pubDate>
    <dc:creator>tuxford</dc:creator>
    <dc:date>2012-04-17T13:41:31Z</dc:date>
    <item>
      <title>set host value based on event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/set-host-value-based-on-event/m-p/28309#M4823</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I'm trying to set host based on value in an event, but it uses the default value and I'm trying to figure out why that is. My config looks like this:&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[janus]
DEST_KEY=MetaData:Host
REGEX=((?&amp;lt;=\d\d:\d\d:\d\d\s)[\w-\.]+)
FORMAT=host::$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/var/log/syslog_vpn]
TRANSFORMS-janus=janus
SHOULD_LINEMERGE=false
sourcetype=vpn

[source::/var/log/syslog_info]
TRANSFORMS-janus=janus
SHOULD_LINEMERGE=false
sourcetype=ciscone
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/syslog_info]
index=test

[monitor:///var/log/syslog_vpn]
index=test
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I know my regex works since I've tested it with this rex in my search that replaces all the hostnames within the event to XXX: &lt;CODE&gt;rex mode=sed "s/((?&amp;lt;=\d\d:\d\d:\d\d\s)[\w-\.]+)/XXX/g"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2012 10:36:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/set-host-value-based-on-event/m-p/28309#M4823</guid>
      <dc:creator>tuxford</dc:creator>
      <dc:date>2012-04-17T10:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: set host value based on event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/set-host-value-based-on-event/m-p/28310#M4824</link>
      <description>&lt;P&gt;So I finally figured it out, the config that I tried were put on the universal forwarder and was not honored, when put on the indexer it was all good.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2012 13:41:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/set-host-value-based-on-event/m-p/28310#M4824</guid>
      <dc:creator>tuxford</dc:creator>
      <dc:date>2012-04-17T13:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: set host value based on event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/set-host-value-based-on-event/m-p/28311#M4825</link>
      <description>&lt;P&gt;Hi tuxford, without tweaking the UF ignores props.conf and transforms.conf. Good you figured it out &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2012 14:17:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/set-host-value-based-on-event/m-p/28311#M4825</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2012-04-17T14:17:26Z</dc:date>
    </item>
  </channel>
</rss>

