本文所涉及插件及安装包下载地址:https://github.com/zhangrj/check_hpasm-hpasm-hphealth

一、工作原理概述

通过在惠普服务器安装hpasm/hp-health软件 (HP Advanced Server Management)监控服务器硬件状态,包括 硬盘、CPU、电源、风扇、温度和内存模块,nagios插件通过snmp协议获取这些信息。

二、安装nagios插件check_hpasm

直接拷贝文件check_hpasm至/usr/local/nagios/libexec/或者/usr/lib/nagios/plugins/。

三、安装hpasm/hp-health

hpasm在较新版本中被拆分为hp-health+hp-snmp-agents,可以认为hpasm=hp-health + hp-snmp-agents。

1、在suse9中,可安装hpasm,过程如下:

szmrc1:~ # rpm -ivh hpasm-7.2.0-198.sles9.i586.rpm
Preparing...                ########################################### [100%]1:hpasm                  ########################################### [100%]
Please read the Licence Agreement for this software at/opt/compaq/hpasm/hpasm.licenseBy not removing this package, you are accepting the terms
of the "License for HP Value Added Software".
==============================================================================
NOTE: In order to activate the software contained in this package, you musttype 'hpasm activate' as 'root' user.You may subsequently reset your agent configuration by typing'/etc/init.d/hpasm configure' or '/etc/init.d/hpasm reconfigure'.
==============================================================================
The hpasm RPM has installed successfully.

根据提示输入hpasm activate激活软件,然后输入/etc/init.d/hpasm configure完成相关配置。

2、在suse11中,可安装hp-health+hp-snmp-agents,过程如下:

SZMRC8:~ # rpm -ivh hp-health-10.30-1752.14.sles11.x86_64.rpm hp-snmp-agents-10.00-2654.35.sles11.x86_64.rpm net-snmp-5.4.2.1-8.12.6.1.x86_64.rpm perl-SNMP-5.4.2.1-8.12.6.1.x86_64.rpm
warning: hp-health-10.30-1752.14.sles11.x86_64.rpm: Header V3 RSA/SHA1 signature: NOKEY, key ID b1275ea3
warning: hp-snmp-agents-10.00-2654.35.sles11.x86_64.rpm: Header V3 RSA/SHA1 signature: NOKEY, key ID 5ce2d476
Preparing...                ########################################### [100%]1:hp-health              ########################################### [ 25%]
Please read the Licence Agreement for this software at/opt/hp/hp-health/hp-health.licenseBy not removing this package, you are accepting the terms
of the "HP Proliant Essentials Software End User License Agreement".Using Proliant High PerformanceIPMI based System Health MonitorUsing standard Linux IPMI device driver
Starting ipmi drivers:                                                doneStarting Proliant High PerformanceIPMI based System Health Monitor (hpasmxld): doneStarting HP Advanced Server Recovery Daemon                           done
The hp-health RPM has installed successfully.2:net-snmp               ########################################### [ 50%]
Updating etc/sysconfig/net-snmp...3:hp-snmp-agents         ########################################### [ 75%]
Please read the Licence Agreement for this software at/opt/hp/hp-snmp-agents/hp-snmp-agents.licenseBy not removing this package, you are accepting the terms
of the "HP Proliant Essentials Software End User License Agreement".
==============================================================================
NOTE: In order to activate the software contained in this package, you musttype '/sbin/hpsnmpconfig' as 'root' user.Once configuration is completed start the agents by typing/etc/init.d/hp-snmp-agents start
==============================================================================4:perl-SNMP              ########################################### [100%]

根据提示键入/sbin/hpsnmpconfig配置hp-snmp客户端,然后键入/etc/init.d/hp-snmp-agents启动客户端,不在赘述。

四、测试插件

在采集机上,测试check_hpasm能否正确获取监控数据,过程如下:

[root@centreon libexec]# ./check_hpasm --help
查看用法
[root@centreon libexec]# ./check_hpasm -H *.*.*.* -C snmp_community
OK - System: 'proliant bl460c g6', S/N: 'CNG001S3QZ', ROM: 'I24 10/01/2009', hardware working fine, da: 1 logical drives, 2 physical drives

如果不能取得数据,在排除网络不通的情况下,最可能的原因是161端口已被占用,导致snmpd使用了端口1611。在测试插件时指定端口为1611,观看能否取得监控数据。

正常情况下端口使用情况:

szmrc4:~ # netstat -ntplu|grep snmp
tcp        0      0 0.0.0.0:199             0.0.0.0:*               LISTEN      12323/snmpd
udp        0      0 127.0.0.1:25375         0.0.0.0:*                           12323/snmpd
udp        0      0 0.0.0.0:161             0.0.0.0:*                           12323/snmpd
udp        0      0 0.0.0.0:162             0.0.0.0:*                           12942/snmpagent
udp        0      0 0.0.0.0:163             0.0.0.0:*                           12942/snmpagent 

默认161端口无法获取数据时的端口使用情况:

szmrc5:/etc # netstat -nutpl|grep snmp
tcp        0      0 0.0.0.0:199             0.0.0.0:*               LISTEN      9822/snmpd
udp        0      0 127.0.0.1:25375         0.0.0.0:*                           9822/snmpd
udp        0      0 0.0.0.0:161             0.0.0.0:*                           14790/snmpagent
udp        0      0 0.0.0.0:162             0.0.0.0:*                           14790/snmpagent
udp        0      0 0.0.0.0:1611            0.0.0.0:*                           9822/snmpd

测试插件时指定端口为1611:

[root@centreon libexec]# ./check_hpasm -H *.*.*.* -C snmp_community --port 1611
OK - System: 'proliant bl460c g6', S/N: 'CNG001S3QZ', ROM: 'I24 10/01/2009', hardware working fine, da: 1 logical drives, 2 physical drives

五、Centreon中新建command

comand类型为check,Command Line为:

$USER4$/check_hpasm -H $HOSTADDRESS$  -C $ARG1$ --port $ARG2$ --perfdata=long

Argument Descriptions 描述如下:

ARG1 : snmp_community_string

其中$USER4$表示check_hpasm插件所在路径。如果snmp使用的端口为1611或其他,则Command Line改为:

$USER4$/check_hpasm -H $HOSTADDRESS$  -C $ARG1$ --port $ARG2$ --perfdata=long

Argument Descriptions 描述如下:

ARG1 : snmp_community_string
ARG2 : 1611

六、添加service

为被监控host添加service,check command选择第五步中新建的command,填入相关信息。

之后照例重启监控引擎,configuration-monitoring engines,选择poller, 
Restart Monitoring Engine 的method选择restart,勾选前四项,点击Export即可。

本文链接:http://www.icoder.top/blog/?p=805

使用Centreon监控HP惠普服务器硬件状态相关推荐

  1. 监控HP服务器cpu状态脚本

    监控HP服务器cpu状态脚本 脚本1(如有问题则发邮件通知): # vi cpu.sh 按a或i进入编辑模式 #!/bin/bash Name=`hostname` IP=`/sbin/ifconfi ...

  2. Nagios监控HP服务器的硬件状态

    Nagios监控HP服务器的硬件状态 安装环境:RHEL6 方法一: (1)       下载bootstrap.sh #wget http://downloads.linux.hp.com/SDR/ ...

  3. Nagios监控HP硬件状态

    Nagios监控HP硬件状态 一,监控思想 可以使用两种模式,check_nrpe方式和SNMP方式,这里我们采用SNMP代理方式. 两种方式都依赖HP的ProLiant Support Pack(P ...

  4. nagios(icinga)借助check_hp插件监控惠普服务器硬件信息

    nagios(icinga)借助check_hp插件监控惠普服务器硬件信息 http://cpan.metacpan.org/authors/id/D/DT/DTOWN/Net-SNMP-v6.0.1 ...

  5. linux查看服务器电源风扇,nagios监控vsphere ESXi主机硬件状态(CPU风扇、电源模块、硬盘、温度)...

    nagios监控vsphere ESXi主机硬件状态(CPU风扇.电源模块.硬盘.温度) esxi 的只读账户和密码(本文以chkhardware/chkreadonly为例) 插架下载地址,此地址附 ...

  6. Linux系统磁状态检测,检测Linux硬件状态

    计算机系统是由软件系统和硬件系统共同组成的.检测硬件状态对于保障整个系统的稳定是非常重要的.不论操作系统是使用Linux.还是Windows,一旦硬件出现故障,那么整个系统的安全就严重了.这里我们主要 ...

  7. 采用Opserver来监控你的ASP.NET项目系列(三、监控你的服务器状态)

    前言 之前有过2篇关于如何监控ASP.NET core项目的文章,有兴趣的也可以看看. ASP.NET Core之跨平台的实时性能监控 ASP.NET Core之跨平台的实时性能监控(2.健康检查) ...

  8. 亚马逊对货车司机“下手”了:实时监控车辆与司机状态并收集相关数据

    数据智能产业创新服务媒体 --聚焦数智 · 改变商业 用AI监控过自家员工的亚马逊,又一次对货车司机"下手"了. 据The Information报道,亚马逊已为其合作伙伴使用的卡 ...

  9. linux 监控网线拔掉,linux应用层监控网线插拔状态的实现.doc

    linux应用层监控网线插拔状态的实现 HYPERLINK "/sunzl1987/archive/2012/05/24/2516635.html"linux应用层监控网线插拔状态 ...

最新文章

  1. cad画流程图的插件_CAD制图太慢?62款辅助插件汇总,款款精品,效率提升80%
  2. 前端学习(2902):javascript浏览器的历史
  3. Linux学习笔记(一)------实操排雷
  4. springMVC rest风格
  5. Spring Boot————Spring Data JPA简介
  6. 风铃发卡网源码-可商用,支持个人码支付,当面付
  7. 爆料称三星Galaxy S22 Ultra或更名:融合Note系列实锤
  8. 最新版本科、硕士、博士的区别
  9. 2021全国研究生数学建模竞赛A题思路
  10. pyppeteer-比 selenium 更高效的爬虫利器
  11. 遗传算法MATLAB
  12. 营养电子秤控制板方案
  13. 怎么添加usb虚拟打印机端口_佳能LBP2900,夏普等特殊打印机使用教程
  14. 微商公社新兵连第六天
  15. 动画练习-360度旋转-animation
  16. 海康录制视频文件无法播放以及FFmpeg最新版下载
  17. hdu5855二分+最大流
  18. Unity 灯光及光照烘焙
  19. Android中关于涉及到金钱计算方面的工具类!
  20. 非常喜欢的一期《晓松奇谈》

热门文章

  1. “三天打鱼两天晒网”
  2. OpenGL 灰度图
  3. 中位数应用-货仓选址-纸牌均分-糖果传递-七夕祭
  4. 基于逻辑回归的鸢尾花分类
  5. ce修改植物大战僵尸阳光
  6. 区块链正在颠覆的18个行业
  7. Android之内嵌PDF预览
  8. 20172327 2017-2018-2 《程序设计与数据结构》第十一周学习总结
  9. Windows实用工具推荐
  10. OTT与IPTV的区别是什么?