Chinaunix首页 | 论坛 | 博客
  • 博客访问: 361021
  • 博文数量: 36
  • 博客积分: 570
  • 博客等级: 中士
  • 技术积分: 1042
  • 用 户 组: 普通用户
  • 注册时间: 2011-09-08 20:53
文章分类
文章存档

2015年(1)

2014年(1)

2013年(14)

2012年(10)

2011年(10)

分类: LINUX

2012-07-08 15:34:56

1. apache, php

若是非rpm包安装,在编译安装nagios时注意加上 --with-httpd-conf的参数

2. 安装nagios

新建 nagios用户和nagcmd用户组

nagios和运行apache的用户加入到nagcmd里去

configure

make all

make install

make install-init

make install-config

make install-commandmode

make install-webconf


添加web的管理员账号:

htpasswd -c /usr/local/nagios/etc/htcpasswd.users

chkconfig nagios on

/etc/init.d/nagios start


3.安装nagios-plugin

没什么特别的,编译安装

./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios


4. 安装nrpe

需要openssl的支持,所以先安装openssl openssl-devel

./configure

make all

make install-plugin

make install-daemon

make install-daemon-config

make install-xinetd


添加服务端口:

/etc/services

nrpe 5666/tcp #nrpe


chkconfig nrpe on

/etc/init.d/xinetd restart


到此nagios服务器端安装完毕


5. 被监控系统安装 nagios-plugin nrpe

安装同上

最后在/etc/xinetd.d/nrpe 添加

 only_from = 127.0.0.1 nagios_ip

 

6 配置nagios

创建 hosts.cfg hostgroup.cfg service.cfg Define config files' depend yourself


service.cfg 定义的服务里

check_command check_nrpe!check_load


这里的check_load是定义在被监控系统上的


是在 被监控系统的/usr/local/nagios/etc/nrpe.cfg 中定义的


command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20

阅读(2528) | 评论(0) | 转发(2) |
给主人留下些什么吧!~~