发布于 2015-05-28 21:59:10 | 319 次阅读 | 评论: 1 | 来源: PHPERZ

这里有新鲜出炉的精品教程,程序狗速度看过来!

Nagios Linux平台下网络监视工具

Nagios是一款开源的免费网络监视工具,能有效监控Windows、Linux和Unix的主机状态,交换机路由器等网络设置,打印机等。在系统或服务状态异常时发出邮件或短信报警第一时间通知网站运维人员,在状态恢复后发出正常的邮件或短信通知。


一、启动时报错

“Starting nagios:This account is currently not available”

解决方法:

修改/etc/passwd

将/sbin/nologin改成/bin/bash

二、nagios安装好后,网页访问出现如下错误:

无权查看任何主机的信息。

请检查HTTP服务器关于该CGI的访问权限设置。

解决办法:

vi /usr/local/nagios/etc/cgi.cfg

将use_authentication的值改为0.

use_authentication=0

然后重启nagios服务

service nagios restart

还有可能:

配置文件中的hostname和service_description使用了中文。

建议hostname和service_description 不要使用中文

三、访问时出现乱码

一般是apache 配置文件的编码问题

解决方法:

vim /usr/local/apache2/conf/

最后添加AddDefaultCharset utf-8

四、出现  The requested URL /nagios/cgi-bin/statusmap.cgi was not found on this server错误

解决方法:

确定安装gd-devel包

然后回到解压目录,

#make   clean

重新编译安装一下

# ./configure --with-gd-lib=/usr/lib --with-gd-inc=/usr/include

接下来

#./configure --with-command-group=nagcmd

#make all;

make install;

make install-init;

make install-config;

make install-commandmode;

makeinstall-webconf

五、查看nagios.log日志出现如下错误:

ndomod: Could not open data sink!  I'll keep trying, but some output may get lost...

解决思路:

# vim /usr/local/nagios/etc/ndo2db.cfg

ndo2db_user=nagios

ndo2db_group=nagcmd

注意第二个,ndo2db的所属组,是nagcmd.因为前面系统加的用户nagios是nagcmd组的.



最新网友评论  共有(1)条评论 发布评论 返回顶部
ytqxw 发布于2016-01-05 09:29:59
爱死你了
支持(0)  反对(0)  回复

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务