Install from source and run as non-root

You should be able to do this by giving the packetbeat binary CAP_NET_RAW capability.

$ sudo setcap cap_net_raw=ep /usr/bin/packetbeat

After that you can start packetbeat as any user. This will not work in a nosuid mount (e.g. Ubuntu home directory), but /usr/bin should be fine. I'm pretty sure systemd can set process capabilities too, and that might be the most acceptable solution for your sysadmins.

It doesn't matter under which account Apache, ES or Redis are running. Packetbeat sees all the network packets on the machine it runs on.

2 Likes