Hello, I'm wondering if running Telegraf as root by default is really appropriate ? I understand that it could cause a lot of permission "issues" to read certains metrics, but still, running arbitrary scripts as root through the exec plugin for instance looks scary to me .. I'm wondering if it would it be possible to add the creation of a dedicated user in the ports, and a telegraf_user="telegraf" in the rc.d script ? Thanks!
It might work to run it as `nobody`. I need to check. It shouldn't really need a special user, but as you say, that depends on what metrics you read from the system. Barring that is doesn't work, I'm inclined to add an option telegraf_user and default to nobody.
(In reply to Palle Girgensohn from comment #1) Thank you for your quick reply. Adding a special (dedicated) user would be easier for usage with sudo (as suggested by many plugins, see https://github.com/influxdata/telegraf/tree/master/plugins/inputs/pf for example)
(In reply to Julien Cigar from comment #2) Ah, of course. I see. I haven't used any of the modules suggesting sudo... I'll look into it.