Hello, this is probably simple, but I can’t get it to work. I just want to remove IPV6 encapsulation from the host field of events arriving at Cribl via syslog. So, existing host field is ::ffff:10.1.1.1, I want it to be just 10.1.1.1. For some reason I can’t get this to work, Splunk shows a null value for host when I try to EVAL, MASK, REGEX, etc. Anyone have a way to do this?
Page 1 / 1
Here is how I was able to do it. In my example, I have host set to your example above:

Then I use the Regex Extract
function to extract out the ipv4 address from host:
Regex is ^(?:[^\d]+)(?<host_regex>.+)$

Then I use an Eval
function to replace the host
value with the host_regex
value and then remove the host_regex
field.

Reply
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.