Skip to content

Better Native Support for Handling IPv6 IP's via Variable Expansion. #3232

@BenB196

Description

@BenB196

Describe the enhancement:

(Note: This enhancement might be more of an upstream Beats project, but I'm opening it here as I'm not 100% sure).

Elastic Agent should natively be able to tell when it has been given an IPv6 address with a port and automatically wrap it in brackets ([]).

Describe a specific use case for the enhancement or feature:

Suppose I have an Elastic Agent policy that has an integration which targets a host endpoint. I would like to deploy this Elastic Agent policy in 2 environments, one that is IPv4 and one that is IPv6. I use a variable to determine the host value, something like: https://${kubernetes.pod.ip}:443

The issue is that while this host value will work with an IPv4 address, this integration will not work in the IPv6 environment, as the Elastic Agent doesn't properly wrap ${kubernetes.pod.ip} when it encounters it.

This requires me to maintain 2 policies, one that sets host to https://${kubernetes.pod.ip}:443 (for IPv4) and another that sets host to https://[${kubernetes.pod.ip}]:443 (for IPv6).

By Elastic Agent being able to natively tell between an IPv4 & IPv6, I would not need to maintain 2 different policies.

This use case is important as IPv6 receives wider adoption, but IPv4 still needs to be maintained in other areas.

What is the definition of done?

Setting host to https://${kubernetes.pod.ip}:443 would work in either an IPv4 or IPv6 environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions