librenms/librenms-agent

raspberry.sh not working anymore

mzac opened this issue · 3 comments

mzac commented

I updated a few of my raspberry pi's to the latest commit and since commit dc96956 I am getting errors with the raspberry.sh while using the snmp extend:

iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.1 = ""
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.2 = ""
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.3 = ""
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.4 = ""
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.5 = ""
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.6 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.7 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.8 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.9 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.10 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.11 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.12 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.13 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.14 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.15 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.16 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.17 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.18 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.19 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.20 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.21 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.22 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.23 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.24 = STRING: "VCHI initialization failed"
iso.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.25 = STRING: "VCHI initialization failed"

The script runs fine as root but does not work when running as the Debian-snmp user even if the sudoers file has the right settings:

Debian-snmp ALL=(ALL) NOPASSWD: /opt/librenms-agent/snmp/raspberry.sh, /usr/bin/vcgencmd

It's changed, your snmpd.conf has to now be extend raspberry sudo /etc/snmp/raspberry.sh or similar.

Even then it's still not actually populating graphs for me, but that's your first issue.

mzac commented

It's changed, your snmpd.conf has to now be extend raspberry sudo /etc/snmp/raspberry.sh or similar.

Even then it's still not actually populating graphs for me, but that's your first issue.

It looks like I had to use the path for sudo as just using sudo didn't work

extend raspberry /usr/bin/sudo /opt/librenms-agent/snmp/raspberry.sh

That fixed it for me too, thanks!