nagios服务配置
作者 佚名技术
来源 Linux系统
浏览
发布时间 2012-04-29
lease 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@localhost /usr/local/src/nagios-3.2.0]# ====================================== 安装二进制运行程序、初始化脚本、配置文件样本并设置运行目录权限 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 make install-config - This installs sample config files in /usr/local/nagios/etc make[1]: Leaving directory `/usr/local/src/nagios-3.2.0'' [root@localhost /usr/local/src/nagios-3.2.0]# ===================================== make install-init make install-config make install-commandmode 现在还不能启动Nagios-还有一些要做的... 4)客户化配置 样例配置文件默认安装在这个目录下/usr/local/nagios/etc,这些样例文件可以配置Nagios使之正常运行,只需要做一个简单的修改... 用你擅长的编辑器软件来编辑这个/usr/local/nagios/etc/objects/contacts.cfg配置文件,更改email地址nagiosadmin的联系人定义信息中的EMail信息为你的EMail信息以接收报警内容. vi /usr/local/nagios/etc/objects/contacts.cfg 5)配置WEB接口 安装Nagios的WEB配置文件到Apache的conf.d目录下
make install-webconf 创建一个nagiosadmin的用户用于Nagios的WEB接口登录.记下你所设置的登录口令,一会儿你会用到它. htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin 重启Apache服务以使设置生效. service httpd restart 6)编译并安装Nagios插件 展开Nagios插件的源程序包 cd ~/downloads tar xzf nagios-plugins-1.4.11.tar.gz cd nagios-plugins-1.4.11 编译并安装插件 ./configure --with-nagios-user=nagios --with-nagios-group=nagios make make install 7)启动Nagios 把Nagios加入到服务列表中以使之在系统启动时自动启动 chkconfig --add nagios chkconfig nagios on 验证Nagios的样例配置文件 /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg 如果没有报错,可以启动Nagios服务 service nagios start 8)更改SELinux设置 Fedora与SELinux(安全增强型Linux)同步发行与安装后将默认使用强制模式.这会在你尝试联入Nagios的CGI时导致一个"内部服务错误"消息. 如果是SELinux处于强制安全模式时需要做 getenforce 令SELinux处于容许模式 setenforce 0 如果要永久性更变它,需要更改/etc/selinux/config里的设置并重启系统. 不关闭SELinux或是永久性变 |
||
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
上一篇: Linux双网卡绑定一个IP,实现容错或负载均衡。下一篇: linux 下挂载光驱
关于nagios服务配置的所有评论