全部博文(36)
分类: LINUX
2012-08-03 10:23:46
Linux平台
1. 在Linux上安装 ProLiantSupportPack
以64位CentOS 6.2为例
wget
下载 repo文件:
sh bootstrap.sh ProLiantSupportPack -a x86_64 -d RHEL -r 6.2Server
安装以下包
yum clean all
yum makecache
yum install hp-health
yum install hpacucli
下载安装 nagios-plugin
./configure –prefix=/usr/local/nagios –with-nagios-user=nagios –with-nagios-group=nagios
make
make install
下载安装 nrpe
./configure –prefix=/usr/local/nagios
Make all
Make install-plugin
Make install-daemon
Make install-daemon-config
如果要以超级进程的方式启动则需要:
Make install-xinetd
在/etc/services 添加下一行:
nrpe 5666/tcp # nrpe
/etc/xinetd.d/nrpe:
加入监控主机的地址
Only_from = 127.0.0.0 nagios_server_ip
chkconfig nrpe on
/etc/init.d/xinetd restart
下载安装 check_hpasm
./configure prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-degrees=celsius --enable-hpacucli --enable-hwinfo --enable-extendedinfo --enable-perfdata
make
make install
配置 nrpe
/usr/local/nagios/etc/nrpe.cfg
command[check_hp_hardware]=/usr/local/nagios/libexec/check_hpasm --perfdata short
iptable开放 tcp 5666端口
将nagios用户加入到 wheel组
Gpasswd –a nagios wheel
编辑sudo配置文件
Visudo
将下一行的注释去掉
%wheel ALL=(ALL) NOPASSWD: ALL
将下一行加上注释
Defaults requiretty
Nagios 服务器上配置
定义主机、定义服务