<?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 How to change the target index for logs from certain servers with a Windows universal forwarder, but keep the correct sourcetype? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-target-index-for-logs-from-certain-servers/m-p/230785#M44932</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have one Splunk Enterprise server and a number of Windows servers with the Universal forwarder installed and configured to send logs to the server (indexer).&lt;/P&gt;

&lt;P&gt;The logs all arrive and get tagged with the index 'wineventlog' and an appropriate sourcetype, 'WinEventLog:Security' or 'WinEventLog:System' etc. - All good stuff.&lt;/P&gt;

&lt;P&gt;However, I'd like to change the index for certain servers (as I have done for various switches etc.). I have tried this using props.conf and transforms.conf with rules like this:&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[host::WINSERVER01]
TRANSFORMS-winevent_dmz = set_index_winevent_dmz
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[set_index_winevent_dmz]
DEST_KEY = _MetaData:Index
FORMAT = winevent_dmz
REGEX = .
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But when I do this, although the index does change, the appropriate sourcetype stops being applied and the logs all get assigned a 'splunkd' sourcetype.&lt;/P&gt;

&lt;P&gt;Can anyone explain why this happens and let me know the correct way to change the index of logs coming from the Forwarder, but keep the correct sourcetype?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 18 Sep 2015 11:25:57 GMT</pubDate>
    <dc:creator>feisar</dc:creator>
    <dc:date>2015-09-18T11:25:57Z</dc:date>
    <item>
      <title>How to change the target index for logs from certain servers with a Windows universal forwarder, but keep the correct sourcetype?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-target-index-for-logs-from-certain-servers/m-p/230785#M44932</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have one Splunk Enterprise server and a number of Windows servers with the Universal forwarder installed and configured to send logs to the server (indexer).&lt;/P&gt;

&lt;P&gt;The logs all arrive and get tagged with the index 'wineventlog' and an appropriate sourcetype, 'WinEventLog:Security' or 'WinEventLog:System' etc. - All good stuff.&lt;/P&gt;

&lt;P&gt;However, I'd like to change the index for certain servers (as I have done for various switches etc.). I have tried this using props.conf and transforms.conf with rules like this:&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[host::WINSERVER01]
TRANSFORMS-winevent_dmz = set_index_winevent_dmz
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[set_index_winevent_dmz]
DEST_KEY = _MetaData:Index
FORMAT = winevent_dmz
REGEX = .
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But when I do this, although the index does change, the appropriate sourcetype stops being applied and the logs all get assigned a 'splunkd' sourcetype.&lt;/P&gt;

&lt;P&gt;Can anyone explain why this happens and let me know the correct way to change the index of logs coming from the Forwarder, but keep the correct sourcetype?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2015 11:25:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-target-index-for-logs-from-certain-servers/m-p/230785#M44932</guid>
      <dc:creator>feisar</dc:creator>
      <dc:date>2015-09-18T11:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the target index for logs from certain servers with a Windows universal forwarder, but keep the correct sourcetype?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-target-index-for-logs-from-certain-servers/m-p/230786#M44933</link>
      <description>&lt;P&gt;I don't know why it is happening but you can add a &lt;CODE&gt;sourcetype=&lt;/CODE&gt; directive to your &lt;CODE&gt;props.conf&lt;/CODE&gt; stanza to force it back.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2015 13:35:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-target-index-for-logs-from-certain-servers/m-p/230786#M44933</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-09-18T13:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the target index for logs from certain servers with a Windows universal forwarder, but keep the correct sourcetype?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-target-index-for-logs-from-certain-servers/m-p/230787#M44934</link>
      <description>&lt;P&gt;Look like you are applying that change to all data coming from that host.  That includes splunk's internal log files.  Are you sure that you're not just accidentally sending the _internal data to the winevent_dmz index now?  Maybe along with the eventlog data?  That would explain the splunkd sourcetype.&lt;/P&gt;

&lt;P&gt;Also, it might be easier to just do this from the frowarder on winserver01 in the inputs.conf.  Just update the index there.  If you have windows app installed, just be sure to make your changes in the local directory instead of default.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:18:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-target-index-for-logs-from-certain-servers/m-p/230787#M44934</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2020-09-29T07:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the target index for logs from certain servers with a Windows universal forwarder, but keep the correct sourcetype?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-target-index-for-logs-from-certain-servers/m-p/230788#M44935</link>
      <description>&lt;P&gt;I agree with @maciep , if you still want to move to other index at the index time, please check if you can do it by using sourcetype &lt;BR /&gt;
For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;props.conf

[WinEventLog:Security]
TRANSFORMS-winevent_dmz = set_index_winevent_dmz

transforms.conf

[set_index_winevent_dmz]
SOURCE_KEY = MetaData:Host
REGEX = (WINSERVER01|WINSERVER02|WINSERVER03....)
DEST_KEY = _Metadata:Index
FORMAT = winevent_dmz
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Sep 2019 07:31:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-target-index-for-logs-from-certain-servers/m-p/230788#M44935</guid>
      <dc:creator>sanjeev543</dc:creator>
      <dc:date>2019-09-11T07:31:12Z</dc:date>
    </item>
  </channel>
</rss>

