详解Nagios 监控客户端的配置1.添加nagios用户[root@prdora1 ~]# useradd -s /sbin/nologin nagios2.安装Nagios的插件nagios-plugin[root@prdora1 src]# tar zxvf nagios-plugins-1.4.13.tar.gz[root@prdora1 src]# cd nagios-plugins-1.4.13[root@prdora1 nagios-plugins-1.4.13]# ./configure --enable-redhat-pthread-workaround注意:因为服务器是AS4.8的所以,添加了一个选项2.同服务器端安装nrpe 唯一的不同就是修改xinetd.d/nrpe 的时候在only_from 里只加入Nagios服务器的IP地址即可。3.修改文件所有者[root@prdora1 ~]# chown -R nagios:nagios /usr/local/nagios[root@prdora1 ~]# /etc/init.d/xinetd restart[] nrpe 布署puma /home/taohx/install_nagios/install_nagios.sh [] 图形pnp4nagios http://docs.pnp4nagios.org/pnp-0.4/start (文档)cd /usr/local/pnp4nagios/share######vim /usr/local/nagios/etc/objects/templates.cfg define host {?? name?????? host-pnp?? action_url /pnp4nagios/?host=$HOSTNAME$&srv=_HOST_?? register?? 0}define service {?? name?????? srv-pnp?? action_url /pnp4nagios/?host=$HOSTNAME$&srv=$SERVICEDESC$?? register?? 0}### 图形出错, http://ip/pnp4nagios/install.php 若apache rewite模块没有打开就会出错。。要改为?? ;action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
|
|