Getting Data In

HEC (HTTP Event Collector) host rename using props transforms - ansible tower

merrelr
Path Finder

I've setup HEC on a heavy forwarder to gather logs through HEC for Ansible Tower.

Logs are rolling in, but I can't seem to get props/transforms setup correctly to rename the hostname from IP to text.

props.conf

[host::$ipaddress]  
TRANSFORMS-$hostname_rename = host_rename_$hostname

transforms.conf

[host_rename_$hostname]
REGEX = (.*)
DEST_KEY = MetaData:Host
FORMAT = host::$hostname

I've applied these setting to both the HF and to my Indexer cluster and neither place renames the hostname from IP address to text.

Is there something special with HEC or HF that's preventing these changes from taking place?

0 Karma

darrenfuller
Contributor

HI Merreir,

Which endpoint are you using to connect to your HEC? /services/collector or /services/collector/event or /services/collector/raw ?

Only data going through /services/collector/event will get affected by props / transforms.

Hope this helps...
./D

0 Karma

harsmarvania57
Ultra Champion

Not /services/collector/event endpoint, if you want to parse data using props/transforms then you need to use /services/collector/raw endpoint.

0 Karma

merrelr
Path Finder

I'll give that a try and see if I can get it to work that way.

0 Karma

merrelr
Path Finder

I had to update the props to use 127.0.0.1 instead of it's actual IP. I'm not sure what changed since yesterday with my testing.

I left the endpoint as /services/collector/event and my props/transforms are working.

props.conf

[host::127.0.0.1]
TRANSFORMS-$hostname_rename = host_rename_$hostname

transforms.conf

[host_rename_$hostname]
REGEX = (.*)
DEST_KEY = MetaData:Host
FORMAT = host::$hostname

0 Karma

merrelr
Path Finder

I'm using the "/services/collector/event" endpoint.

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...