
有人知道 HP Linux 伺服器在識別硬碟故障等問題時發送和發送電子郵件的方法嗎? HP 系統管理已安裝,但我只能看到 SNMP,看不到電子郵件選項。對此最好的解決方案是什麼?
謝謝
答案1
您需要確保安裝了 HP ProLiant 支援包或 HP Service Pack for ProLiant 軟體包。這可以透過以下幾種方式之一完成: tar.gz 檔案、HP SPP DVD 或我的首選方法,透過 Yum 和惠普軟體交付儲存庫。
安裝這些軟體包後,要取得 SNMP 陷阱和電子郵件通知就很容易了。
對於電子郵件,只需編輯/opt/hp/hp-snmp-agents/cma.conf
在該trapemail
節下,取代「root」的電子郵件目標,或在作業系統層級將根電子郵件重定向到適當的位置。
########################################################################
# trapemail is used for configuring email command(s) which will be
# executed whenever a SNMP trap is generated.
# Multiple trapemail lines are allowed.
# Note: any command that reads standard input can be used. For example:
# trapemail /usr/bin/logger
# will log trap messages into system log (/var/log/messages).
########################################################################
trapemail /bin/mail -s 'HP Insight Management Agents Trap Alarm' [email protected]
儲存檔案並使用 重新啟動 HP 管理代理程式service hp-snmp-agents restart
。拔出電源線、斷開 ILO 網路電纜或其他東西來測試電子郵件警報。