Hello David,

Those examples worked.

Thanks!

Vaughan

On Sat, Nov 16, 2024 at 2:02 PM David R Anderson <da...@mranderson.co.nz>
wrote:

> Good work,
>
> After reading the UBNT-UniFi-MIB I tried the same kind of thing as the
> Cisco MIB example:
>
> C:\usr\bin>snmptranslate  -m +UBNT-UniFi-MIB -M "c:\usr\share\snmp\mibs"
> -IR -On unifiIfIndex
> .1.3.6.1.4.1.41112.1.6.2.1.1.1
>
> C:\usr\bin>snmptranslate  -m +UBNT-UniFi-MIB -M "c:\usr\share\snmp\mibs"
> -IR -On unifiIfFullDuplex
> .1.3.6.1.4.1.41112.1.6.2.1.1.2
>
> If you try using the same syntax as this. The next items on the MIB tree
> are unifiIfIp, unifiIfMac ... etc
>
> Hope this helps
>
> On Sat, Nov 16, 2024 at 1:17 PM gday vw <gda...@gmail.com> wrote:
>
>> Hello,
>>
>> I have unpacked all of the net-snmp-5.9.4\mibs\ files as recommended to
>> /usr/share/snmp/mibs
>>
>> The example in the Wiki now works
>> zen@debian11-DR6:~$ snmptranslate -m +CISCO-RHINO-MIB -IR -On
>> ciscoLS1010ChassisFanLed
>> .1.3.6.1.4.1.9.5.11.1.1.12
>>
>> However when I try to query any of the entries in the UI-UniFi-MIB file
>> I'm still getting errors.
>> zen@debian11-DR6:~$ snmptranslate -m +UI-UniFi-MIB -IR -On unifiIfIp
>> MIB search path:
>> /home/zen/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf
>> Cannot find module (UI-UniFi-MIB): At line 1 in (none)
>> Unknown object identifier: unifiIfIp
>>
>> The UI-UniFi-MIB file is in the above folder along with all the other MIB
>> files, so the "Cannot find module" is misleading. The MIB file is there,
>> I'm still doing something wrong.
>>
>> At least I'm making progress.
>>
>> Thanks for the assistance.
>>
>> On Thu, Nov 14, 2024 at 7:31 PM Lee <ler...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> On Tue, Nov 12, 2024 at 7:16 PM gday vw wrote:
>>> >
>>> > Hello,
>>> >
>>> > I'm an SNMP newbie and I'm trying to follow this tutorial.
>>> >
>>> >
>>> http://www.net-snmp.org/wiki/index.php/TUT:Using_and_loading_MIBS#Net-SNMP_Command_Line_Applications
>>> >
>>> > OS is Debian
>>> > zen@debian11-DR6:~$ cat /proc/version
>>> > Linux version 5.10.0-33-amd64 (debian-ker...@lists.debian.org)
>>> (gcc-10 (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian)
>>> 2.35.2) #1 SMP Debian 5.10.226-1 (2024-10-03)
>>> >
>>> > Command and output
>>> > zen@debian11-DR6:~$ snmptranslate -m +UI-UniFi-MIB -IR -On
>>> unifiApSystem
>>> > MIB search path:
>>> /home/zen/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf
>>> > Cannot find module (SNMPv2-MIB): At line 1 in (none)
>>> > Cannot find module (IF-MIB): At line 1 in (none)
>>> > Cannot find module (IP-MIB): At line 1 in (none)
>>>
>>> OK, that's enough.  It looks like you're missing a _lot_ of MIB files,
>>> so download the latest net-snmp tarball
>>>
>>> https://sourceforge.net/projects/net-snmp/files/net-snmp/5.9.4/net-snmp-5.9.4.tar.gz/download
>>> and unpack all of the net-snmp-5.9.4\mibs\ files.
>>>
>>> I put everything into  /usr/local/share/snmp/mibs  you can put them
>>> there, /usr/share/snmp/mibs or wherever..
>>> In any case you should have something that looks like
>>>
>>> $ ls /usr/local/share/snmp/mibs
>>> EtherLike-MIB.txt                    SNMP-COMMUNITY-MIB.txt
>>> HCNUM-TC.txt                         SNMP-FRAMEWORK-MIB.txt
>>> HOST-RESOURCES-MIB.txt               SNMP-MPD-MIB.txt
>>> HOST-RESOURCES-TYPES.txt             SNMP-NOTIFICATION-MIB.txt
>>> IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt  SNMP-PROXY-MIB.txt
>>> IANA-LANGUAGE-MIB.txt                SNMP-TARGET-MIB.txt
>>> IANAifType-MIB.txt                   SNMP-USER-BASED-SM-MIB.txt
>>> IF-INVERTED-STACK-MIB.txt            SNMP-USM-AES-MIB.txt
>>> IF-MIB.my                            SNMP-USM-DH-OBJECTS-MIB.txt
>>> INET-ADDRESS-MIB.txt                 SNMP-VIEW-BASED-ACM-MIB.txt
>>> IP-FORWARD-MIB.txt                   SNMPv2-CONF.txt
>>> IP-MIB.txt                           SNMPv2-MIB.txt
>>> IPV6-FLOW-LABEL-MIB.txt              SNMPv2-SMI.txt
>>> IPV6-ICMP-MIB.txt                    SNMPv2-TC.txt
>>> IPV6-TCP-MIB.txt                     SNMPv2-TM.txt
>>> IPV6-UDP-MIB.txt                     TCP-MIB.txt
>>> NOTIFICATION-LOG-MIB.txt             TRANSPORT-ADDRESS-MIB.txt
>>> RFC1155-SMI.txt                      TUNNEL-MIB.txt
>>> RFC1213-MIB.my                       UCD-SNMP-MIB.txt
>>> RFC1215.txt                          UDP-MIB.txt
>>> RFC1271.MIB                          V2ADMIN.txt
>>> RFC2496.MIB                          cisco
>>> RMON-MIB.txt                         netgate
>>> SCTP-MIB.txt                         tplink
>>>
>>> Note that cisco, netgate and tplink are subdirectories.  I keep vendor
>>> specific mib files there.
>>>
>>> $ env | grep -i mib
>>> MIBS=ALL
>>>
>>> MIBDIRS=/usr/local/share/snmp/mibs:/usr/local/share/snmp/mibs/cisco:/usr/local/share/snmp/mibs/netgate:/usr/local/share/snmp/mibs/tplink
>>>
>>> $ snmptranslate -IR -On ifDescr
>>> .1.3.6.1.2.1.2.2.1.2
>>>
>>> $ snmptranslate .1.3.6.1.2.1.2.2.1.2
>>> RFC1213-MIB::ifDescr
>>>
>>> $ snmpwalk librarysw ifDesc
>>> RFC1213-MIB::ifDescr.2 = STRING: "Vlan-interface2"
>>> RFC1213-MIB::ifDescr.49153 = STRING: "gigabitEthernet 1/0/1"
>>> RFC1213-MIB::ifDescr.49154 = STRING: "gigabitEthernet 1/0/2"
>>> RFC1213-MIB::ifDescr.49155 = STRING: "gigabitEthernet 1/0/3"
>>> RFC1213-MIB::ifDescr.49156 = STRING: "gigabitEthernet 1/0/4"
>>> RFC1213-MIB::ifDescr.49157 = STRING: "gigabitEthernet 1/0/5"
>>> RFC1213-MIB::ifDescr.49158 = STRING: "gigabitEthernet 1/0/6"
>>> RFC1213-MIB::ifDescr.49159 = STRING: "gigabitEthernet 1/0/7"
>>> RFC1213-MIB::ifDescr.49160 = STRING: "gigabitEthernet 1/0/8"
>>> RFC1213-MIB::ifDescr.49161 = STRING: "gigabitEthernet 1/0/9"
>>> RFC1213-MIB::ifDescr.49162 = STRING: "gigabitEthernet 1/0/10"
>>> RFC1213-MIB::ifDescr.49163 = STRING: "gigabitEthernet 1/0/11"
>>> RFC1213-MIB::ifDescr.49164 = STRING: "gigabitEthernet 1/0/12"
>>> RFC1213-MIB::ifDescr.49165 = STRING: "gigabitEthernet 1/0/13"
>>> RFC1213-MIB::ifDescr.49166 = STRING: "gigabitEthernet 1/0/14"
>>> RFC1213-MIB::ifDescr.49167 = STRING: "gigabitEthernet 1/0/15"
>>> RFC1213-MIB::ifDescr.49168 = STRING: "gigabitEthernet 1/0/16"
>>> RFC1213-MIB::ifDescr.49169 = STRING: "gigabitEthernet 1/0/17"
>>> RFC1213-MIB::ifDescr.49170 = STRING: "gigabitEthernet 1/0/18"
>>> RFC1213-MIB::ifDescr.49171 = STRING: "gigabitEthernet 1/0/19"
>>> RFC1213-MIB::ifDescr.49172 = STRING: "gigabitEthernet 1/0/20"
>>> RFC1213-MIB::ifDescr.49173 = STRING: "gigabitEthernet 1/0/21"
>>> RFC1213-MIB::ifDescr.49174 = STRING: "gigabitEthernet 1/0/22"
>>> RFC1213-MIB::ifDescr.49175 = STRING: "gigabitEthernet 1/0/23"
>>> RFC1213-MIB::ifDescr.49176 = STRING: "gigabitEthernet 1/0/24"
>>> RFC1213-MIB::ifDescr.49177 = STRING: "gigabitEthernet 1/0/25"
>>> RFC1213-MIB::ifDescr.49178 = STRING: "gigabitEthernet 1/0/26"
>>> RFC1213-MIB::ifDescr.49179 = STRING: "gigabitEthernet 1/0/27"
>>> RFC1213-MIB::ifDescr.49180 = STRING: "gigabitEthernet 1/0/28"
>>>
>>> Hope that helps,
>>> Lee
>>>
>> _______________________________________________
>> Net-snmp-users mailing list
>> Net-snmp-users@lists.sourceforge.net
>> Please see the following page to unsubscribe or change other options:
>> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>>
>
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to