没有合适的资源?快使用搜索试试~ 我知道了~
nagios监控软件的基本安装配置介绍,包括安装的每一步,可以看看
资源详情
资源评论
资源推荐
NAGIOS 基本安装配置介绍
作者:不死鸟
QQ 群:19481624
特点介绍
安装配置介绍
1、nagios 安装
2、nagios-plguin 安装
3、nagios.cfg、cgi.cfg、创建 web 验证用户
4、contacts.cfg、host.cfg、services.cfg、timeperiod.cfg、command
本章的主要内容用一个例子进行讲解
1、主要环境如下:
主机名
操作系统
IP
作用
nagios.tianway.net
RHEL 5
192.168.0.1
监控机
Web1.tianway.net
RHEL5
192.168.0.2
被监控机
Web2.tianway.net
RHEL 5
192.168.0.3
被监控机
Web3.tianway.net
RHEL 5
192.168.0.4
被监控机
2、监控内容
主机名
要监控的服务
nagios.tianway.net
是否活动
是否开启 ssh
磁盘使用情况
web1.tianway.net
是否活动
是否开启 ssh
磁盘使用情况
是否开启 web
cpu 负载
swap 分区使用情况
主进程数
蓝色表示外部服务,即不需要登陆到服务器即可进行检测的服务,绿色字体表示内部服务,必
须登陆到服务器才能获取到相关的信息。
3、架构图
当前登陆用户
僵尸进程数
web2.tianway.net
是否活动
是否开启 ssh
是否开启 web
磁盘使用情况
cpu 负载
swap 分区使用情况
主进程数
当前登陆用户
僵尸进程数
web3.tianway.net
是否活动
是否开启 ssh
是否开启 web
磁盘使用情况
cpu 负载
swap 分区使用情况
主进程数
当前登陆用户
僵尸进程数
第一节 nagios 基本安装
软件获取
[root@nagios ~]#wget http://www.nagios.com/naigos.3.6.tar.gz
解压缩
[root@nagios ~]# tar xzvf nagios-3.0.6.tar.gz
[root@nagios ~]# cd nagios-3.0.6
编译
[root@nagios nagios-3.0.6]# ./configure --prefix=/usr/local/nagios/
输出如下信息:
*** Configuration summary for nagios 3.0.6 12-01-2008 ***:
General Options:
-------------------------
Nagios executable: nagios
Nagios user/group: nagios,nagios
Command user/group: nagios,nagios
Embedded Perl: no
Event Broker: yes
Install ${prefix}: /usr/local/nagios/
Lock file: ${prefix}/var/nagios.lock
Check result directory: ${prefix}/var/spool/checkresults
Init directory: /etc/rc.d/init.d
Apache conf.d directory: /etc/httpd/conf.d
Mail program: /bin/mail
Host OS: linux-gnu
Web Interface Options:
------------------------
HTML URL: http://localhost/nagios/
CGI URL: http://localhost/nagios/cgi-bin/
Traceroute (used by WAP): /bin/traceroute
Review the options above for accuracy. If they look okay,
type 'make all' to compile the main program and CGIs.
根据输出信息的提示执行:
[root@nagios nagios-3.0.6]# make all
输出如下信息:
*** Compile finished ***
If the main program and CGIs compiled without any errors, you
can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):
安装 nagios 主程序、CGI 和 HTML 文件
make install
- This installs the main program, CGIs, and HTML files
安装 nagios 的启动脚本,目录是/etc/rc.d/init.d
make install-init
- This installs the init script in /etc/rc.d/init.d
安装外部命令使用的目录,并配置目录权限
make install-commandmode
- This installs and configures permissions on the
directory for holding the external command file
安装样板配置文件,位于/usr/local/nagios//etc 目录下
make install-config
- This installs *SAMPLE* config files in /usr/local/nagios//etc
You'll have to modify these sample files before you can
use Nagios. Read the HTML documentation for more info
on doing this. Pay particular attention to the docs on
object configuration files, as they determine what/how
things get monitored!
安装 apache 配置文件,以便能够通过 web 页面访问 nagios
make install-webconf
- This installs the Apache config file for the Nagios
web interface
*** Support Notes *******************************************
If you have questions about configuring or running Nagios,
please make sure that you:
- Look at the sample config files
- Read the HTML documentation
- Read the FAQs online at http://www.nagios.org/faqs
before you post a question to one of the mailing lists.
Also make sure to include pertinent information that could
help others help you. This might include:
- What version of Nagios you are using
- What version of the plugins you are using
- Relevant snippets from your config files
- Relevant error messages from the Nagios log file
For more information on obtaining support for Nagios, visit:
http://www.nagios.org/support/
*************************************************************
Enjoy.
根据输出结果依次执行如下命令:
[root@nagios nagios-3.0.6]# make install
cd ./base && make install
make[1]: Entering directory `/root/nagios-3.0.6/base'
make install-basic
make[2]: Entering directory `/root/nagios-3.0.6/base'
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios//bin
/usr/bin/install: invalid user `nagios'
make[2]: *** [install-basic] Error 1
make[2]: Leaving directory `/root/nagios-3.0.6/base'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/root/nagios-3.0.6/base'
make: *** [install] Error 2
可以看出出错原因是没有 nagios 用户,我们现在创建 nagios 用户,并重新进行安装
[root@nagios nagios-3.0.6]# useradd nagios
[root@nagios nagios-3.0.6]# make install
执行完毕,如下提示:*** Main program, CGIs and HTML files installed ***
You can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):
make install-init
- This installs the init script in /etc/rc.d/init.d
make install-commandmode
- This installs and configures permissions on the
directory for holding the external command file
剩余23页未读,继续阅读
luxinjun
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0