1.1.1. DELLserver硬件監控和DELL系統管理工具OMSA介紹html
本文介紹了利用使用Nagios和OMSA顯示器DELLserver硬件健康情況,Nagios監控的方式是NRPE模式,需要配置check_openmanage腳本和安裝DELL的OMSA工具。
node
使用OpenManage和Nagios監控DELLserver硬件部署手冊:
mysql
http://folk.uio.no/trondham/software/check_openmanage.htmllinux
1) OMSA是什麼ios
OMSA是Dell Openmanage Server Administrator的縮寫。web
Dell OpenManage Server Administrator (OMSA) provides acomprehensive, one-to-one systems management solution in two ways: from anintegrated, web browser-based graphical user interface (GUI) and from a commandline interface (CLI) through the operating system. Server Administrator isdesigned for system administrators to manage systems locally and remotely on anetwork. It allows system administrators to focus on managing their entirenetwork by providing comprehensive one-to-one systems management.sql
2) 安裝OMSAapache
DELL OpenManage的yum源地址:bootstrap
http://linux.dell.com/repo/hardware/Linux_Repository_14.04.00/api
配置OMSA的yum源:
建立/etc/yum.repos.d/dell-omsa-repository.repo源文件:
或者
運行命令本身主動配置:
wget -q -O -http://linux.dell.com/repo/hardware/Linux_Repository_14.04.00/bootstrap.cgi |bash
安裝OMSA:
yum install srvadmin-all
配置OMSA服務開機本身主動:
/opt/dell/srvadmin/sbin/srvadmin-services.sh enable
啓動OMSA的服務:
/opt/dell/srvadmin/sbin/srvadmin-services.sh start
查看omsa的服務狀態:
/opt/dell/srvadmin/sbin/srvadmin-services.sh status
dell_rbu(module) is running
ipmidriver is running
dsm_sa_datamgrd(pid 1331 1197) is running
dsm_sa_eventmgrd(pid 1381) is running
dsm_sa_snmpd(pid 1440) is running
dsm_om_shrsvcd(pid 1508) is running...
dsm_om_connsvcd(pid 1562) is running...
查看omsa的服務的監聽狀態:
# netstat -npae | egrep -iv'mysql|ssh|xinetd|udevd|crond|syslogd|upstart|auditd'
咱們注意到dsm_om_connsvc服務監聽了TCP協議的1311port,並且提供了http訪問的功能。
3) 卸載OMSA工具包中的web組件
由於本案例中僅僅需要使用OMSA工具包監控硬件健康狀態的功能。不需要使用OMSA提供的Web管理功能,因此爲了不由於系統防火牆或者web管理不當致使的問題,咱們在本例中卸載掉OMSA的web組件。
查看OMSA組件的監聽狀況:
# netstat -npae | egrep -iv 'mysql|ssh|xinetd|udevd|crond|syslogd|upstart|auditd'
ActiveInternet connections (servers and established)
ProtoRecv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 :::1311 :::* LISTEN 0 656427 1563/dsm_om_connsvc
ActiveUNIX domain sockets (servers and established)
ProtoRefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 6555231197/dsm_sa_datamgr /opt/dell/srvadmin/var/lib/openmanage/.ipc/dcsmilpipea
unix 2 [ ACC ] STREAM LISTENING 655525 1197/dsm_sa_datamgr/opt/dell/srvadmin/var/lib/openmanage/.ipc/dcsmilpipep
unix 2 [ ACC ] STREAM LISTENING 655527 1197/dsm_sa_datamgr/opt/dell/srvadmin/var/lib/openmanage/.ipc/dcsmilpipeu
unix 2 [ ACC ] STREAM LISTENING 655770 1508/dsm_om_shrsvcd/opt/dell/srvadmin/var/lib/openmanage/shrsvc/dsm_om_shrsvc
unix 2 [ ACC ] STREAM LISTENING 655772 1508/dsm_om_shrsvcd/opt/dell/srvadmin/var/lib/openmanage/shrsvc/omintf5e4
unix 2 [ ] STREAM CONNECTED 656423 1563/dsm_om_connsvc
unix 2 [ ] STREAM CONNECTED 656015 1563/dsm_om_connsvc
unix 3 [ ] STREAM CONNECTED 655972 1197/dsm_sa_datamgr/opt/dell/srvadmin/var/lib/openmanage/.ipc/dcsmilpipea
unix 3 [ ] STREAM CONNECTED 655971 1563/dsm_om_connsvc
unix 3 [ ] STREAM CONNECTED 655650 1197/dsm_sa_datamgr/opt/dell/srvadmin/var/lib/openmanage/.ipc/dcsmilpipea
unix 3 [ ] STREAM CONNECTED 655649 1440/dsm_sa_snmpd
unix 3 [ ] STREAM CONNECTED 655589 1197/dsm_sa_datamgr/opt/dell/srvadmin/var/lib/openmanage/.ipc/dcsmilpipea
unix 3 [ ] STREAM CONNECTED 655588 1381/dsm_sa_eventmg
OMSA組件的dsm_om_connsvc服務監聽了TCP協議的1311port。
查看dsm_om_connsvc服務調用的程序:
lsof -p 1563 # 1563是dsm_om_connsvc服務進程的PID
查看dsm_om_connsvc調用的程序文件屬於哪一個rpm包:
# rpm -qf /opt/dell/srvadmin/lib64/openmanage/apache-tomcat/lib/tomcat-api.jar
srvadmin-tomcat-7.4.0-4.97.1.el6.x86_64
# rpm -qf /opt/dell/srvadmin/lib64/openmanage/jre/lib/jce.jar
srvadmin-jre-7.4.0-4.98.1.el6.x86_64
關閉OMSA的服務:
/opt/dell/srvadmin/sbin/srvadmin-services.sh stop
卸載srvadmin-tomcat和srvadmin-jre軟件包:
# rpm -e srvadmin-tomcat-7.4.0-4.97.1.el6.x86_64
error: Failed dependencies:
srvadmin-tomcat = 7.4.0 is needed by (installed)srvadmin-webserver-7.4.0-4.1.1.el6.x86_64
# rpm -e srvadmin-webserver-7.4.0-4.1.1.el6.x86_64
error: Failed dependencies:
srvadmin-webserver = 7.4.0 is needed by (installed)srvadmin-all-7.4.0-4.1.1.el6.x86_64
卸載srvadmin-webserver軟件包:
# rpm -e --nodeps srvadmin-webserver-7.4.0-4.1.1.el6.x86_64
# rpm -e srvadmin-tomcat-7.4.0-4.97.1.el6.x86_64
# rpm -e srvadmin-jre-7.4.0-4.98.1.el6.x86_64
刪除appache-tomcat的文件夾:
# rm -rf /opt/dell/srvadmin/lib64/openmanage/apache-tomcat
啓動OMSA的服務:
# /opt/dell/srvadmin/sbin/srvadmin-services.sh start
StartingSystems Management Device Drivers:
Startingdell_rbu: [ OK ]
Startingipmi driver: Already started [ OK ]
StartingSystems Management Data Engine:
Startingdsm_sa_datamgrd: [ OK ]
Startingdsm_sa_eventmgrd: [ OK ]
Startingdsm_sa_snmpd: [ OK ]
Starting DSMSA Shared Services: [ OK ]
測試check_openmanage腳本:
./check_openmanage -d
輸出的檢查項跟卸載OMSA的web組件以前是同樣的。
查看卸載OMSA的web組件以後,OMSA的服務監聽狀況:
# netstat -npae | egrep -iv'mysql|ssh|xinetd|udevd|crond|syslogd|upstart|auditd'
此時,OMSA的服務僅僅進行了Unix domain sockets的監聽,而Unix domain socket僅僅用於本操做系統中。進程之間的通訊,比方check_openmanage腳本調用OMSA的服務進行DELLserver硬件健康狀態檢查。
至此。OMSA的Web組件卸載完成。
4) 安裝check_openmanage安裝包
下載地址:
http://folk.uio.no/trondham/software/check_openmanage.html#download
下載check_openmanage工具包:
wget http://folk.uio.no/trondham/software/files/check_openmanage-3.7.11.tar.gz
測試check_openmanage工具:
tar zxf check_openmanage-3.7.11.tar.gz
cd check_openmanage-3.7.11
./check_openmanage -d
./check_openmanage
假設提示"Storage Error",則加上--no-storage參數:
./check_openmanage --no-storage
# check_openmanage會檢查50~60項左右DELL服務的信息
5) 配置NRPE
編輯/usr/local/nagios/etc/nrpc.cfg文件,加入:
command[check_dell_openmanage]=/path/to/check_openmanage
或者
command[check_dell_openmanage]=/path/to/check_openmanage--no-storage
把check_openmanage腳本複製到/usr/local/nagios/libexec/文件夾:
cp check_openmanage-3.7.11/check_openmanage/usr/local/nagios/libexec/
測試命令:
check_nrpe -H IP -c check_dell_openmanage
6) 注意事項
check_openmanage是perl腳本,因此操做系統必須已經安裝了perl。
7) server沒有外網怎麼辦
假設server沒有外網。可以考慮在有外網的機器上作一個iptables的nat映射。把僅僅有內網的server配置的yum映射到公網,或者在機房內部署一個yum源;
8) 還可以用什麼方法
假設不使用OMSA和check_openmanage來監控硬件健康狀態,還可以使用ipmitool來監控,只是需要本身開發腳本。
9) 適用什麼環境使用
假設在使用DELL廠商的server。都建議使用。
10) 關於OMSA組件安全性的補充說明
Dell OpenManage Server Administrator (OMSA) 7.1及更早版本號在實現上存在XSS漏洞,可贊成遠程攻擊者注入Web腳本或HTML。
DELL廠商已經公佈了升級補丁來修復這個安全問題,請到廠商的主頁下載,詳見本文最後一部分的「本文相關資料的參考連接」部分的「OMSA組件安全補丁的下載地址」。
11) DELL廠商提供的其餘系統管理工具
DELL還提供用於Microsoft System Center管理配置工具、OracleEntreprise Manager 12c插件。以及支持HP和IBM的插件等工具。詳情請登陸DELL官方站點,依次進入Support--> Drivers & Downloads --> 選擇server類型--> System Managements模塊。
12) DELL提供的用於OracleEnterprise Manager 12c的插件說明
Dell OpenManage Plug-in v1.0 for Oracle Enterprise Manager12c
Dell OpenManage Plug-in for Oracle Enterprise Managerprovides a proactive approach to data center management that delivers featuresfor monitoring Dell server, storage, and networking infrastructures inenvironment managed by Oracle Enterprise Manager (OEM). It also supportsmapping of database workload to Dell hardware for quicker fault detection andconsole launch of Dell devices to perform troubleshooting, configuration, andmanagement activities. It protects customer’s existing investment in OEM consoleand helps in ease of integration and management of Dell devices.
13) 什麼是Unix domain socket
A Unixdomain socket or IPC socket (inter-process communication socket) is a datacommunications endpoint for exchanging data between processes executing withinthe same host operating system. While similar in functionality to named pipes,Unix domain sockets may be created as connection‑mode(SOCK_STREAM or SOCK_SEQPACKET) or as connectionless (SOCK_DGRAM), while pipesare streams only. Processes using Unix domain sockets do not need to share acommon ancestry. The API for Unix domain sockets is similar to that of anInternet socket, but it does not use an underlying network protocol forcommunication. The Unix domain socket facility is a standard component of POSIXoperating systems.Unixdomain sockets use the file system as their address name space. They arereferenced by processes as inodes in the file system. This allows two processesto open the same socket in order to communicate. However, communication occursentirely within the operating system kernel.In addition to sending data, processes may send filedescriptors across a Unix domain socket connection using the sendmsg() andrecvmsg() system calls.
14) 本文相關資料的參考連接
本身定義check_openmanage的閥值:
http://dreamway.blog.51cto.com/1281816/1048274
omreport命令使用:
http://www.sxszjzx.com/~t096/manual/sc/Dosa/CLI/report.htm
DELL廠商網址:
DELL廠商OMSA的yum源地址:
http://linux.dell.com/repo/hardware/Linux_Repository_14.04.00/
使用OpenManage和Nagios監控DELLserver硬件部署手冊:
http://folk.uio.no/trondham/software/check_openmanage.html
OMSA組件安全補丁的下載地址:
http://www.dell.com/support/drivers/us/en/19/DriverDetails/Product/poweredge-r710?
driverId=5JDN0&osCode=WNET&fileId=3082293694
DELL提供的用於Oracle Enterprise Manager 12c的插件地址:
http://www.dell.com/support/drivers/us/en/04/DriverDetails/Product/poweredge-r710?
driverId=XKRM6&osCode=WS8R2&fileId=3356540401&languageCode=en&categoryId=SM
DELL廠商提供的其餘管理工具的網址:
http://www.dell.com/support/drivers/us/en/04/ProductSelector/Select/FamilySelection?
Unix domain socket的解釋說明: