INSTALACJA MIB SNMP W SYSTEMIE CENTOS/RHEL 6

Zacznijmy od początku.
Co to jest MIB? Jest to skrót od Management Information Base, a sam MIB jest prostą bazą w której są zapisane informacje o obiektach, a każdy obiekt to jakaś informacja.
MIB są wykorzystywane przez SNMP, za pomocą którego można z urządzeń odczytywać i otrzymywać informacje, a także je konfigurować.

Za przykład instalacji nowego MIBa posłuży nam powernet412 umożliwiający obsługę urządzeń APC Symmetra z kartą ap9617/ap9618/ap9619.

Instalacja narzędzi SNMP i bibliotek

yum -y install net-snmp-libs net-snmp-utils

Pobranie pakietu MIB ze strony producenta i zapisanie go w odpowiedniej ścieżce

wget ftp://ftp.apc.com/apc/public/software/pnetmib/mib/412/powernet412.mib -O /usr/share/snmp/mibs/powernet412.mib.txt

Utworzenie konfiguracji MIB, lub dodanie tego pliku do istniejącej już konfiguracji

echo 'mibfile /usr/share/snmp/mibs/powernet412.mib.txt' >> /usr/share/snmp/snmp.conf

Warto przeglądnąć jakie identyfikatory obiektów istnieją w pliku, w tym jest ich dużo, nas interesuje coś, co obsługuje UPS-a:

grep 'OBJECT IDENTIFIER' /usr/share/snmp/mibs/powernet412.mib.txt

Na koniec komenda do snmpwalk, aby skorzystać z identyfikatora ups dla tej karty zarządzającej

snmpwalk -v 1 -c public 10.1.66.5 ups
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
RHEL: Reserved space on a ext2/ext3/ext4 filesystem
Viewed 5721 times since Sun, May 27, 2018
RHEL: Services basic management - systemd
Viewed 20213 times since Sat, Jun 2, 2018
List usernames instead of uids with the ps command for long usernames
Viewed 3311 times since Wed, Jul 25, 2018
Netcat shell zabezpieczony hasłem
Viewed 2998 times since Thu, May 24, 2018
RHCS6: Basic operations on clustered services
Viewed 3636 times since Sun, Jun 3, 2018
RHEL: Adding a boot entry to GRUB/GRUB2 configuration
Viewed 6241 times since Sun, May 27, 2018
SSH ProxyCommand example: Going through one host to reach another server
Viewed 15372 times since Tue, Aug 6, 2019
Using grep to find string in files
Viewed 3394 times since Fri, May 15, 2020
How to Register and Enable Red Hat Subscription, Repositories and Updates for RHEL 7.0 Server
Viewed 16467 times since Mon, Oct 29, 2018
Linux - How to get IP and MAC address of ethernet adapter in Linux
Viewed 3604 times since Fri, Jun 8, 2018