共计 5701 个字符,预计需要花费 15 分钟才能阅读完成。
一、客户端
A. 在 RedHat Linux 或者 CentOS 系统里安装
1、安装 dell 的 yum 源
wget -O – http://linux.dell.com/repo/hardware/latest/bootstrap.cgi |bash
2、安装 omsa
yum install srvadmin-all
ps: 出现某些包下载超时时,再次执行上面命令,直到全部下载安装完成.
3、做软连接
1.ln -s/opt/dell/srvadmin/sbin/omreport /usr/bin/omreport
2.ln -s/opt/dell/srvadmin/sbin/omconfig /usr/bin/omconfig
4、关闭 web 模式(仅允许运行 cli)
echo “/usr/bin/omconfig systemwebserver action=stop”>>/opt/dell/srvadmin/sbin/srvadmin-services.sh
5、启动 omsa
/opt/dell/srvadmin/sbin/srvadmin-services.sh start
Ps: 如果启动报以下错误,需要安装 openipmi 服务 yum -y install OpenIPMI
报错信息:
[root@xxxxx/]# /opt/dell/srvadmin/sbin/srvadmin-services.sh start
StartingSystems Management Device Drivers:
Startingdell_rbu: Already started [OK]
Startingipmi driver: [FAILED]
StartingSystems Management Device Drivers:
Startingdell_rbu: Already started [OK]
Startingipmi driver: [FAILED]
DSM SAShared Services is already started
StartingDSM SA Connection Service: [OK]
DSM SAConnection Service stopped successfully.
Ps: 如果启动报以下错误,原因是 dell smbios 的版本不够,没读取出机器的识别码
升级一下,即可。yum update Python-smbios –y
报错信息:
Starting Systems Management Data Engine:
Failed to start because system is not supported
dsm_om_shrsvc: DSM SA Shared Services cannot start on an unsupportedsystem. See the Dell Systems Software Support Matrix for a list of supported systems.
6、检查 omsa 启动状态
/opt/dell/srvadmin/sbin/srvadmin-services.sh status
dell_rbu(module) is running
ipmidriver is running
dsm_sa_datamgrd(pid 40936 40874) is running
dsm_sa_eventmgrd(pid 40950) is running
dsm_sa_snmpd(pid 40973) is running
dsm_om_shrsvcd(pid 41018) is running
dsm_om_connsvcdis stopped
Error!DSM SA Connection Service is already stopped.
Ps: 最后两行错误可以忽略
7、把 omsa 加入到开机启动里
echo “/opt/dell/srvadmin/sbin/srvadmin-services.shstart”>>/etc/rc.local
以上是在 centos 或者 redhat 系统里安装 omsa。
B.Ubuntu 下安装
1、增加源
echo ‘debhttp://linux.dell.com/repo/community/ubuntu precise openmanage’ | sudo tee -a/etc/apt/sources.list.d/linux.dell.com.sources.list
2、检测与增加 key
1.gpg –keyserverpool.sks-keyservers.net –recv-key 1285491434D8786F
2.gpg -a –export1285491434D8786F | sudo apt-key add –
3、更新源
apt-get update -y
4、安装 omsa
apt-get install srvadmin-all -y
5、做软连接
1.ln -s/opt/dell/srvadmin/sbin/omreport /usr/bin/omreport
2.ln -s/opt/dell/srvadmin/sbin/omconfig /usr/bin/omconfig
6、启动 cli 模式 omsa
service dataeng start
C.zabbix 客户端的配置
1、在 zabbix_agentd.conf 里添加以下配置,添加到最后
#follow is monitor hardware
UserParameter=hardware_battery,omreport chassis batteries|awk’/^Status/{if($NF==”Ok”) {print 1} else {print 0}}’
UserParameter=hardware_cpu_model,awk -v hardware_cpu_crontol=`sudoomreport chassis biossetup|awk ‘/CState/{if($NF==”Enabled”) {print 0} else {print 1}}’` -v hardware_cpu_c1=`sudo omreportchassis biossetup|awk ‘/C1[-|E]/{if($NF==”Enabled”) {print 0} else{print 1}}’` ‘BEGIN{if(hardware_cpu_crontol==0 && hardware_cpu_c1==0){print 0} else {print 1}}’
UserParameter=hardware_fan_health,awk -vhardware_fan_number=`omreport chassis fans|grep -c “^Index”` -vhardware_fan=`omreport chassis fans|awk ‘/^Status/{if($NF==”Ok”)count+=1}END{print count}’` ‘BEGIN{if(hardware_fan_number==hardware_fan) {print1} else {print 0}}’
UserParameter=hardware_memory_health,awk -vhardware_memory=`omreport chassis memory|awk ‘/^Health/{print $NF}’`’BEGIN{if(hardware_memory==”Ok”) {print 1} else {print 0}}’
UserParameter=hardware_nic_health,awk -vhardware_nic_number=`omreport chassis nics |grep -c “Interface Name”`-v hardware_nic=`omreport chassis nics |awk ‘/^Connection Status/{print$NF}’|wc -l` ‘BEGIN{if(hardware_nic_number==hardware_nic) {print 1} else {print0}}’
UserParameter=hardware_cpu,omreport chassis processors|awk’/^Health/{if($NF==”Ok”) {print 1} else {print 0}}’
UserParameter=hardware_power_health,awk -vhardware_power_number=`omreport chassis pwrsupplies|grep -c “Index”`-v hardware_power=`omreport chassis pwrsupplies|awk’/^Status/{if($NF==”Ok”) count+=1}END{print count}’`’BEGIN{if(hardware_power_number==hardware_power) {print 1} else {print 0}}’
UserParameter=hardware_temp,omreport chassis temps|awk’/^Status/{if($NF==”Ok”) {print 1} else {print 0}}’|head -n 1
UserParameter=hardware_physics_health,awk -vhardware_physics_disk_number=`omreport storage pdisk controller=0|grep -c”^ID”` -v hardware_physics_disk=`omreport storage pdiskcontroller=0|awk ‘/^Status/{if($NF==”Ok”) count+=1}END{print count}’`’BEGIN{if(hardware_physics_disk_number==hardware_physics_disk) {print 1} else{print 0}}’
UserParameter=hardware_virtual_health,awk -v hardware_virtual_disk_number=`omreportstorage vdisk controller=0|grep -c “^ID”` -vhardware_virtual_disk=`omreport storage vdisk controller=0|awk’/^Status/{if($NF==”Ok”) count+=1}END{print count}’`’BEGIN{if(hardware_virtual_disk_number==hardware_virtual_disk) {print 1} else{print 0}}’
2、重启 zabbix_agentd 服务
/etc/init.d/zabbix_agentd restart
3、测试获取数据:出现值为正常
[root@xxxxxx]# ../bin/zabbix_get -s 127.0.0.1 -k “hardware_virtual_health”
1
二、服务端
1、模板导入
把 TemplateHardware Monitor 模版导入到 zabbix 里
2、主机关联模板
把需要监控的硬件服务器关联此模板即可
3、监控图例
zabbix 使用 Omsa 来监控 Dell 服务器的硬件信息 模板下载
—————————————— 分割线 ——————————————
免费下载地址在 http://linux.linuxidc.com/
用户名与密码都是 www.linuxidc.com
具体下载目录在 /2015 年资料 /12 月 /20 日 /Zabbix 使用 Omsa 来监控 Dell 服务器的硬件信息 /
下载方法见 http://www.linuxidc.com/Linux/2013-07/87684.htm
—————————————— 分割线 ——————————————
一些 Zabbix 相关教程集合 :
Ubuntu 14.04 下 Zabbix2.4.5 源码编译安装 http://www.linuxidc.com/Linux/2015-05/117657.htm
安装部署分布式监控系统 Zabbix 2.06 http://www.linuxidc.com/Linux/2013-07/86942.htm
《安装部署分布式监控系统 Zabbix 2.06》http://www.linuxidc.com/Linux/2013-07/86942.htm
CentOS 6.3 下 Zabbix 安装部署 http://www.linuxidc.com/Linux/2013-05/83786.htm
Zabbix 分布式监控系统实践 http://www.linuxidc.com/Linux/2013-06/85758.htm
CentOS 6.3 下 Zabbix 监控 apache server-status http://www.linuxidc.com/Linux/2013-05/84740.htm
CentOS 6.3 下 Zabbix 监控 MySQL 数据库参数 http://www.linuxidc.com/Linux/2013-05/84800.htm
64 位 CentOS 6.2 下安装 Zabbix 2.0.6 http://www.linuxidc.com/Linux/2014-11/109541.htm
ZABBIX 的详细介绍 :请点这里
ZABBIX 的下载地址 :请点这里
本文永久更新链接地址 :http://www.linuxidc.com/Linux/2015-12/126531.htm