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
Improve security with polyinstantiation
Viewed 14163 times since Fri, May 15, 2020
List usernames instead of uids with the ps command for long usernames
Viewed 3031 times since Wed, Jul 25, 2018
LOGROTATE – ARCHIWIAZACJA LOGÓW
Viewed 2595 times since Fri, Nov 30, 2018
systemd Auto-restart a crashed service in systemd
Viewed 3997 times since Fri, Jan 17, 2020
How to encrypt a partition using LUKS?
Viewed 2419 times since Fri, Jul 13, 2018
SSH ProxyCommand example: Going through one host to reach another server
Viewed 14544 times since Tue, Aug 6, 2019
stunnel How To Encrypt Traffic to Redis with Stunnel on Ubuntu 16.04
Viewed 2770 times since Sun, Dec 6, 2020
Jak wygenerować silne hasła jednorazowe w Linuksie?
Viewed 2879 times since Thu, May 24, 2018
Linux: how to monitor the nofile limit
Viewed 11423 times since Wed, Jul 25, 2018
RHCS6: Luci - the cluster management console
Viewed 3801 times since Sun, Jun 3, 2018