DHCP-stats not working

using SNMP Extend to call a python script, I can get the JSON output returned via an snmpwalk of the specific extend, however the values are never input into LibreNMS and as such the charts remain empty.

from LibreNMS
sudo -u Debian-snmp snmpwalk -v 2c -c xxxx x.x.x.x 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."dhcpstats".1'

returns a bunch of errors about unlinked OID in the agent MIB, this is the same output when running as root, or librenms or standard user.

when running from a different client or locally on the dhcp server I have no issues:

─ snmpwalk -v 2c -c home 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."dhcpstats".1'                                                                                [11:14am]
NET-SNMP-EXTEND-MIB::nsExtendOutLine."dhcpstats".1 = STRING: {\"version\": 2, \"error\": 0, \"errorString\": \"\", \"data\": {\"leases\": {\"total\": 66, \"active\": 39, \"expired\": 0, \"released\": 0, \"abandoned\": 0, \"reset\": 0, \"bootp\": 0, \"backup\": 0, \"free\": 66}, \"pools\": [{\"first_ip\": \"\", \"last_ip\": \"\", \"max\": \"151\", \"cur\": \"38\", \"percent\": \"25.166\"}], \"networks\": [{\"network\": \"\", \"max\": \"151\", \"cur\": \"38\", \"percent\": \"25.166\"}], \"all_networks\": {\"max\": \"151\", \"cur\": \"38\", \"percent\": \"25.166\"}}}

it looks like there is an issue with SNMP on libreNMS, however if that was the case the other extends that I have would surely not be working too of which at least OSUpdates is, NTP complains that it is unable to draw the charts but that’s another issue all together:

#Distro Detection
 extend . distro /usr/bin/distro
#Hardware Detection (uncomment to enable)
 extend . hardware '/bin/cat /sys/devices/virtual/dmi/id/product_name'
 extend . manufacturer '/bin/cat /sys/devices/virtual/dmi/id/sys_vendor'
 extend . serial '/bin/cat /sys/devices/virtual/dmi/id/product_serial'

extend osupdate /etc/snmp/osupdate
extend dhcpstats /usr/bin/python3 /etc/snmp/dhcp.py
extend /etc/snmp/ntp-server.sh

This topic was automatically closed 186 days after the last reply. New replies are no longer allowed.