====== Snmp ====== **Basics and install** sudo apt install snmp snmp-mibs-downloader /usr/bin/download-mib # fix error in line 73 -> https://serverfault.com/questions/936119/snmp-mibs-on-ubuntu-error-in-mibs # edit /etc/snmp.conf -> mibs :ALL wget https://global.download.synology.com/download/Document/Software/DeveloperGuide/Firmware/DSM/All/enu/Synology_MIB_File.zip unzip ./Synology_MIB_File.zip cd ./Synology_MIB_File mkdir -p $HOME/.snmp/mibs mv ./* $HOME/.snmp/mibs **Using** # пооучить все дерево с именами snmpwalk -v 2c -c public 192.168.114.124 . # пооучить все дерево с OID snmpwalk -v 2c -On -c public 192.168.114.124 . snmpget -v 2c -On -c public 192.168.114.124 IP-FORWARD-MIB::inetCidrRouteNumber.0 # Only if you have mibs tree definition snmptable -v 2c -c public 192.168.114.124 1.3.6.1.2.1.1.9 # where you can add users mibs - https://habr.com/ru/post/206612/ snmptranslate -Dinit_mib .1.3 2>&1 |grep MIBDIR # проверить работу словаря snmptranslate -IR -On synoUPS -Td Print full details of the specified OID. -Tp Print a graphical tree, rooted at the specified OID. -Ta Dump the loaded MIB in a trivial form. -Tl Dump a labeled form of all objects. -To Dump a numeric form of all objects. -Ts Dump a symbolic form of all objects. -Tt Dump a tree form of the loaded MIBs (mostly useful for debugging). -Tz Dump a numeric and labeled form of all objects (compatible with MIB2SCHEMA format) * snmp good example https://github.com/centreon/centreon-plugins/blob/master/storage/synology/snmp/mode/ups.pm