nagios监控系统搭建!!
作者 佚名技术
来源 Linux系统
浏览
发布时间 2012-05-15
近段时间一直在研究nagios监控系统,借鉴了不少高手的文章,费了不少功夫总算把它搞定了,以下就是具体的安装过程,更深层的监控项目还有待进一步研究,希望大家给点建设!!
#===========================安装 Nagios ======================================== cd /opt groupadd nagios groupadd nagcmd useradd nagios -g nagcmd -d /usr/local/nagios chown nagios.nagios /usr/local/nagios/ chmod 755 /usr/local/nagios wget [url]http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-3.0.2.tar.gz[/url] tar -zxvf nagios-3.0.2.tar.gz cd nagios-3.0.2 ./configure --with-command-group=nagcmd make all make install make install-init make install-config make install-commandmode /usr/local/apache2/bin/htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin #编辑httpd.conf配置文件 ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin" <Directory "/usr/local/nagios/sbin"> # SSLRequireSSL Options ExecCGI AllowOverride None Order allow,deny Allow from all # Order deny,allow # Deny from all # Allow from 127.0.0.1 AuthName "Nagios Access" AuthType Basic AuthUserFile /usr/local/nagios/etc/htpasswd.users Require valid-user </Directory> Alias /nagios "/usr/local/nagios/share" <Directory "/usr/local/nagios/share"> # SSLRequireSSL Options None AllowOverride None Order allow,deny Allow from all # Order deny,allow # Deny from all # Allow from 127.0.0.1 AuthName "Nagios Access" AuthType Basic AuthUserFile /usr/local/nagios/etc/htpasswd.users Require valid-user </Directory> #重启apache killall httpd #============================安装nagios plugins========================= cd /opt wget [url]http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.11.tar.gz[/url] tar -zxvf nagios-plugins-1.4.11.tar.gz cd nagios-plugins-1.4.11 ./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-gourp=nagios --with-mysql=/usr/local/mysql5/ --enable-perl-modules make make install #配置和启动nagios /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg #如果提示“Whoops! Error: Could not read object configuration data! ”,这是没有启动nagios后台进程,执行以下命令 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg #=============================安装nrpe 插件============================== #对远程一台linux主机进行监控 #监控服务器上安装设置 cd /opt wget [url]http://www.mirrors.wiretapped.net/security/network-monitoring/nagios/nrpe-2.8.1.tar.gz[/url] #监控主机上安装方法 tar -zxvf nrpe-2.8.1.tar.gz cd nrpe-2.8.1 ./configure make all make install make install-plugin ---监控机需要安装check_nrpe这个插件,被监控机并不需要 ########################################################################## #被监控主机上安装方法 cd /opt useradd nagios -d /usr/local/nagios chown nagios.nagios /usr/local/nagios/ tar -zxvf nagios-plugins-1.4.11.tar.gz cd nagios-plugins-1.4.11 ./configure --enable-perl-modules --with-ping-command=ping make make install cd /opt tar -zxvf nrpe-2.8.1.tar.gz cd nrpe-2.8.1 ./configure make all make install make install-plugin make ins |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
上一篇: Linux系统守护进程详解下一篇: fenghao.cn给你一些学习LINUX的建议
关于nagios监控系统搭建!!的所有评论