Installing additional MIBs for specific HW od debian based SNMP server
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Installing additional MIBs for specific HW od debian based SNMP server
Hi everybody,
I have debian Lenny as an server I would like for monitoring of some network components ( switches, printers, routers ... ) and at
/usr/share/snmp/mibs I have
/usr/share/snmp/mibs# ls -l
total 1844
-rw-r--r-- 1 root root 17455 2008-12-16 18:22 AGENTX-MIB.txt
-rw-r--r-- 1 root root 36576 2008-12-16 18:23 BGP4-MIB.txt
-rw-r--r-- 1 root root 36959 2008-12-16 18:23 BRIDGE-MIB.txt
....
....
ls -l | wc -l shows 66, what means 66 differen mibs.
snmp related packages I have installed are as :
dpkg -l | grep ii | grep snmp
ii libgsnmp0 0.2.0-2.1 an SNMP library implementation based on glib and gnet
ii libsnmp-base 5.4.1~dfsg-12 SNMP (Simple Network Management Protocol) MIBs and documentati
ii libsnmp-perl 5.4.1~dfsg-12 SNMP (Simple Network Management Protocol) Perl5 support
ii libsnmp15 5.4.1~dfsg-12 SNMP (Simple Network Management Protocol) library
ii snmp 5.4.1~dfsg-12 SNMP (Simple Network Management Protocol) applications
ii snmpd 5.4.1~dfsg-12 SNMP (Simple Network Management Protocol) agents
My question is, how I can install additional mibs ( for Cisco, Procurve, etc ) for other hw I could have ? What is procedure. I browsed debian package base and I could not find some more packages related to snmp that could supply more mibs.
Comments are more than welcome and thank you in advance,
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
MIBs for additional hardware are usually supplied by your hardware vendor, not by the distro.
You can place them in /usr/share/snmp/mibs/ and then snmp will find them. In addition you can write into /etc/snmp/snmp.conf additional directories which should be searched for MIB files or you can explicitely add MIBs to be loaded whenever snmp is called like in the example below.
Note however that you can always traverse down the SNMP tree by using snmpwalk, and a MIB is nothing else but a translation from numeric codes to text. You can even write your own MIB or not use one at all.
MIBs for additional hardware are usually supplied by your hardware vendor, not by the distro.
You can place them in /usr/share/snmp/mibs/ and then snmp will find them. In addition you can write into /etc/snmp/snmp.conf additional directories which should be searched for MIB files or you can explicitely add MIBs to be loaded whenever snmp is called like in the example below.
Note however that you can always traverse down the SNMP tree by using snmpwalk, and a MIB is nothing else but a translation from numeric codes to text. You can even write your own MIB or not use one at all.
jlinkels
Thank you for reply. That is exaclty how I understand it, I know that MIBs are provided by vendor and that is clear. I am only struggling once download MIB in .mib format how to push my debian machine to read and use it.
All MIBs I have found in internet are in .mib format, the ones delivered by debian are in .txt format...
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
How does .mib look like? Human readable?
Debian should really read all those files in the mibs directory, but you can also explicitely specify as a parameter of your snmp command.
Test with snmptranslate.
There is also a debug option with snmp commands, with if set high enough, it will output all directories and mib files have been read. Forgot the exact parameter for debugging, but man snmpcmd (snmpcommand?) or man snmpget should tell you that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.