librenms / librenms-agent

LibreNMS Agent & Scripts
GNU General Public License v2.0
118 stars 188 forks source link

raspberry.sh not working anymore #312

Closed mzac closed 4 years ago

mzac commented 4 years ago

I updated a few of my raspberry pi's to the latest commit and since commit dc9695641b0e2b9ff160bf3b4d6916896e704c91 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
karlshea commented 4 years ago

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 4 years ago

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
karlshea commented 4 years ago

That fixed it for me too, thanks!