nagios 安装问题解析
2012-12-18 17:15
134 查看
1、安装时检查文件配置的正确性:#/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
如出现以下错误:
Error: Service notification command ‘notify-by-email’ specified for contact ‘sery’ is not defined anywhere!
Error: Host notification command ‘host-notify-by-email’ specified for contact ‘sery’ is not defined anywhere!
请在commands.cfg中加入如下内容:
# ‘notify-host-by-email’ command definition
define command{
command_name host-notify-by-email
command_line /usr/bin/printf “%b” “***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:$HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n” | /bin/mail
-s “** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **” $CONTACTEMAIL$
}
# ’service_notification_commands’ command definition
define command{
command_name service-notify-by-email
command_line /usr/bin/printf “%b” “***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$” | /bin/mail -s “** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **” $CONTACTEMAIL$
}
2、如果提示“You don't have permission to access /nagios on this server”
有可能是没有配置好php
#yum install -y php
3、The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
--------------------------------------------------------------------------------
Apache/2.0.52 (CentOS) Server at mail1.chinabank.com.cn Port 80
可能是apache打开了suexec功能,将其关闭:#setenforce 0
4、如果提示“Whoops! Error: Could not read host and service status information”,有可能是权限问题,
解决办法是,将整个nagios目录权限分配给nagios用户:
#chown -R nagios:nagcmd nagios/
5、如果提示“Whoops! Error: Could not read object configuration data! ”,这是因为没有启动nagios后台进程,执行以下命令
#/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
--------------------------------------------------------------------------------------------
版权所有,转载请注明作者及原文链接,否则追究法律责任!
QQ: 584307876
作者: Seven
原文链接: /article/2133503.html
邮箱: seven_ginna@foxmail.com
如出现以下错误:
Error: Service notification command ‘notify-by-email’ specified for contact ‘sery’ is not defined anywhere!
Error: Host notification command ‘host-notify-by-email’ specified for contact ‘sery’ is not defined anywhere!
请在commands.cfg中加入如下内容:
# ‘notify-host-by-email’ command definition
define command{
command_name host-notify-by-email
command_line /usr/bin/printf “%b” “***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:$HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n” | /bin/mail
-s “** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **” $CONTACTEMAIL$
}
# ’service_notification_commands’ command definition
define command{
command_name service-notify-by-email
command_line /usr/bin/printf “%b” “***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$” | /bin/mail -s “** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **” $CONTACTEMAIL$
}
2、如果提示“You don't have permission to access /nagios on this server”
有可能是没有配置好php
#yum install -y php
3、The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
--------------------------------------------------------------------------------
Apache/2.0.52 (CentOS) Server at mail1.chinabank.com.cn Port 80
可能是apache打开了suexec功能,将其关闭:#setenforce 0
4、如果提示“Whoops! Error: Could not read host and service status information”,有可能是权限问题,
解决办法是,将整个nagios目录权限分配给nagios用户:
#chown -R nagios:nagcmd nagios/
5、如果提示“Whoops! Error: Could not read object configuration data! ”,这是因为没有启动nagios后台进程,执行以下命令
#/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
--------------------------------------------------------------------------------------------
版权所有,转载请注明作者及原文链接,否则追究法律责任!
QQ: 584307876
作者: Seven
原文链接: /article/2133503.html
邮箱: seven_ginna@foxmail.com
相关文章推荐
- nagios 安装问题解析
- spark sql on hive安装问题解析
- 配置安装Nagios启动apache时出现问题解决方法
- rstudio安装devtool出现“无法解析服务器的名称或地址”问题的解决
- Nagios安装部署、错误详细解析与Cacti整合文档超精细版本
- Nagios详解(基础、安装、配置文件解析及监控实例)
- android开发生成apk后在真机上安装出错-提示解析包出现问题和无法安装
- 虚拟机中安装vmtools工具的命令和相关问题解析
- DNS安装步骤及解析问题
- 安装软件时出现解析包出现问题是什么原因
- Nagios安装、配置、问题记录
- nagios安装教程 错误解析 注意事项
- matlab2014b安装libsvm遇到的问题解析
- nagios安装遇到的问题及解决
- nagios安装过程中遇到的问题
- 解决Linux下yum安装无法解析URL的问题
- Nagios安装、配置、问题记录
- vCenter Server 5的安装问题:域控上解析完全限定域名(FQDN)
- Ubuntu中安装samba服务器创建文件共享的方法及普通用户设置共享的问题解析
- android 开发 程序中下载安装APK文件 问题汇总 解析程序包时出现问题