Using and loading MIBS

gday vw <[email protected]> Wed, 13 Nov 2024 11:14:53 +1100
Newsgroups gmane.network.net-snmp.user
Message-ID <CADPbiLNDQrKOtaowdMTC==RhvBkDYZLvfoNeYG-Qnm5g09e0HQ@mail.gmail.com>
--===============7917266838501277716==
Content-Type: multipart/alternative; boundary="000000000000b5bc5a0626c03956"

--000000000000b5bc5a0626c03956
Content-Type: text/plain; charset="UTF-8"

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 ([email protected]) (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)
Cannot find module (TCP-MIB): At line 1 in (none)
Cannot find module (UDP-MIB): At line 1 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 1 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 1 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 1 in (none)
Cannot find module (DISMAN-SCHEDULE-MIB): At line 1 in (none)
Cannot find module (HOST-RESOURCES-TYPES): At line 1 in (none)
Cannot find module (MTA-MIB): At line 1 in (none)
Cannot find module (NETWORK-SERVICES-MIB): At line 1 in (none)
Cannot find module (SNMPv2-TC): At line 15 in
/usr/share/snmp/mibs/UCD-DISKIO-MIB.txt
Cannot find module (SNMPv2-SMI): At line 34 in
/usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Cannot find module (HCNUM-TC): At line 37 in
/usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Cannot find module (SNMPv2-TC): At line 40 in
/usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Did not find 'enterprises' in module #-1
(/usr/share/snmp/mibs/UCD-SNMP-MIB.txt)
Did not find 'CounterBasedGauge64' in module #-1
(/usr/share/snmp/mibs/UCD-SNMP-MIB.txt)
Did not find 'DisplayString' in module #-1
(/usr/share/snmp/mibs/UCD-SNMP-MIB.txt)
Did not find 'TruthValue' in module #-1
(/usr/share/snmp/mibs/UCD-SNMP-MIB.txt)
Unlinked OID in UCD-SNMP-MIB: ucdavis ::= { enterprises 2021 }

I have cut a lot of the output here as it is just errors. Final output
below.

Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyShutdown ::= {
netSnmpNotifications 2 }
Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyRestart ::= {
netSnmpNotifications 3 }
Cannot adopt OID in UCD-SNMP-MIB: laErrMessage ::= { laEntry 101 }
Cannot adopt OID in UCD-SNMP-MIB: laErrorFlag ::= { laEntry 100 }
Cannot adopt OID in UCD-SNMP-MIB: laLoadFloat ::= { laEntry 6 }
Cannot adopt OID in UCD-SNMP-MIB: laLoadInt ::= { laEntry 5 }
Cannot adopt OID in UCD-SNMP-MIB: laConfig ::= { laEntry 4 }
Cannot adopt OID in UCD-SNMP-MIB: laLoad ::= { laEntry 3 }
Cannot adopt OID in UCD-SNMP-MIB: laNames ::= { laEntry 2 }
Cannot adopt OID in UCD-SNMP-MIB: laIndex ::= { laEntry 1 }
Unknown object identifier: unifiApSystem

The MIB files are in /home/zen/.snmp/mibs

Which is listed in the MIB search path
MIB search path: /home/zen/.snmp/mibs

zen@debian11-DR6:~$ ls /home/zen/.snmp/mibs
UI-MIB  UI-UniFi-MIB

Here is the entry in the UI-UniFi-MIB file
unifiApSystem   OBJECT IDENTIFIER ::= { ubntUniFi 3 }

I'm hoping to be able to use SNMP to query and monitor the network. But at
this stage I'm still very much an SNMP newbie and just trying to learn how
to query the network at this point.

Obviously I'm doing something wrong, if the error is obvious, appreciate
direction otherwise troubleshooting suggestions.

Thanks

Vaughan

--000000000000b5bc5a0626c03956
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello,<div><br></div><div>I&#39;m an SNMP newbie and I&#39=
;m trying to follow this tutorial.</div><div><br></div><div><a href=3D"http=
://www.net-snmp.org/wiki/index.php/TUT:Using_and_loading_MIBS#Net-SNMP_Comm=
and_Line_Applications">http://www.net-snmp.org/wiki/index.php/TUT:Using_and=
_loading_MIBS#Net-SNMP_Command_Line_Applications</a></div><div><br></div><d=
iv>OS is Debian</div><div>zen@debian11-DR6:~$ cat /proc/version<br>Linux ve=
rsion 5.10.0-33-amd64 (<a href=3D"mailto:[email protected]">de=
[email protected]</a>) (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-1=
0-03)</div><div><br></div><div>Command and output</div><div>zen@debian11-DR=
6:~$ snmptranslate -m +UI-UniFi-MIB -IR -On unifiApSystem<br>MIB search pat=
h: /home/zen/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr=
/share/snmp/mibs/ietf<br>Cannot find module (SNMPv2-MIB): At line 1 in (non=
e)<br>Cannot find module (IF-MIB): At line 1 in (none)<br>Cannot find modul=
e (IP-MIB): At line 1 in (none)<br>Cannot find module (TCP-MIB): At line 1 =
in (none)<br>Cannot find module (UDP-MIB): At line 1 in (none)<br>Cannot fi=
nd module (HOST-RESOURCES-MIB): At line 1 in (none)<br>Cannot find module (=
NOTIFICATION-LOG-MIB): At line 1 in (none)<br>Cannot find module (DISMAN-EV=
ENT-MIB): At line 1 in (none)<br>Cannot find module (DISMAN-SCHEDULE-MIB): =
At line 1 in (none)<br>Cannot find module (HOST-RESOURCES-TYPES): At line 1=
 in (none)<br>Cannot find module (MTA-MIB): At line 1 in (none)<br>Cannot f=
ind module (NETWORK-SERVICES-MIB): At line 1 in (none)<br>Cannot find modul=
e (SNMPv2-TC): At line 15 in /usr/share/snmp/mibs/UCD-DISKIO-MIB.txt<br>Can=
not find module (SNMPv2-SMI): At line 34 in /usr/share/snmp/mibs/UCD-SNMP-M=
IB.txt<br>Cannot find module (HCNUM-TC): At line 37 in /usr/share/snmp/mibs=
/UCD-SNMP-MIB.txt<br>Cannot find module (SNMPv2-TC): At line 40 in /usr/sha=
re/snmp/mibs/UCD-SNMP-MIB.txt<br>Did not find &#39;enterprises&#39; in modu=
le #-1 (/usr/share/snmp/mibs/UCD-SNMP-MIB.txt)<br>Did not find &#39;Counter=
BasedGauge64&#39; in module #-1 (/usr/share/snmp/mibs/UCD-SNMP-MIB.txt)<br>=
Did not find &#39;DisplayString&#39; in module #-1 (/usr/share/snmp/mibs/UC=
D-SNMP-MIB.txt)<br>Did not find &#39;TruthValue&#39; in module #-1 (/usr/sh=
are/snmp/mibs/UCD-SNMP-MIB.txt)<br>Unlinked OID in UCD-SNMP-MIB: ucdavis ::=
=3D { enterprises 2021 }<br></div><div><br></div><div>I have cut a lot of t=
he output here as it is just errors. Final output below.</div><div><br></di=
v><div>Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyShutdown ::=3D { net=
SnmpNotifications 2 }<br>Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyRe=
start ::=3D { netSnmpNotifications 3 }<br>Cannot adopt OID in UCD-SNMP-MIB:=
 laErrMessage ::=3D { laEntry 101 }<br>Cannot adopt OID in UCD-SNMP-MIB: la=
ErrorFlag ::=3D { laEntry 100 }<br>Cannot adopt OID in UCD-SNMP-MIB: laLoad=
Float ::=3D { laEntry 6 }<br>Cannot adopt OID in UCD-SNMP-MIB: laLoadInt ::=
=3D { laEntry 5 }<br>Cannot adopt OID in UCD-SNMP-MIB: laConfig ::=3D { laE=
ntry 4 }<br>Cannot adopt OID in UCD-SNMP-MIB: laLoad ::=3D { laEntry 3 }<br=
>Cannot adopt OID in UCD-SNMP-MIB: laNames ::=3D { laEntry 2 }<br>Cannot ad=
opt OID in UCD-SNMP-MIB: laIndex ::=3D { laEntry 1 }<br>Unknown object iden=
tifier: unifiApSystem</div><div><br></div><div>The MIB files are in /home/z=
en/.snmp/mibs</div><div><br></div><div>Which is listed in the MIB search pa=
th=C2=A0</div><div>MIB search path: /home/zen/.snmp/mibs</div><div><br></di=
v><div>zen@debian11-DR6:~$ ls /home/zen/.snmp/mibs<br>UI-MIB =C2=A0UI-UniFi=
-MIB<br></div><div><br></div><div>Here is the entry in the UI-UniFi-MIB fil=
e</div><div>unifiApSystem =C2=A0 OBJECT IDENTIFIER ::=3D { ubntUniFi 3 }</d=
iv><div><br></div><div>I&#39;m hoping to be able to use SNMP to query and m=
onitor the network. But at this stage I&#39;m still very much an SNMP newbi=
e and just trying to learn how to query the network at this point.</div><di=
v><br></div><div>Obviously I&#39;m doing something wrong, if the error is o=
bvious, appreciate direction otherwise troubleshooting suggestions.</div><d=
iv><br></div><div>Thanks</div><div><br></div><div>Vaughan</div></div>

--000000000000b5bc5a0626c03956--


--===============7917266838501277716==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============7917266838501277716==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

--===============7917266838501277716==--