监控DELL服务器硬件通常有两种途径:一、操做系统上安装OMSA,编写脚本调用omreport命令进行监控;二、使用iDRAC,能够不用在操做系统上安装OMSA,只须要在iDRAC上开启SNMP,zabbix经过SNMP进行监控。对于不支持OMSA的操做系统和要求不能安装额外软件的状况下,推荐使用SNMP监控,配置简单方便。git
1、iDRAC开启SNMP服务github
进入iDRAC的WEB界面,打开“网络”->“服务”->“SNMP代理”。web
启用SNMP并设置团体名(community),不推荐使用默认的public。建议全部服务器设置统一的团体名。服务器
而后到zabbix server服务器上测试一下是否能get到数据:网络
snmpget -v 2c -c <Community> <iDRAC IP> .1.3.6.1.4.1.674.10892.2.1.1.2.0
2、配置Zabbix
app
一、建立Value Mappingide
在zabbix的web上建立以下Value Mapping(zabbix3版本不须要手动建立,此步跳过):
测试
DellDracDiskState 1 Unknown 2 Ready 3 Online 4 Foreign 5 Offline 6 Blocked 7 Failed 8 Non-RAID 9 Removed Dell iDRAC Network Device Connection Status 1 Up 2 Down 3 driverBad 4 driverDisabled 10 hardwareInitalizing 11 hardwareResetting 12 hardwareClosing 13 hardwareNotReady Dell Open Manage System Status 1 Other 2 Unknown 3 OK 4 NonCritical 5 Critical 6 NonRecoverable DellPowerState 1 Other 2 Unknown 3 Off 4 On Dell PSU State Settings 1 Unknown 2 Online (state disabled) 4 not Ready 8 Fan Failure 10 Online and Fan Failure 16 On 242 Online and OK DellRaidLevel 1 Unknown 2 RAID-0 3 RAID-1 4 RAID-5 5 RAID-6 6 RAID-10 7 RAID-50 8 RAID-60 9 Concatenated RAID 1 10 Concatenated RAID 5 DellRaidVolumeState 1 Unknown 2 Online 3 Failed 4 Degraded Dell_PSU_SensorState 1 Presence Detected 2 PS Failure 4 Predictuve Failure 8 PS AC lost 16 AC lost or out of range 32 AC out of range but still present 64 Configuration Error
二、导入模板
优化
选择Configuration->Templates->Import,导入“Template Dell iDrac SNMPV2”模板。spa
模板见本文附件,“Template Dell iDrac SNMPV2 zbx2.2.xml”支持zabbix2.2版本,“Template Dell iDrac SNMPV2 zbx3.xml”支持zabbix3版本。
模板支持如下监控类别:
Disks/Storage(磁盘)
Fans(风扇)
Memory(内存)
Network Cards(网卡)
Power(电源)
Processor(CPU)
System Info
Temperatures(温度)
Voltages(电压)
模板是从github上下载的,我修改了部分错误并作了优化。
三、配置全局变量{$SNMP_COMMUNITY_IDRAC}
选择Administration->General->Macros,建立变量“{$SNMP_COMMUNITY_IDRAC}”,Value处填写iDRAC的WEB上配置的SNMP团体名(Community),以下图:
四、建立主机
进入主机配置界面,记得填写“SNMP interfaces”为iDRAC的管理地址,连接“Template Dell iDrac SNMPV2”模板。
注:模板里部分监控项的监控间隔(Update interval)是86400秒,要等待大约一天的时间才会监控到首笔数据。
至此,所有配置结束了~