Centos

通過 SNMP 提供 Dell 的 OpenManage 6.2 資訊

  • July 5, 2010

我已經在 CentOS 5.4 伺服器上成功安裝了 OpenManage,並且我能夠通過在埠 1311 上執行的 Web 界面使用 OpenManage,但我希望能夠通過 SNMP 伺服器公開這些資訊。我不太了解 SNMP,因此配置是反複試驗的結果。

我已嘗試遵循Open Manage Server Administrator User Guide中指出的描述。我遵循了有關 SNMP 配置的文件,但沒有成功。

我創建了一個小的 snmpd.conf 文件:

com2sec notConfigUser default public
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
access notConfigGroup "" any noauth exact all all none
view all included .1
rwcommunity public 10.200.26.50
syslocation "Somewhere"
syscontact adm@test.com
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
smuxpeer .1.3.6.1.4.1.674.10892.1

當我嘗試使用 snmpwalk 獲取 SNMP 資訊時,我得到以下輸出:

SNMPv2-MIB::sysDescr.0 = STRING: Linux myserver.test.com 2.6.18-164.15.1.el5 #1
SMP Wed Mar 17 11:30:06 EDT 2010 x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1180389) 3:16:43.89
SNMPv2-MIB::sysContact.0 = STRING: adm@test.com
SNMPv2-MIB::sysName.0 = STRING: myserver.test.com
SNMPv2-MIB::sysLocation.0 = STRING: "Somewhere"
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.2 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.3 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.4 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.5 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.6 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.7 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.5 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.6 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.7 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.8 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (0) 0:00:00.00

我懷疑我在使用 snmpwalk 實用程序時應該獲得一些 DELL 特定資訊。snmpd.conf 文件中的配置是否錯誤,或者我是否必須在 OpenManage 端進行配置才能從 SNMP 獲取硬體資訊?

更新:mib 文件可以幫助我解釋從 snmpwalk 返回的資訊嗎?我看到幾個 mib 文件位於 /opt/dell/srvadmin/ 下。

更新 2:我已驗證 SNMP 守護程序不返回任何 Dell OID,這意味著 snmpd.conf 文件有誤,或者缺少一些 OpenManage 配置。

這是一個現在可以工作的設置

  1. 安裝儲存庫

wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | 重擊 2. 安裝所需的軟體

yum install net-snmp OpenIPMI srvadmin-all 3. 配置 SNMP:

這是我們目前的 snmpd.conf 文件的樣子

\# DELL Stuff
\# sec.name source community
com2sec notConfigUser default public

\# groupName securityModel securityName
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser

\# Make at least snmpwalk -v 1 localhost -c public system fast again.
\# name incl/excl subtree mask(optional)
view all included .1
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1

\# group context sec.model sec.level prefix read write notif
access notConfigGroup "" any noauth exact all none none

\# Added for support of bcm5820 cards.
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat

\# Allow Systems Management Data Engine SNMP to connect to snmpd using SMUX
smuxpeer .1.3.6.1.4.1.674.10892.1

引用自:https://serverfault.com/questions/134071