通过zabbix和ipmi来监控dell服务器

本文介绍如何通过Zabbix监控Dell PowerEdge服务器的BMC,利用IPMI进行无代理监控。详细步骤包括:启用Dell BMC的IPMI,安装IPMItools,创建Perl脚本解析数据,并将其整合到Zabbix中。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://www.zabbix.com/wiki/doku.php?id=howto:dellipmi

 

IPMI on Dell Servers

The following article outlines how to use Zabbix to monitor the information from Dell PowerEdge Servers without an agent, using the Dell BMC via IP. I’ve done with with PowerEdge 1850, 1950, 2850, 2950 servers, some with DRAC4 cards at the The Frontier School Division . Questions/problems with the article? Email me at asingl@frontiersd.mb.ca.

Enabling IPMI on Dell BMC

IPMI on the BMC is not enabled over IP by default on Dell PE servers. You can enable IPMI over IP in the BIOS, or via a DRAC5 controller if you have it installed. Carlos' Corner blog with screenshots of IPMI IP setup on a DRAC5 card

Steps to Enable IPMI over IP

  • At boot, press Ctrl+E when the BMC is initializing.
  • Enable IPMI over LAN
  • NIC Selection (You may see this based on what server you have. If you have a DRAC, set this to dedicated, and it will use the DRAC NIC)
  • LAN Parameters - Set a static IP.
  • LAN user configuration - Create a user & password for access via the LAN

Note: You do not get a ping reply from the BMC over IP. You will need to use IPMItool (See below) to query the BMC.

Install IPMItools on Zabbix server

You’ll need to install ipmitool, which is in the OpenIPMI-tools package. On CentOS, you can use:

 yum install OpenIPMI-tools

to install, auto launch, and start the service. (You may only need OpenIPMI-tools) On other distro’s, you’ll need to find the OpenIPMI-tools package & install it.

Use the following command to query the remote BMC:

/usr/bin/ipmitool -H BMC_REMOTE_IP -U username -P password -I lan -L USER sdr

BMC_REMOTE_IP=IP address assigned to the BMC.

username/password=Username/password assigned on the BMC.

sdr=reports on various hardware sensors. Other options are sel for system event log, and fru for hardware information.

Perl Script to Parse Data

Now the question is how to take this data, and bring it into Zabbix. Here’s a sample of a portion of the ipmitool sdr readout:

Temp             | 30 degrees C      | ok
Temp             | disabled          | ns
Ambient Temp     | 19 degrees C      | ok
Planar Temp      | 30 degrees C      | ok
Riser Temp       | 29 degrees C      | ok
Temp             | disabled          | ns
Temp             | disabled          | ns
CMOS Battery     | 3.11 Volts        | ok
FAN 1A RPM       | 7350 RPM          | ok
FAN 1B RPM       | 5025 RPM          | ok
FAN 2A RPM       | 7500 RPM          | ok
FAN 2B RPM       | 5025 RPM          | ok
FAN 3A RPM       | 7425 RPM          | ok
FAN 3B RPM       | 5175 RPM          | ok
FAN 4A RPM       | 7725 RPM          | ok
FAN 4B RPM       | 5175 RPM          | ok

Cron Data Dump

This is only a small portion of what reads out. Data readout from the BMC is also quite slow. I believe it’s using a 2400 baud serial connection that shifts to IP. This becomes a problem for bringing into Zabbix, as the Zabbix agent will time out on a script that reads directly from the BMC.

To solve this, we’ll create a cron job that pulls the data, & puts it into a text file every 3 minutes. edit /etc/crontab & add the following line:

*/3 * * * * root /etc/zabbix/ipmidump.sh

This will run the script at /etc/zabbix/ipmidump.sh as root every 3 minutes. Here’s an example of my ipmidump.sh script:

#!/bin/bash

/usr/bin/ipmitool -H server1_IP -U username -P password -I lan -L USER sdr>/etc/zabbix/server1.dump.$
cp /etc/zabbix/server1.dump.$ /etc/zabbix/server1.dump
/usr/bin/ipmitool -H server2_IP -U username -P password -I lan -L USER sdr>/etc/zabbix/server2.dump.$
cp /etc/zabbix/server2.dump.$ /etc/zabbix/server2.dump

The script runs the IMPItool dump & places it into a temporary text file, and then copies that file to it’s permanent location. Repeat as needed for the number of servers you want to use IPMI for.

Parsing Data from the dump Now we need a script that we can use with the Zabbix agent that will pull the data we want out of the dump. Parse data from IPMI SDR Readout script (Credit to Rick Wagner for providing the Perl script. wagner.234@gmail.com)

#!/usr/bin/perl

# Script provided for Zabbix community by Rick Wagner (wagner.234@gmail.com)

 
 
use
 strict;
use
 warnings;
 
die

 usage(
)
Zabbix 是一个企业级分布式开源监控解决方案。  Zabbix 软件能够监控众多网络参数服务器的健康度、完整性。Zabbix 使用灵活的告警机制,允许用户为几乎任何事件配置基于邮件的告警。这样用户可以快速响应服务器问题。Zabbix 基于存储的数据提供出色的报表数据可视化功能。  Zabbix 支持主动轮询(polling)被动捕获(trapping)。Zabbix所有的报表、统计数据配置参数都可以通过基于 Web 的前端页面进行访问。基于 Web 的前端页面确保您可以在任何地方访问您监控的网络状态服务器健康状况。适当的配置后,Zabbix 可以在监控 IT 基础设施方面发挥重要作用。无论是对于有少量服务器的小型组织,还是拥有大量服务器的大企业而言,同样适用。  Zabbix 是免费的。Zabbix 是根据 GPL 通用公共许可证的第二版编写发布的。这意味着产品源代码是免费发布的,可供公共使用。 本课程主要讲解以下方面: 1.  网络设备的监控,如 Dell R420、Juniper ssg5等。2.  Linux Windows 服务器监控。3.  应用服务的监控,如 httpd、nginx等。4.  Zabbix 代理的配置与使用以及 Zabbix 的多种告警方式。 注意:该课程,需要有一定的 zabbix Linux 基础,建议您先把>>看完,再看此套课程,这个是在它的基础上进行讲解的。                                                                   
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值