(Nagios)-check_openmanage[Dell]

Posted 请点..头像

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了(Nagios)-check_openmanage[Dell]相关的知识,希望对你有一定的参考价值。

 
Nagios->check_openmanage[Dell R7*]
2014年11月13日
下午 07:44
需求介绍:
透过Nagios监控Dell R7系列服务器硬件状态
环境信息:
 
Nagios监控主机:xxx.xxx.xxx.xxx
Nagios使用版本:3.2.3
NagioSQL: 3.2.0
Dell R710:xxx.xxx.xxx.xxx
 
监控逻辑:
  1.Nagios通过插件check_nrpe 调用 check_openmange接收硬件信息。
   2.服务器端SNMP服务通过Openmanage软件获取硬件状态。
 
  Nagios:需安装check_openmange插件
  Dell R7:需安装SNMP服务、Openmanage软件、Naiogs代理(只监控硬件可不安装)
  

  插件下载地址:http://folk.uio.no/trondham/software/check_openmanage.html

    

  

Nagios监控主机安装插件:
 
[root@nagios ~]# tar zxvf check_openmanage-3.7.12.tar.gz
[root@nagios check_openmanage-3.7.12]# ./install.sh
/usr/local/nagios/libexec
/usr/local/nagios
[root@nagios ~]# rmp -ivh perl-Net-SNMP-5.2.0-1.el5.1.noarch.rpm
[root@nagios ~]# rpm -ivh perl-Config-Tiny-2.10-1.el5.noarch.rpm
snmp协议访问
snmpwalk -Os -c public -v 1 192.168.x.x
 
被监控端安装SNMP和Dell Openamge[Windows]
 
被监控端安装SNMP
  SNMP服务需开启硬件信息的推送
  

  SNMP服务设定公共名称和Nagios监控主机地址,提高安全性

  

安装Dell Openmanage(默认端口1311)

  OM-DRAC-Dell-Web-WINX64-8.4.0-2193_A00安装包(dell官网自行下载)
  

  解压后安装Openmanage

  

  

  安装完成后测试访问,输入当前用户名称或密码(IE支持度不高)
  可以访问地址: https://服务器IP地址:1311/
  

 

被监控端安装Nagios代理
  NSCP-0.4.1.73-x64
  

  

更新Nagios代理软件配置
  C:\\Program Files\\NSClient(安装路径)
  

  

  在nsclinet.ini尾部增加如下信息:
  \';\'号表示注释不生效
    
[/settings/NRPE/server]
 
; COMMAND ARGUMENT PROCESSING - This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
allow arguments = true
 
; COMMAND ALLOW NASTY META CHARS - This option determines whether or not the we will allow clients to specify nasty (as in |`&><\'"\\[]{}) characters in arguments.
allow nasty characters = true
allow_nasty_meta_chars = 1
 
; ALLOWED HOSTS - A comaseparated list of allowed hosts. You can use netmasks (/ syntax) or * to create ranges. parent for this key is found under: /settings/default this is marked as advanced in favour of the parent.
;allowed hosts = 192.168.xx.xx/24(可以限制访问网段)
 
; PORT NUMBER - Port to use for NRPE.
port = 5666
 
 
[/settings/NRPE/server]
allow arguments=true
 
[/settings/external scripts]
allow arguments=true
 
;(这里也可以自己设定脚本 如vbs)
[/settings/external scripts/scripts]
timevbs = cscript.exe //T:30 //NoLogo scripts\\\\lib\\\\check_time.vbs $ARG1$ $ARG2$ $ARG3$

  重启nagios代理服务

  

  重启服务

  

监控主机测试
 
  [root@nagios libexec]# ./check_openmanage -H 被监控主机IP
  OK - System: \'PowerEdge R710 II\', SN: \'HxxD3X\', 24 GB ram (6 dimms), 2 logical drives, 14 physical drives
  检查Dell Server中的硬件日志Voltage Probes  (电压)
  [root@nagios libexec]# ./check_openmanage -H 被监控主机IP --only voltage
  VOLTAGE OK - 22 voltage probes checked
   Windows 系统中需要安装openmanage &SNMP两程式,Server2003中添加SNMP(控制中心---添加或删除程式---添加或删除---Management and monitoring tools--Details----Simple Network Management Protocol)
 
Naiogs端使用check_nrpe方式监控
  [root@nagios libexec]# ./check_nrpe -H 1被监控主机IP  -p 5666 -c check_openmanage -t 60
  OK - System: \'PowerEdge R720\', SN: \'6Dxx2\', 16 GB ram (2 dimms), 2 logical drives, 6 physical drives
  
Nagios监控Dell Server硬件是忽略Server固件版本
  [root@nagios libexec]# ./check_openmanage  -H 被监控主机IP
  Controller 0 [PERC H700 Integrated]: Firmware \'12.10.1-0001\' is out of date
  Controller 1 [PERC H800 Adapter]: Firmware \'12.10.1-0001\' is out of date
  [root@nagios libexec]# ./check_openmanage  -H 被监控主机IP -b ctrl_fw=all  -b ctrl_driver=all -b ctrl_stdr=all
  OK - System: \'PowerEdge R710 II\', SN: \'8Dxxx3X\', 24 GB ram (6 dimms), 2 logical drives, 14 physical drives
 
 Esx客服端安装SNMP&OMSA组件 
  1. Make sure ESXi has patch 1 installed (at least build 175625)…if not, update it.
  1. Make sure the root user has a password.
  1. Download and install vSphere remote CLI from VMware’s website.
  1. Download oem-dell-openmanage-esxi_6.1-0000.zip from the Dell Support web site and copy it to C:\\Program Files\\VMware\\VMware vSphere CLI\\bin on the system you installed the vSphere remote CLI.
  1. On the system where you installed the vSphere remote CLI, open a command prompt and change directory to C:\\Program Files\\VMware\\VMware vSphere CLI\\bin
  2. Type the following command:
    • vihostupdate.pl --server <esxhost> --username root -i -b c:\\oem-dell-openmanage-esxi_6.1-0000.zip
  1. Enter the root password at the prompt and after a few minutes you should see "Host updated successfully".
  2. Reboot the server.
  1. From the vSphere client:
    1. Choose the Configuration tab on the host
    1. Click Advanced Settings under the Software section
    1. In the dialog that appears click "UserVars" on the left
    1. Change the value of CIMOEMProvidersEnabled to 1
    1. Click OK.
  1. From the DCUI: Restart Management Agents

 

RedHat5.9客服端安裝SNMP&OMSA組件
   所需安装包Dell官网可自行下载
  
  [root@localhost ~]# tar zxvf OM-SrvAdmin-Dell-Web-LX-7.3.0-350_A00.RHEL5.x86_64.tar.gz
  [root@localhost ~]# cd linux/RPMS/supportRPMS/opensource-components/RHEL5/
  [root@localhost RHEL5]# cd x86_64/
  [root@localhost x86_64]# ls
  libcmpiCppImpl0-2.0.0Dell-4.1.6.el5.x86_64.rpm
  libwsman1-2.2.3.9-4.1.7.el5.x86_64.rpm
  openwsman-client-2.2.3.9-4.1.7.el5.x86_64.rpm
  openwsman-server-2.2.3.9-4.1.7.el5.x86_64.rpm
  sblim-sfcb-1.3.7-4.13.1.el5.x86_64.rpm
  sblim-sfcc-2.2.1-4.7.1.el5.x86_64.rpm
 
  [root@localhost x86_64]# rpm -ivh libcmpiCppImpl0-2.0.0Dell-4.1.6.el5.x86_64.rpm
  [root@localhost x86_64]# rpm -ivh libwsman1-2.2.3.9-4.1.7.el5.x86_64.rpm  openwsman-client-2.2.3.9-4.1.7.el5.x86_64.rpm
 
  [root@localhost1 x86_64]# rpm -ivh sblim-sfcb-1.3.7-4.13.1.el5.x86_64.rpm
  [root@localhost x86_64]# rpm -ivh sblim-sfcc-2.2.1-4.7.1.el5.x86_64.rpm
  [root@localhost x86_64]# rpm -ivh openwsman-server-2.2.3.9-4.1.7.el5.x86_64.rpm
 
  [root@localhost supportscripts]# pwd
  /root/linux/supportscripts
  [root@localhost supportscripts]# ./srvadmin-install.sh -x
  [root@localhost ~]# vim /etc/snmp/snmpd.conf
  

  

  [root@xxxx supportscripts]# ./srvadmin-services.sh start
  Starting Systems Management Device Drivers:
  Starting dell_rbu:                                         [  OK  ]
  Starting ipmi driver:                                      [  OK  ]
  Starting Systems Management Data Engine:
  Starting dsm_sa_datamgrd:                                  [  OK  ]
  Starting dsm_sa_eventmgrd:                                 [  OK  ]
  Starting dsm_sa_snmpd:                                     [  OK  ]
  Starting DSM SA Shared Services:                           [  OK  ]
 
  Starting DSM SA Connection Service:                        [  OK  ]
  [root@anagios libexec]# ./check_openmanage  -H 被监控服务ip
  OK - System: \'PowerEdge R720xd\', SN: \'FTLxxxxx2\', 8 GB ram (2 dimms), 14 logical drives, 12 physical drives
  可以通過web方式訪問Openmanage管理頁面
  在IE中输入https://服务器IP:1311,用操作系统的用户名和密码登陆即可正常访问管理。
 
  
  指定IP地址访问SNMP
  [root@localhost supportscripts]# vim /etc/snmp/snmpd.conf
  #       sec.name  source          community
  com2sec notConfigUser  [監控主機]      public
 
  [root@localhost supportscripts]# /etc/init.d/snmpd restart
  Stopping snmpd:                                            [  OK  ]
  Starting snmpd:                                            [  OK  ]
 
  

 

 
Esx系统安装agent
  esxcli software vib install –d  /<离线安装包.zip>(一定要绝对路径)
  

 

  ~ # esxcli system snmp set -e true

  ~ # esxcli system snmp set -t 服务器IP地址@162/public
  ~ # esxcli system snmp get
  

  

  常用SNMP命令:
  esxcli system snmp -help #帮助命令
  esxcli system snmp get #获取配置
  esxcli system snmp set <参数> <参数值>
  esxcli system snmp set -r #重置
 
  esx测试 esxcli software vib list |grep hp
  /etc # esxcli software vib list |grep hp
  char-hpcru                     5.0.6.6-1OEM.500.0.0.434156           Hewlett-Packard  PartnerSupported  2014-11-19
  char-hpilo                     500.9.0.2.3-1OEM.500.0.0.434156       Hewlett-Packard  PartnerSupported  2014-11-19
  hp-ams                         500.10.0.1-07.434156                  Hewlett-Packard  PartnerSupported  2014-11-19
  hp-esxi-fc-enablement          500.2.1.8-434156                      Hewlett-Packard  PartnerSupported  2014-11-19
  hp-smx-limited                 500.03.06.00.21-434156                Hewlett-Packard  VMwareAccepted    2014-11-19
  ata-pata-hpt3x2n               0.3.4-3vmw.510.0.0.799733             VMware           VMwareCertified   2013-09-18
  scsi-hpsa                      5.0.0-21vmw.510.0.0.799733            VMware           VMwareCertified   2013-09-18
 
异常参考
  ERROR: (SNMP) OpenManage is not installed or is not working correctly
  Windows
  导致异常:先安装OMSA再安装SNMP
  解决方法:卸载OMSA重新安装一次,要先安装SNMP再安装OMSA
 
  Linux
  sed -r -i \'s/^(SNMP)=disable$/\\1=enable/\' /opt/dell/srvadmin/etc/srvadmin-omilcore/install.ini
 
  rm /opt/dell/srvadmin/var/lib/srvadmin-deng/dcsnmp.off
 
  srvadmin-services.sh restart
 
  service snmpd restart
  
 

以上是关于(Nagios)-check_openmanage[Dell]的主要内容,如果未能解决你的问题,请参考以下文章

监控三剑客之Nagios监控服务器

监控三剑客之Nagios监控服务器

Nagios图像绘制插件PNP4Nagios部署和测试

Nagios 简介

linux环境中nagios(nagios core)安装?nagios安装?

nagios 监控