目录
目录 ..................................................................................................................................................1
Nagios 的安装和配置 ......................................................................................................................2
一、安装环境 ..................................................................................................................................2
1 、操作系统 ..........................................................................................................................2
2 、安装包 ..............................................................................................................................2
3 、机器环境 ..........................................................................................................................2
二、nagios 安装 ..............................................................................................................................2
1、安装 nagios 主程序 ............................................................................................................2
1.1 创建用户并且设定权限:........................................................................................2
1.2 编译安装 ...................................................................................................................3
1.3 验证是否安装成功....................................................................................................4
2 、安装插件 ..........................................................................................................................5
2.1 编译安装 ...................................................................................................................5
2.2 将 apache 的运行用户加到 nagios 组 ......................................................................5
2.3 修改 apache 配置 .......................................................................................................6
2.4 增加验证用户............................................................................................................7
2.5 查看认证文件的内容................................................................................................7
3 、 典型配置 ........................................................................................................................7
3.1 预备知识 ...................................................................................................................7
3.2 修改配置文件............................................................................................................8
3.3 然后检查配置文件是否出错....................................................................................8
3.4 修改 CGI 脚本控制文件 cgi.cfg...............................................................................9
3.5 配置各种配置文件....................................................................................................9
4 、使用命令和插件监控更多信息.............................................................................13
5 、用 NRPE 监控 LINUX 上的”本地信息” ..........................................................16
5.1 增加用户 .................................................................................................................16
5.2 安装 nagios 插件 .....................................................................................................16
5.3 安装 nrpe.................................................................................................................17
5.4 安装 xinetd 脚本......................................................................................................19
5.5 测试 NRPE 是否则正常工作 .................................................................................20
5.6 在运行 nagios 的监控主机上 .................................................................................22
三 、监控 windows 主机 ..............................................................................................................24
1 、被监控的 windows xp 客户端的配置 ...........................................................................24
1.1 下载 NSClient++......................................................................................................24
2、监控端主机的设置(Nagios 服务器) ..................................................................24
附件 1:hosts.cfg...................................................................................................................28
附件 2:service.cfg................................................................................................................29