Telegraf ping CAP_NET_RAW on MacOS

[[inputs.ping]]
  urls = ["8.8.8.8"]
  method = "native"
$ telegraf --test:
ping,host=myhostname.lan,url=8.8.8.8 result_code=2i 1698756912000000000
2023-10-31T12:55:12Z E! [telegraf] Error running agent: input plugins recorded 1 errors

When using method = “native”, you will need permissions similar to the executable ping program for your OS

On MacOS, with Telegraf installed via brew install telegraf, How do I enable the brew service to perform pings?

Seems like it needs to be run as root.

Ref:

https://github.com/Homebrew/homebrew-core/blob/1dc13937af3f069824f5f95a257d4306293a9b15/Formula/t/trippy.rb#L29-L30

So weird :confused: As a regular user, I can ping. Telegraf’s exec method can ping. Telegraf’s ‘native’ ping method only works as root? Oof.