Skip to end of metadata
Go to start of metadata

1. 安装OMSA

wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash
yum install -y --skip-broken srvadmin-base srvadmin-storageservices srvadmin-omacore

2. 启动OMSA

/opt/dell/srvadmin/sbin/srvadmin-services.sh start

3. 使用命令

# 查询帮助
/opt/dell/srvadmin/bin/omreport chassis -?
# 查看电源状态
/opt/dell/srvadmin/bin/omreport chassis pwrmonitoring
# 查看内存状态
/opt/dell/srvadmin/bin/omreport chassis memroy
# 查看CPU状态
/opt/dell/srvadmin/bin/omreport chassis processors

4. 监控脚本

#!/bin/bash
# 555 代表值取空了 CMD="/opt/dell/srvadmin/bin/omreport chassis"

get_status(){   
      result=$($CMD $1 | awk '/Status/&&/Ok/ {Sum+=1}END{print Sum}')              
      echo ${result:-555}
} 

 get_status $1

5. 自定义配置

UserParameter=physical.status[*],sh /workspace/zabbix/check_physical_status.sh $1