librenms/librenms-agent

When running as non-root, snmpd has issues with: bind, dhcp stats, mysql

Opened this issue · 2 comments

I use net-snmp on my hosts. I prefer to run things as non-root when I can. I recently switched all my snmpd instances to run as non-root (made easier by recent work on the package).

Since then, a few modules have ceased to work. I'm creating this ticket so we can keep track of progress.

So far, it's:

  • bind - invokes: system("echo $rndc stats | su -fm bind")
  • dhcp.py - solution: add snmpd user to dhcpd group so it can read /usr/local/etc/dhcpd.conf
  • mysql - no information yet

@dlangille You will run into issues with lots of extends as non-root. For non-root you'll need to run the extend using sudo.

@dlangille You will run into issues with lots of extends as non-root. For non-root you'll need to run the extend using sudo.

Is that as simple as changing this:

extend nginx /usr/local/etc/snmp/nginx-python3.py

to

extend nginx sudo /usr/local/etc/snmp/nginx-python3.py

If so, this is easier than I thought.

So far, it's only been some permissions, groups, etc.