Getting Data In

True-Client-IP=[12.34.56.78]

daniel333
Builder

All,

I have some header information coming through like so
True-Client-IP=[12.34.56.78]

I'd like to correct the data as it's ingested to be
True-Client-IP=12.34.56.78

Dropping the "[]" from around the IP address. Not sure where to start. I feel like I should be able to use SEDCMD inside props.conf but I am not sure how that would look.

0 Karma

jhall0007
Path Finder

This is old post, but one suggestion would be to create a custom field in props

Search Head props.conf:
[]
EXTRACT-true_ip = True-Client-IP=[(?(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}))]

aakwah
Builder

Minor modification, Extract should be in capital letters,

EXTRACT-true_ip = True-Client-IP=[(?(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}))]
0 Karma

jhall0007
Path Finder

Thanks you.

0 Karma

somesoni2
SplunkTrust
SplunkTrust

Can you provide the complete event ? Just to ensure the SEDCMD for this doesn't affect any other portion of the data.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...