Getting Data In

How to enable the forwarder to add another field (such as an alias of a host) during index time?

bhavesh91
New Member

Adding an index-time value on a forwarder to capture the hostnames as the host (custom name) is already added in inputs.conf/server.conf

How do we enable Splunk Forwarder to add another field such as the aliases of the host (in this case hostname) during the index-time so that we capture both the custom host and the actual hostname of the server in Splunk?

0 Karma

aaraneta_splunk
Splunk Employee
Splunk Employee

@bhavesh91 - Did one of the answers below help provide a solution your question? If yes, please click “Accept” below the best answer to resolve this post and upvote anything that was helpful. If no, please leave a comment with more feedback. Thanks.

0 Karma

woodcock
Esteemed Legend

First of all, you can only create an index-time field values from consecutive characters that already inside of the raw event. In the case of adding hostname for cases where the event only has the IP address, you are going to have to add the hostname value to the raw event. The most common and easiest way to do this is to send your events through a syslog service running a local Splunk Forwarder and to configure that service to do a reverse DNS lookup and add this to the events. There is plenty of documentation online describing how to do this, depending on which syslog server you use.

0 Karma

esix_splunk
Splunk Employee
Splunk Employee

What you want to look at is adding indexed fields at index time. Here is a document that outlines this :

https://docs.splunk.com/Documentation/Splunk/6.5.1/Data/Configureindex-timefieldextraction

Your aliases need to be in the data stream though. You can't do anytype of pre-indexing lookups or enrichment in the Splunk ingestion pipeline. So where are you getting the aliases is the big question here...

You also need to consider that adding fields at index time isn't always recommended as it can add more load to indexers. Use cases vary on this, so be aware of potential load this can add if you are doing this on thousands of hosts on already taxed indexers.

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...