Getting Data In

Use hostname variables in index_time EVAL

season88481
Contributor

Hi everyone,

I am trying to add a custom field on every events that coming from a Heavy-Forwarder, so that from search I can know which HF the evnets are going thru.

Here is my configuration in a HF:
props.conf:

[default]
TRANSFORMS-addHF = addHF

transforms.conf:

[addHF]
INGEST_EVAL = hf="my-hf-01"

fields.conf:

[hf]
INDEXED=true

So instead of hardcoding the hostname for every HF, I am trying to find a way to use an OS variable such as hostname in the INGEST_EVAL.

Any idea how to achieve this?

Many thanks.
S

Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...