Skip to content

[inputs.ping] Add support for SOCK_DGRAM sockets #19079

@nagaflokhu

Description

@nagaflokhu

Use Case

The current native method uses raw ICMP sockets, which requires the user to be root or to have CAP_NET_RAW, which can be seen as a security risk. Adding support for ICMP over SOCK_DGRAM sockets resolves this.

Expected behavior

  • method = "native" + privileged = true (or unset) -> ping plugin does not work when non-root and no CAP_NET_RAW has been granted
  • method = "native" + privileged = false -> ping plugin works when non-root and without any capabilities, but requires user GID to fall in net.ipv4.ping_group_range

Actual behavior

method = "native" does not work on non-root no-capabilities environments

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestRequests for new plugin and for new features to existing plugins

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions