Re: Question about using snmpwalk
gday vw <[email protected]> Sun, 24 Nov 2024 12:34:44 +1100
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <CADPbiLP3RufLjyTFkhkouwEohH=YRYcO2T0Dj66U5k3eiB=NVw@mail.gmail.com> |
--===============2766791801559351023== Content-Type: multipart/alternative; boundary="0000000000004958fc06279e9f53" --0000000000004958fc06279e9f53 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Lee, snmptranslate -IR -On unifiIfRxBytes Warning: Module UBNT-MIB was in /usr/share/snmp/mibs/UBNT-MIB now is /usr/share/snmp/mibs/UBNT-UniFi-MIB Unknown object identifier: unifiIfRxBytes zen@debian11-DR6:~$ snmptranslate .1.3.6.1.4.1.41112.1.6.2.1.1.6 Warning: Module UBNT-MIB was in /usr/share/snmp/mibs/UBNT-MIB now is /usr/share/snmp/mibs/UBNT-UniFi-MIB iso.3.6.1.4.1.41112.1.6.2.1.1.6 So it looks like there is smoething wrong with my setup. I have replaced the Unifi MIB files as suggested. zen@debian11-DR6:~$ cat .snmp/snmp.conf defVersion 1 defCommunity public showMibErrors yes # showMibErrors no # whether to display MIB parsing errors. # mibWarningLevel 0 mibWarningLevel 1 # mibWarningLevel 9 # whether to show warning messages in parsing MIB files mibdirs /usr/share/snmp/mibs zen@debian11-DR6:/usr/share/snmp/mibs$ grep unifiIfRxBytes * zen@debian11-DR6:/usr/share/snmp/mibs$ ls UBNT* UBNT-MIB UBNT-UniFi-MIB zen@debian11-DR6:/usr/share/snmp/mibs$ I'm surprised that the grep unifiIfRxBytes doesn't return a result? Vaughan On Sun, Nov 24, 2024 at 11:34=E2=80=AFAM Lee <[email protected]> wrote: > On Wed, Nov 20, 2024 at 4:01=E2=80=AFPM gday vw wrote: > > > > > just curious: do you actually have an LS1010 in your network? > > > The last time I worked with them was around the turn of the century > > > along with LANE blades in the cat5000s > > > > No, I was using the snmptranslate query to hopefully confirm that my > snmp environment was working. > > That is the example in the wiki and initially the snmptranslate query > didn't work in my environment as I didn't have many of the needed mib fil= es. > > Thanks... I was thinking it'd be a bit strange if someone was still > using LS1010s today :) > > > root@DavoUnraid:/usr/share/snmp/mibs# grep unifiIfIndex * > > UI-UniFi-MIB: INDEX { unifiIfIndex } > > UI-UniFi-MIB: unifiIfIndex ObjectIndex, > > UI-UniFi-MIB:unifiIfIndex OBJECT-TYPE > > > > grep unifiApSystem * > > UI-UniFi-MIB:unifiApSystem OBJECT IDENTIFIER ::=3D { ubntUniFi 3 } > > UI-UniFi-MIB:unifiApSystemIp OBJECT-TYPE > > UI-UniFi-MIB: ::=3D { unifiApSystem 1 } > > UI-UniFi-MIB:unifiApSystemIsolated OBJECT-TYPE > > UI-UniFi-MIB: ::=3D { unifiApSystem 2 } > > UI-UniFi-MIB:unifiApSystemModel OBJECT-TYPE > > UI-UniFi-MIB: ::=3D { unifiApSystem 3 } > > UI-UniFi-MIB:unifiApSystemUplink OBJECT-TYPE > > UI-UniFi-MIB: ::=3D { unifiApSystem 4 } > > UI-UniFi-MIB:unifiApSystemUptime OBJECT-TYPE > > UI-UniFi-MIB: ::=3D { unifiApSystem 5 } > > UI-UniFi-MIB:unifiApSystemVersion OBJECT-TYPE > > UI-UniFi-MIB: ::=3D { unifiApSystem 6 } > > UI-UniFi-MIB:unifiApSystemGroup OBJECT-GROUP OBJECTS { > > UI-UniFi-MIB: unifiApSystemIp, unifiApSystemIsolated, > unifiApSystemModel, unifiApSystemUplink, unifiApSystemUptime, > unifiApSystemVersion > > > > hrmm... they're there but I don't see anything in your output mentioning > them.. > Can you try moving the UniFi MIBs aside and downloading these files > into your /usr/share/snmp/mibs directory: > http://dl.ubnt-ut.com/snmp/UBNT-MIB > http://dl.ubnt-ut.com/snmp/UBNT-UniFi-MIB > > With this bit in my ~/.snmp/snmp.conf > > showMibErrors yes > # showMibErrors no > # whether to display MIB parsing errors. > > # mibWarningLevel 0 > mibWarningLevel 1 > # mibWarningLevel 9 > # whether to show warning messages in parsing MIB files > > and using the the net-snmp-5.9.4 mibs along with the above two UniFi MIBS > I get > > $ snmptranslate -IR -On unifiIfRxBytes > MODULE-IDENTITY MACRO (lines 55..79 parsed and ignored). > OBJECT-IDENTITY MACRO (lines 81..103 parsed and ignored). > OBJECT-TYPE MACRO (lines 212..298 parsed and ignored). > NOTIFICATION-TYPE MACRO (lines 302..334 parsed and ignored). > TEXTUAL-CONVENTION MACRO (lines 8..48 parsed and ignored). > OBJECT-GROUP MACRO (lines 8..39 parsed and ignored). > NOTIFICATION-GROUP MACRO (lines 43..73 parsed and ignored). > MODULE-COMPLIANCE MACRO (lines 77..183 parsed and ignored). > AGENT-CAPABILITIES MACRO (lines 187..320 parsed and ignored). > OBJECT-TYPE MACRO (lines 25..39 parsed and ignored). > TRAP-TYPE MACRO (lines 14..35 parsed and ignored). > .1.3.6.1.4.1.41112.1.6.2.1.1.6 > > lee@spot ~/Downloads/net-snmp-5.9.4/mibs > $ snmptranslate .1.3.6.1.4.1.41112.1.6.2.1.1.6 > MODULE-IDENTITY MACRO (lines 55..79 parsed and ignored). > OBJECT-IDENTITY MACRO (lines 81..103 parsed and ignored). > OBJECT-TYPE MACRO (lines 212..298 parsed and ignored). > NOTIFICATION-TYPE MACRO (lines 302..334 parsed and ignored). > TEXTUAL-CONVENTION MACRO (lines 8..48 parsed and ignored). > OBJECT-GROUP MACRO (lines 8..39 parsed and ignored). > NOTIFICATION-GROUP MACRO (lines 43..73 parsed and ignored). > MODULE-COMPLIANCE MACRO (lines 77..183 parsed and ignored). > AGENT-CAPABILITIES MACRO (lines 187..320 parsed and ignored). > OBJECT-TYPE MACRO (lines 25..39 parsed and ignored). > TRAP-TYPE MACRO (lines 14..35 parsed and ignored). > UBNT-UniFi-MIB::unifiIfRxBytes > > Does that work for you? > > Regards, > Lee > --0000000000004958fc06279e9f53 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hello Lee,<div><br></div><div>snmptranslate -IR -On =C2=A0= unifiIfRxBytes<br>Warning: Module UBNT-MIB was in /usr/share/snmp/mibs/UBNT= -MIB now is /usr/share/snmp/mibs/UBNT-UniFi-MIB<br>Unknown object identifie= r: unifiIfRxBytes<br>zen@debian11-DR6:~$ snmptranslate .1.3.6.1.4.1.41112.1= .6.2.1.1.6<br>Warning: Module UBNT-MIB was in /usr/share/snmp/mibs/UBNT-MIB= now is /usr/share/snmp/mibs/UBNT-UniFi-MIB<br>iso.3.6.1.4.1.41112.1.6.2.1.= 1.6<br></div><div><br></div><div>So it looks like there is smoething wrong = with my setup.</div><div><br></div><div>I have replaced the Unifi MIB files= as suggested.</div><div><br></div><div>zen@debian11-DR6:~$ cat .snmp/snmp.= conf <br>defVersion 1<br>defCommunity public<br><br>showMibErrors yes<br># = showMibErrors no<br># =C2=A0 whether to display MIB parsing errors.<br><br>= # mibWarningLevel 0<br>=C2=A0 mibWarningLevel 1<br># mibWarningLevel 9<br>#= =C2=A0 whether to show warning messages in parsing MIB files<br>mibdirs /u= sr/share/snmp/mibs</div><div><br></div><div><br></div><div>zen@debian11-DR6= :/usr/share/snmp/mibs$ grep unifiIfRxBytes *<br>zen@debian11-DR6:/usr/share= /snmp/mibs$ ls UBNT*<br>UBNT-MIB =C2=A0UBNT-UniFi-MIB<br>zen@debian11-DR6:/= usr/share/snmp/mibs$=C2=A0</div><div><br></div><div>I'm surprised that = the grep unifiIfRxBytes doesn't return a result?</div><div><br></div><d= iv>Vaughan</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class= =3D"gmail_attr">On Sun, Nov 24, 2024 at 11:34=E2=80=AFAM Lee <<a href=3D= "mailto:[email protected]">[email protected]</a>> wrote:<br></div><blockqu= ote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px= solid rgb(204,204,204);padding-left:1ex">On Wed, Nov 20, 2024 at 4:01=E2= =80=AFPM gday vw wrote:<br> ><br> > > just curious: do you actually have an LS1010 in your network?<br> > > The last time I worked with them was around the turn of the centu= ry<br> > > along with LANE blades in the cat5000s<br> ><br> > No, I was using the snmptranslate query to hopefully confirm that my s= nmp environment was working.<br> > That is the example in the wiki and initially the snmptranslate query = didn't work in my environment as I didn't have many of the needed m= ib files.<br> <br> Thanks...=C2=A0 I was thinking it'd be a bit strange if someone was sti= ll<br> using LS1010s today :)<br> <br> > root@DavoUnraid:/usr/share/snmp/mibs# grep unifiIfIndex *<br> > UI-UniFi-MIB:=C2=A0 =C2=A0 INDEX { unifiIfIndex }<br> > UI-UniFi-MIB:=C2=A0 =C2=A0 unifiIfIndex ObjectIndex,<br> > UI-UniFi-MIB:unifiIfIndex OBJECT-TYPE<br> ><br> > grep unifiApSystem *<br> > UI-UniFi-MIB:unifiApSystem=C2=A0 =C2=A0OBJECT IDENTIFIER ::=3D { ubntU= niFi 3 }<br> > UI-UniFi-MIB:unifiApSystemIp OBJECT-TYPE<br> > UI-UniFi-MIB:=C2=A0 =C2=A0 ::=3D { unifiApSystem 1 }<br> > UI-UniFi-MIB:unifiApSystemIsolated OBJECT-TYPE<br> > UI-UniFi-MIB:=C2=A0 =C2=A0 ::=3D { unifiApSystem 2 }<br> > UI-UniFi-MIB:unifiApSystemModel OBJECT-TYPE<br> > UI-UniFi-MIB:=C2=A0 =C2=A0 ::=3D { unifiApSystem 3 }<br> > UI-UniFi-MIB:unifiApSystemUplink OBJECT-TYPE<br> > UI-UniFi-MIB:=C2=A0 =C2=A0 ::=3D { unifiApSystem 4 }<br> > UI-UniFi-MIB:unifiApSystemUptime OBJECT-TYPE<br> > UI-UniFi-MIB:=C2=A0 =C2=A0 ::=3D { unifiApSystem 5 }<br> > UI-UniFi-MIB:unifiApSystemVersion OBJECT-TYPE<br> > UI-UniFi-MIB:=C2=A0 =C2=A0 ::=3D { unifiApSystem 6 }<br> > UI-UniFi-MIB:unifiApSystemGroup OBJECT-GROUP OBJECTS {<br> > UI-UniFi-MIB:=C2=A0 =C2=A0unifiApSystemIp, unifiApSystemIsolated, unif= iApSystemModel, unifiApSystemUplink, unifiApSystemUptime, unifiApSystemVers= ion<br> ><br> <br> hrmm... they're there but I don't see anything in your output menti= oning them..<br> Can you try moving the UniFi MIBs aside and downloading these files<br> into your /usr/share/snmp/mibs directory:<br> =C2=A0 <a href=3D"http://dl.ubnt-ut.com/snmp/UBNT-MIB" rel=3D"noreferrer" t= arget=3D"_blank">http://dl.ubnt-ut.com/snmp/UBNT-MIB</a><br> =C2=A0 <a href=3D"http://dl.ubnt-ut.com/snmp/UBNT-UniFi-MIB" rel=3D"norefer= rer" target=3D"_blank">http://dl.ubnt-ut.com/snmp/UBNT-UniFi-MIB</a><br> <br> With this bit in my ~/.snmp/snmp.conf<br> <br> showMibErrors yes<br> # showMibErrors no<br> #=C2=A0 =C2=A0whether to display MIB parsing errors.<br> <br> # mibWarningLevel 0<br> =C2=A0 mibWarningLevel 1<br> # mibWarningLevel 9<br> #=C2=A0 =C2=A0whether to show warning messages in parsing MIB files<br> <br> and using the the net-snmp-5.9.4 mibs along with the above two UniFi MIBS I= get<br> <br> $ snmptranslate -IR -On=C2=A0 unifiIfRxBytes<br> MODULE-IDENTITY MACRO (lines 55..79 parsed and ignored).<br> OBJECT-IDENTITY MACRO (lines 81..103 parsed and ignored).<br> OBJECT-TYPE MACRO (lines 212..298 parsed and ignored).<br> NOTIFICATION-TYPE MACRO (lines 302..334 parsed and ignored).<br> TEXTUAL-CONVENTION MACRO (lines 8..48 parsed and ignored).<br> OBJECT-GROUP MACRO (lines 8..39 parsed and ignored).<br> NOTIFICATION-GROUP MACRO (lines 43..73 parsed and ignored).<br> MODULE-COMPLIANCE MACRO (lines 77..183 parsed and ignored).<br> AGENT-CAPABILITIES MACRO (lines 187..320 parsed and ignored).<br> OBJECT-TYPE MACRO (lines 25..39 parsed and ignored).<br> TRAP-TYPE MACRO (lines 14..35 parsed and ignored).<br> .1.3.6.1.4.1.41112.1.6.2.1.1.6<br> <br> lee@spot ~/Downloads/net-snmp-5.9.4/mibs<br> $ snmptranslate .1.3.6.1.4.1.41112.1.6.2.1.1.6<br> MODULE-IDENTITY MACRO (lines 55..79 parsed and ignored).<br> OBJECT-IDENTITY MACRO (lines 81..103 parsed and ignored).<br> OBJECT-TYPE MACRO (lines 212..298 parsed and ignored).<br> NOTIFICATION-TYPE MACRO (lines 302..334 parsed and ignored).<br> TEXTUAL-CONVENTION MACRO (lines 8..48 parsed and ignored).<br> OBJECT-GROUP MACRO (lines 8..39 parsed and ignored).<br> NOTIFICATION-GROUP MACRO (lines 43..73 parsed and ignored).<br> MODULE-COMPLIANCE MACRO (lines 77..183 parsed and ignored).<br> AGENT-CAPABILITIES MACRO (lines 187..320 parsed and ignored).<br> OBJECT-TYPE MACRO (lines 25..39 parsed and ignored).<br> TRAP-TYPE MACRO (lines 14..35 parsed and ignored).<br> UBNT-UniFi-MIB::unifiIfRxBytes<br> <br> Does that work for you?<br> <br> Regards,<br> Lee<br> </blockquote></div> --0000000000004958fc06279e9f53-- --===============2766791801559351023== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============2766791801559351023== 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 --===============2766791801559351023==--