<?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: How to rename host field value based on event data? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-rename-host-field-value-based-on-event-data/m-p/363912#M66274</link>
    <description>&lt;P&gt;I deployed the props.conf and transforms.conf to the indexer cluster and the host changed but it seems to just use $1 instead of the regex value.&lt;/P&gt;</description>
    <pubDate>Thu, 04 May 2017 19:41:52 GMT</pubDate>
    <dc:creator>Kieffer87</dc:creator>
    <dc:date>2017-05-04T19:41:52Z</dc:date>
    <item>
      <title>How to rename host field value based on event data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-rename-host-field-value-based-on-event-data/m-p/363910#M66272</link>
      <description>&lt;P&gt;I have a Linux server that ingests pre-cooked log files. Each line of the log file begins with the host that the log originated from. I have a universal forwarder on a Linux server watching for log files and I would like to rename the host field from the linux server to use the server in the event line.&lt;/P&gt;

&lt;P&gt;On the universal forwarder I added the following but host is still ldxx90vds19. What am I missing here? I'm in a distributed environment, tried adding the same to the search heads with no luck.&lt;/P&gt;

&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[batch:///app1/vdsext/elk/stats/prod/pull/serverStats.*.csv.*]
source = ldxx90vds19
sourcetype = vds:serverstats
disabled = false
index = vds
move_policy = sinkhole
initCrcLength = 1000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[vds:serverstats]
TRANSFORMS-hostname = vdshostname
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[vdshostname]
REGEX = ^[a-z]\w+
FORMAT = host::$1
DEST_KEY = MetaData:Host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sample log:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ldxx90vds2,1493923501.828,0.685,0.652,97.793,0.802,0.0,0.067,0.050,0.060,0.030,11538391040.0,410136576.0,6964232192.0,6279286784.0,1276254.500,22937.400,0.0,39.300,0.0,1823129.600
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 May 2017 18:58:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-rename-host-field-value-based-on-event-data/m-p/363910#M66272</guid>
      <dc:creator>Kieffer87</dc:creator>
      <dc:date>2017-05-04T18:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename host field value based on event data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-rename-host-field-value-based-on-event-data/m-p/363911#M66273</link>
      <description>&lt;P&gt;The universal forwarder doesn't do parsing of data so your props.conf and transforms.conf entries are ineffective there. Those should be kept in next Full Splunk instance, either heavy forwarder or indexer, to which your UF is sending data. A restart of Splunk would be required.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 19:22:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-rename-host-field-value-based-on-event-data/m-p/363911#M66273</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-05-04T19:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename host field value based on event data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-rename-host-field-value-based-on-event-data/m-p/363912#M66274</link>
      <description>&lt;P&gt;I deployed the props.conf and transforms.conf to the indexer cluster and the host changed but it seems to just use $1 instead of the regex value.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 19:41:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-rename-host-field-value-based-on-event-data/m-p/363912#M66274</guid>
      <dc:creator>Kieffer87</dc:creator>
      <dc:date>2017-05-04T19:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename host field value based on event data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-rename-host-field-value-based-on-event-data/m-p/363913#M66275</link>
      <description>&lt;P&gt;Change the &lt;CODE&gt;REGEX = ^[a-z]\w+&lt;/CODE&gt; with  &lt;CODE&gt;REGEX = ^([a-z]\w+)&lt;/CODE&gt;. You need to enclose the value in brackets to be recognized as $1 (first enclosed value in regex)&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 19:48:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-rename-host-field-value-based-on-event-data/m-p/363913#M66275</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-05-04T19:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename host field value based on event data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-rename-host-field-value-based-on-event-data/m-p/363914#M66276</link>
      <description>&lt;P&gt;That did the trick, thank you for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 20:36:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-rename-host-field-value-based-on-event-data/m-p/363914#M66276</guid>
      <dc:creator>Kieffer87</dc:creator>
      <dc:date>2017-05-04T20:36:50Z</dc:date>
    </item>
  </channel>
</rss>

