×

微信扫一扫,快捷登录!

Nagios的安装与配置(1)

标签: 暂无标签
本帖最后由monicazhang于2015-10-3021:42编辑

20151030淡然





Nagios的安装与配置






安装环境
环境说明:
监控机centos6.2x86_64
ip为172.26.188.201
被监控机centos6.2x86_64
ip为172.26.188.202

所用软件包:
nagios-3.4.1.tar.gz
nagios-plugins-1.4.16.tar.gz
nrpe-2.13.tar.gz
pnp4nagios-0.6.19.tar.gz
nagios的安装创建nagios用户
#useraddnagios
#mkdir/usr/local/nagios
#chown–Rnagios.nagios/usr/local/nagios


安装apache
php
#yuminstallhttpd
#yuminstallphpphp-mysqlphp-mbstringphp-gd*nagios配置


安装Nagios
#tar-zxvfnagios-3.4.1.tar.gz
#cdnagios
#./configure--prefix=/usr/local/nagios
#makeall
#makeinstall
#makeinstall-init
#makeinstall-commandmode
#makeinstall-config
Nagios目录介绍
Nagios安装完成后,各个目录结构以及功能说明如下表所示:


安装
plugins插件
这里下载的版本是nagios-plugins-1.4.16。
注意:插件版本与nagios版本的关联并不大。
#tar–zxvfnagios-plugins-1.4.16.tar.gz
#cdnagios-plugins-1.4.16
#./configure--prefix=/usr/local/nagios
#make
#makeinstall
安装完成,在/usr/local/nagios下的libexec目录下,生成很多可执行文件,这些正是nagios所需要的插件。


安装
nrpe
#tar-zxvfnrpe-2.13.tar.gz
#cdnrpe-2.13
#./configure--prefix=/usr/local/nagios
#makeall
#makeinstall-plugin


安装
pnp4nagios-
0.6.6插件
#tar-zxvfpnp4nagios-0.6.19.tar.gz监控软件
#cdpnp4nagios-0.6.19
#
./configure--with-nagios-user=nagios--with-nagios-group=nagios
#makeall
#makeinstall
#makeinstall-webconf#makeinstall-config#makeinstall-init创建配置文件#cd/usr/local/pnp4nagios/etc#cpmisccommands.cfg-samplemisccommands.cfg#cpnagios.cfg-samplenagios.cfg#cprra.cfg-samplerra.cfg#cdpages#cpweb_traffic.cfg-sampleweb_traffic.cfg#cd../check_commands#cpcheck_all_local_disks.cfg-samplecheck_all_local_disks.cfg#cpcheck_nrpe.cfg-samplecheck_nrpe.cfg#cpcheck_nwstat.cfg-samplecheck_nwstat.cfg重启服务#/etc/init.d/npcdrestart修改nagios的配置文件.打开performance_data#vi/usr/local/nagios/etc/nagios.cfg打开注释nagios实施项:process_performance_data=1host_perfdata_command=process-host-perfdataservice_perfdata_command=process-service-perfdata修改commands.cfg#vi/usr/local/nagios/etc/objects/commands.cfg##添加#'process-host-perfdata'commanddefinitiondefinecommand{command_nameprocess-host-perfdatacommand_line/usr/local/pnp4nagios/libexec/process_perfdata.pl}#'process-service-perfdata'commanddefinitiondefinecommand{command_nameprocess-service-perfdatacommand_line/usr/local/pnp4nagios/libexec/process_perfdata.plnagios培训







待续:http://www.ITILxf.com/thread-53043-1-1.html
本帖关键字:Nagios





上一篇:Nagios分析文档(4)
下一篇:Nagios的安装与配置(2)
monicazhang

写了 2297 篇文章,拥有财富 12859,被 21 人关注

您需要登录后才可以回帖 登录 | 立即注册
B Color Link Quote Code Smilies

成为第一个吐槽的人

Powered by IT 运维管理
返回顶部