OpenWrt xDSL modem stats

Hi :slight_smile:

Looking to get xDSL (VDSL2) stats in librenms from OpenWrt.

So far, I have managed to get a few xDSL stats but not sure what miboid it needs to be or what the best miboid for theses stats?

xDSL_DSLAM_Vender.sh

#!/bin/sh
/etc/init.d/dsl_control dslstat | grep -e "vendor" | /usr/bin/cut -s -d ":" -f 2 | /usr/bin/cut -s -d "," -f 1 | sed 1d | /usr/bin/cut -s -d '" "' -f 2

xDSLDown.sh

#!/bin/sh
/etc/init.d/dsl_control dslstat | grep -e "snr" | /usr/bin/cut -s -d ":" -f 2 | /usr/bin/cut -s -d "," -f 1 | /usr/bin/cut -s -d " " -f 2 | sed 1d

xDSLUp.sh

#!/bin/sh
/etc/init.d/dsl_control dslstat | grep -e "snr" | /usr/bin/cut -s -d ":" -f 2 | /usr/bin/cut -s -d "," -f 1 | /usr/bin/cut -s -d " " -f 2 | sed 2d

xDSLUptime.sh

#!/bin/sh
/etc/init.d/dsl_control dslstat | grep -e "uptime" | /usr/bin/cut -s -d ":" -f 2 | /usr/bin/cut -s -d "," -f 1 | /usr/bin/cut -s -d " " -f 2 | sed 2d

I have managed to put this inside my snmpd file /etc/config/snmpd but stuck at miboid part if anyone can help?

config pass
        option name     xdsl-uptime
        option prog     "/bin/sh /etc/librenms/xDSLUptime.sh"
        option miboid   ??????
config pass
        option name     xdsl-dslam-vender
        option prog     "/bin/sh /etc/librenms/xDSL_DSLAM_Vender.sh"
        option miboid   ??????
config pass
        option name     xdsl-noise-margin-down
        option prog     "/bin/sh /etc/librenms/xDSLDown.sh"
        option miboid   ?????
config pass
        option name     xdsl-noise-margin-up
        option prog     "/bin/sh /etc/librenms/xDSLUp.sh"
        option miboid   ??????

Also using snmpd and not the mini_snmpd version.
https://openwrt.org/packages/pkgdata/snmpd

Hi @francisuk1989
You can check this file which does the xDSL discovery. You’ll see all the OIDs from the standard MIB that we currently support.