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
Using etckeeper with git
Viewed 8074 times since Sun, Jun 3, 2018
Linux Customizing Bash
Viewed 2981 times since Sun, Dec 6, 2020
sed Delete / Remove ^M Carriage Return (Line Feed / CRLF) on Linux or Unix
Viewed 12102 times since Thu, Feb 7, 2019
Oracle Linux 7 – How to audit changes to a trusted file such as /etc/passwd or /etc/shadow
Viewed 3792 times since Wed, Jul 25, 2018
10 Linux rsync Examples to Exclude Files/Directories
Viewed 12288 times since Wed, Oct 31, 2018
8 Vim Tips And Tricks That Will Make You A Pro User
Viewed 3913 times since Fri, Apr 19, 2019
Extending Linux LVM partitions - scripts
Viewed 7473 times since Sun, May 20, 2018
“Too many authentication failures” with SSH
Viewed 7131 times since Mon, May 21, 2018
30 Handy Bash Shell Aliases For Linux / Unix / MacOS
Viewed 6173 times since Thu, Feb 11, 2021
Linux Network (TCP) Performance Tuning with Sysctl
Viewed 13321 times since Fri, Aug 3, 2018