Sun Java System Messaging Server 6.3 管理指南

A.3.1 Net-SNMP 配置

Messaging Server 的 Net-SNMP 型 SNMP 子代理程式使用 AgentX 協定與平台的 SNMP 主代理程式 (RFC 2741) 進行通訊。Net-SNMP 主代理程式 snmpd 必須配置為允許使用 AgentX 協定。若要執行這項作業,請確定平台的 snmpd.conf 檔案包含此行:


master agentx

如果沒有,請增加此行再重新啟動 snmpd 常駐程式。請注意,光是傳送 SIGHUP 訊號至常駐程式並不足夠。一旦重新啟動 snmpd 常駐程式,請尋找 snmpd 為 AgentX 通訊所建立的 UNIX 網域通訊端。在 Solaris 和 Linux 系統上,此通訊端預設會顯示為特殊檔案 /var/agentx/master;但是其位置和名稱可能會透過 snmpd.con 檔案而變更。

Solaris 10 作業系統的 snmpd 配置如下所示:


%cp /etc/sma/snmp/snmpd.conf /etc/sma/snmp/snmpd.conf.save
% cat >> /etc/sma/snmp/snmpd.conf
# Messaging Server's subagent requires the AgentX protocol
master agentx
^D
% cat >> /etc/sma/snmp/snmpd.conf
% ls -al /var/agentx/
srwxrwxrwx 1 root root 0 Aug 9 13:58 /var/agentx/master

此外,在 Red Hat Enterprise Linux AS 3 系統上,預設的 snmpd.conf 檔案會限制「公用」SNMP 社群能檢視的資訊。因此,您必須移除或延伸限制,以包含 Messaging Server 的子代理程式實作之 MIB。若是初始測試,建議執行後者。方法是在名為「systemview」的檢視中包含 OID 子樹 mib-2.27 和 mib-2.28,如下所示。若是實際的部署,各個站點必須考量各自的整體安全性策略。請注意,SNMP 子代理程式所提供的資訊為「唯讀」。


% cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.save
% cat >>/etc/snmp/snmpd.conf
# Messaging Server's subagent requires the AgentX protocol
master agentx
# Messaging Server's subagent exports mib-2.27 and .28
# Add the mib-2.27 and .28 OID subtrees to the systemview
view systemview included .1.3.6.1.2.1.27
view systemview included .1.3.6.1.2.1.28
^D
% /sbin/service snmpd restart
% ls -al /var/agentx/master
srwxr-xr-x 1 root root 0 Aug 8 21:20 /var/agentx/master

如果您要使用 SNMP 3 版的內容名稱,區分在相同主機電腦上同步執行的不同 Messaging Server 實例之 MIB,則您至少還需要配置一個 SNMP 3 版的使用者名稱和密碼,以搭配 SNMP 3 版的查詢使用。