ImageVerifierCode 换一换
格式:DOCX , 页数:57 ,大小:765.90KB ,
资源ID:6567258      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bingdoc.com/d-6567258.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(Nagios29详细安装攻略Word格式.docx)为本站会员(b****4)主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(发送邮件至service@bingdoc.com或直接QQ联系客服),我们立即给予删除!

Nagios29详细安装攻略Word格式.docx

1、再说报警功能,如果监控系统发现问题不能报警那就没有意义了,所以报警也是nagios很重要的功能之一。但是,同样的,nagios自身也没有报警部分的代码,甚至没有插件,而是交给用户或者其他相关开源项目组去完成。nagios安装,是指基本平台,也就是nagios软件包的安装。它是监控体系的框架,也是所有监控的基础。打开nagios官方的文档,会发现nagios基本上没有什么依赖包,只要求系统是linux或者其他nagios支持的系统。不过如果你没有安装apache(http服务),那么你就没有那么直观的界面来查看监控信息了,所以apache姑且算是一个前提条件。关于apache的安装,网上有很多,

2、照着安装就是了。安装之后要检查一下是否可以正常工作。原文链接url3.Nagios定义的监控状态nagios定义了4中监控状态,代表不同的严重级别,除了OK代表正常不用关心外,其余3种都要引起重视.如下表状态代码颜色正常OK绿色,警告WARNING黄色,严重CRITICAL红色,未知错误UNKOWN深黄色4.所用软件nagios-2.9.tar.gznagios-plugins-1.4.9.tar.gznrpe-2.8.1.tar.gzNSClient+-0.2.7.zip前三个的下载地址:urlhttp:/www.nagios.org/url,后一个的url5.总体目标学习嘛,总要有个目标,

3、很简单,就是看到下面这张图具体信息如下表要监控的服务是否活动是否开启ftp磁盘使用情况是否开启sshcpu负载swap分区使用情况主进程数当前登陆用户僵尸进程数是否开启80端口是否启动W3SVC服务内存使用情况运行时间NSClient客户端版本(NSClient是一个windows下的nagios客户端)C盘使用情况D盘使用情况explorer进程运行情况其中蓝色字体的服务是外部服务,也就是说不需要登陆被监控机,直接在外部就可以进行检查.例如我们需要检查被监控机是否打开80端口,就可以在别的一台机器上telnet被监控机的80端口即可.绿色字体表示是内部服务,意思是必须登陆到被监控机上才能查看

4、.因为它们属于”本地信息”(nagios将之称为LOCAL).很容易理解,你不登陆到被监控机上,如何知道当前磁盘的使用情况呢?nagios是不是很强大,基本上对监控对象的任何信息都可以一手掌握了.而且不用登陆到目的机就可以看到那台机器私密的”本地信息”,比木马还厉害啊.但是别误会,这可不是什么木马.nagios有着十分安全的措施.这确实是一个庞大的工程,你想想这还只是三台机器而已都已经监控这么多服务了,那要是多个几十台怎么办,不用紧张,从现在开始,跟我动手吧.家庭作业,将所用的软件下载好,配置好监控机192.168.0.111上的apache.二.基本安装和配置本部分主要参考官方文档和田逸的文

5、章来修改完成.最后达到如下的功能监控机自身的信息,包括主机信息以及对外提供的服务被监控机对外提供的服务如下所有的操作都在监控机192.168.0.111上进行1.安装nagios主程序解压缩tar -zxvf nagios-2.9.tar.gzcd nagios-2.9编译,指定安装目录为/usr/local/nagios./configure -prefix=/usr/local/nagios输出如下信息* Configuration summary for nagios 2.9 04-10-2007 *:General Options:-Nagios executable:nagiosNa

6、gios user/group:nagios,nagiosCommand user/group:Embedded Perl:noEvent Broker:yesInstall $prefix:/usr/local/nagiosLock file:$prefix/var/nagios.lockInit directory:/etc/rc.d/init.dHost OS:linux-gnuWeb Interface Options:-HTML URL:/localhost/nagios/urlCGI URL:/localhost/nagios/cgi-bin/urlTraceroute (used

7、 by WAP):/usr/sbin/tracerouteReview the options above for accuracy.If they look okay,type make all to compile the main program and CGIs.make all* Compile finished *If the main program and CGIs compiled without any errors, youcan continue with installing Nagios as follows (type makewithout any argume

8、nts for a list of all possible options):make install-This installs the main program, CGIs, and HTML files使用make install来安装主程序,CGI和HTML文件make install-initThis installs the init script in /etc/rc.d/init.d使用make install-init在/etc/rc.d/init.d安装启动脚本make install-commandmode- This installs and configures p

9、ermissions on thedirectory for holding the external command file使用make install-commandmode来配置目录权限make install-config- This installs *SAMPLE* config files in /usr/local/nagios/etcYoull have to modify these sample files before you canuse Nagios.Read the HTML documentation for more infoon doing this.Pa

10、y particular attention to the docs onobject configuration files, as they determine what/howthings get monitored!使用make install-commandmode来安装示例配置文件,安装的路径是/usr/local/nagios/etc.* Support Notes *If you have questions about configuring or running Nagios,please make sure that you:- Look at the sample co

11、nfig files- Read the HTML documentation- Read the FAQs online at urlhttp:/www.nagios.org/faqs/urlbefore you post a question to one of the mailing lists.Also make sure to include pertinent information that couldhelp others help you.This might include:- What version of Nagios you are using- What versi

12、on of the plugins you are using- Relevant snippets from your config files- Relevant error messages from the Nagios log fileFor more information on obtaining support for Nagios, visit:/www.nagios.org/support/url*Enjoy.很多人都不注意安装过程中的输出信息,直到make install出错了才到处找人求救,而实际上输出的内容包含很多有价值的信息,例如安装路径,版本,每一步做什么,接下来

13、的步骤等.尤其是输出的最后一屏信息,我个人建议好好的读一下.例如上面就列出了很多有价值的信息,我们只需要按照他说的做就行了.安装输出如下错误cd ./base & make installmake1: Entering directory /home/yahoon/nagios/nagios-2.9/basemake install-basicmake2:/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/bin/usr/bin/install:invalid user nagios非法用户nagios * i

14、nstall-basic Error 1 Leaving directory /home/yahoon/nagios/nagios-2.9/base * install Error 2make:按照文档说明增加用户,修改权限rootlocalhost nagios-2.9#useradd nagiosmkdir /usr/local/nagioschown nagios.nagios /usr/local/nagios查看目录权限rootlocalhost nagios-2.9# ll /usr/localdrwxr-sr-x2 nagiosnagios4096 Jul 10 11:14 na

15、gios看到nagios目录的权限已经被正确修改了重新执行make install输出信息如下* Main program, CGIs and HTML files installed *You can continue with installing Nagios as follows (type - This installs the init script in /etc/rc.d/init.d Leaving directory /home/yahoon/nagios/nagios-2.9执行如下命令来安装脚本执行输出信息如下/usr/bin/install -c -m 775 -o

16、nagios -g nagios -d /usr/local/nagios/var/rwchmod g+s /usr/local/nagios/var/rw* External command directory configured */usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc/usr/bin/install -c -m 664 -o nagios -g nagios sample-config/nagios.cfg /usr/local/nagios/etc/nagios.cfg-sampl

17、e/usr/bin/install -c -m 664 -o nagios -g nagios sample-config/cgi.cfg /usr/local/nagios/etc/cgi.cfg-sample/usr/bin/install -c -m 660 -o nagios -g nagios sample-config/resource.cfg /usr/local/nagios/etc/resource.cfg-sample/usr/bin/install -c -m 664 -o nagios -g nagios sample-config/template-object/lo

18、calhost.cfg /usr/local/nagios/etc/localhost.cfg-sample/usr/bin/install -c -m 664 -o nagios -g nagios sample-config/template-object/commands.cfg /usr/local/nagios/etc/commands.cfg-sample* Sample config file installed *Remember, these are *SAMPLE* config files.ll need to readthe documentation for more

19、 information on how to actually defineservices, hosts, etc. to fit your particular needs.If you have questions about configuring Nagios properly, please:*BEFORE* you post a question to one of the mailing lists.验证程序是否被正确安装。切换目录到安装路径(这里是/usr/local/nagios),看是否存在etc、bin、sbin、share、var这五个目录,如果存在则可以表明程序被正

20、确的安装到系统了。后表是五个目录功能的简要说明:binNagios执行程序所在目录,nagios文件即为主程序etcNagios配置文件位置,初始安装完后,只有几个*.cfg-sample文件sbinNagios Cgi文件所在目录,也就是执行外部命令所需文件所在的目录ShareNagios网页文件所在的目录VarNagios日志文件、spid等文件所在的目录var/archivesEmpty directory for thearchived logsvar/rwexternal command file2.安装插件tar -zxvf nagios-plugins-1.4.9.tar.gzc

21、d nagios-plugins-1.4.9编译,指定路径为之前nagios的安装路径./configure -prefix=/usr/local/nagios/makels /usr/local/nagios/libexec/会显示安装的插件文件,即所有的插件都安装在libexec这个目录下将apache的运行用户加到nagios组里面从httpd.conf中过滤出当前的apache运行用户grep User /usr/local/apache2/conf/httpd.conf我的是vpopmail,下面将这个用户加入nagios组usermod -G nagios vpopmail3.修改

22、apache配置修改apache的配置文件,增加nagios的目录,并且访问此目录需要进行身份验证vi /usr/local/apache2/conf/httpd.conf,在最后增加如下内容#setting for nagios 20070707ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbinDirectory /usr/local/nagios/sbinOptions ExecCGIAllowOverride NoneOrder allow,denyAllow from allAuthName Nagios AccessAuthType BasicAuthUserFile /usr/local/n

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2