[关闭]
@cdmonkey 2015-11-03T08:49:02.000000Z 字数 2925 阅读 1110

Monitor DELL Server-OMSA

Nagios


一、简介

1.

对于服务器的硬件检测,目前业界主要有如下两种方案:

服务器官方提供的专用工具:HP-hpacucli、DELL-OMSA etc.
智能平台管理接口:IPMI,Intelligent Platform Management Interface

对服务器进行IPMI管理,则需要被检测的系统具有支持智能平台管理接口的硬件设备。

2. OMSA

OMSA Repository:http://linux.dell.com/repo/hardware/latest/
check_openmanage Manual:http://folk.uio.no/trondham/software/check_openmanage.html
http://www.tuicool.com/articles/AbABZrY

http://linux.dell.com/repo/hardware/omsa.html

插件check_openmanage是“Nagios”上用来检测戴尔服务器(包括PowerEdge系列及部分PowerVault系列服务器)的硬件健康状况的插件。该插件通过使用运行于被监控节点上的“OpenManage Server Administrator(OMSA)”软件来取得监测信息。该插件可以使用SNMPNRPE的方式收集监测信息。该插件可以获得服务器的存储、内存、电源及处理器温度等信息,并且对任何部件故障或正常参数以外的操作,给出警告信息。

此处输入图片的描述

二、Install OMSA

http://zh.community.dell.com/techcenter/systems-management/w/wiki/561.omsalinux

安装依赖包:

  1. yum install libcmpiCppImpl0 libwsman1 sblim-sfcb sblim-sfcc openwsman-client openwsman-server

1. YUM Install

  1. [root@Node-A2 ~]# wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash
  2. #检查一下结果,可以看到服务器上多出了一个Dell软件仓库的配置文件:
  3. [root@Node-A2 ~]# ll /etc/yum.repos.d/ |grep dell
  4. -rw-r--r-- 1 root root 1004 Oct 20 15:31 dell-omsa-repository.repo
  5. #同时我们注意到,它还会从新配置好的软件仓库里安装四个rpm安装包:
  6. Installing:
  7. yum-dellsysid x86_64
  8. Installing for dependencies:
  9. libsmbios x86_64
  10. python-smbios x86_64
  11. smbios-utils-python x86_64
  1. #说明一下,如果正确配置了软件源,即使前面忘记安装依赖包,这里也会自己检查依赖关系,安装必要的依赖包:
  2. [root@Node-A2 ~]# yum install srvadmin-all

三、Prerequisites

1. Perl interpreter

首先需要安装相关的Perl功能模块,每个模块所对应的具体功能请查阅官方说明。

  1. # For RHEL6 and CentOS6 the best way is to use EPEL:
  2. [root@Node-A2 ~]# yum install -y perl-Net-SNMP perl-Config-Tiny

2. Edit Nagios configuration file

  1. [root@nagios-new ~]# vim /usr/local/nagios/etc/cgi.cfg
  2. # ESCAPE HTML TAGS
  3. escape_html_tags=1
  4. # My advice is to turn this off:
  5. escape_html_tags=1 --> escape_html_tags=0

四、Getting started

首先你需要决定使用何种方式使用检测插件收集信息。使用SNMP的方式属于服务器主动收集监测信息,应于服务端运行使用该插件。使用NRPEcheck_by_ssh等方法的话,属于被动获取信息,应于被监控节点上运行使用该插件。

1. Define hosts & services

  1. # Creating a hostgroup:
  2. [root@nagios-new ~]# vim /usr/local/nagios/etc/objects/hosts.cfg
  3. # hostgroup for Dell servers
  4. define hostgroup{
  5. hostgroup_name dell-servers
  6. alias Dell Servers
  7. }
  1. # Defining the hosts:
  2. define host {
  3. host_name my-server1.foo.org
  4. alias my-server1
  5. address 192.168.10.12
  6. use generic-host
  7. hostgroups dell-servers
  8. }
  1. # Creating a servicegroup:
  2. [root@nagios-new ~]# vim /usr/local/nagios/etc/objects/services.cfg
  3. # Servicegroup for Dell OpenManage
  4. define servicegroup {
  5. servicegroup_name dell-openmanage
  6. alias Dell server health status
  7. }

2. Remote check via SNMP

选择通过SNMP进行检测的话,那么就要于服务端上定义相关指令。

  1. # Openmanage check via SNMP:
  2. define command {
  3. command_name check_openmanage
  4. command_line /path/to/check_openmanage -H $HOSTADDRESS$
  5. }

3. Local check via NRPE

  1. # Defining the service:
  2. [root@nagios-new ~]# vim /usr/local/nagios/etc/objects/services.cfg
  3. # Dell OMSA status
  4. define service {
  5. use generic-service
  6. hostgroup_name dell-servers
  7. servicegroups dell-openmanage
  8. service_description Dell OMSA
  9. check_command check_nrpe!check_openmanage
  10. notes_url http://folk.uio.no/trondham/software/check_openmanage.html
  11. }

上面的所有设置均于监测服务端进行编辑修改,而仅需在被监控节点上定义相关指令:

  1. # The NRPE config has the following:
  2. [root@nagios-new ~]# vim /usr/local/nagios/etc/objects/commands.cfg
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注