配置nagios出現的錯誤
一、nagios 配置過程中驗證環節出現下面錯誤
[root@node1 ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 3.4.3
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 11-30-2012
License: GPL
Website:
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/localhost.cfg'...
Read object config files okay...
Running pre-flight check on configuration data...
Checking services...
Error: Contact group 'admins' specified in service 'Current Load' for host 'node1' is not defined anywhere!
Error: Contact group 'admins' specified in service 'Current Users' for host 'node1' is not defined anywhere!
Error: Contact group 'admins' specified in service 'HTTP' for host 'node1' is not defined anywhere!
Error: Contact group 'admins' specified in service 'PING' for host 'node1' is not defined anywhere!
Error: Contact group 'admins' specified in service 'Root Partition' for host 'node1' is not defined anywhere!
Error: Contact group 'admins' specified in service 'SSH' for host 'node1' is not defined anywhere!
Error: Contact group 'admins' specified in service 'Swap Usage' for host 'node1' is not defined anywhere!
Error: Contact group 'admins' specified in service 'Total Processes' for host 'node1' is not defined anywhere!
Checked 8 services.
Checking hosts...
Error: Contact group 'node1' specified in host 'node1' is not defined anywhere!
Checked 1 hosts.
Checking host groups...
Checked 1 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 24 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 9
***> One or more problems was encountered while running the pre-flight check...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
根據上面的提示做如下處理
將templates.cfg配置中的admins組更改為contact.cfg中定義的contactgroup_name ts
[root@node1 objects]# vi contacts.cfg
define contactgroup{
contactgroup_name ts
alias Nagios Administrators
members david
}
define host{
name windows-server ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, Windows servers are monitored round the clock
check_interval 5 ; Actively check the server every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each server 10 times (max)
check_command check-host-alive ; Default command to check if servers are "alive"
notification_period 24x7 ; Send notification out at any time - day or night
notification_interval 30 ; Resend notifications every 30 minutes
notification_options d,r ; Only send notifications for specific host states
contact_groups ts ; Notifications get sent to the admins by default
hostgroups windows-servers ; Host groups that Windows servers should be a member of
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
}
重新執行驗證命令,透過驗證
[root@node1 ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 3.4.3
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 11-30-2012
License: GPL
Website:
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/localhost.cfg'...
Read object config files okay...
Running pre-flight check on configuration data...
Checking services...
Checked 8 services.
Checking hosts...
Checked 1 hosts.
Checking host groups...
Checked 1 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 24 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
二、重啟apache服務出現如下錯誤
[root@node1 ~]# /usr/local/apache2/bin/apachectl start
httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.10.101 for ServerName
處理 在httpd.conf新增下面一行
[root@node1 conf]# pwd
/usr/local/apache2/conf
[root@node1 conf]# vi httpd.conf
ServerName localhost:80
[root@node1 conf]# /usr/local/apache2/bin/apachectl restart
[root@node1 conf]# pwd
apache服務重新啟動,錯誤解決
[root@node1 ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 3.4.3
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 11-30-2012
License: GPL
Website:
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/localhost.cfg'...
Read object config files okay...
Running pre-flight check on configuration data...
Checking services...
Error: Contact group 'admins' specified in service 'Current Load' for host 'node1' is not defined anywhere!
Error: Contact group 'admins' specified in service 'Current Users' for host 'node1' is not defined anywhere!
Error: Contact group 'admins' specified in service 'HTTP' for host 'node1' is not defined anywhere!
Error: Contact group 'admins' specified in service 'PING' for host 'node1' is not defined anywhere!
Error: Contact group 'admins' specified in service 'Root Partition' for host 'node1' is not defined anywhere!
Error: Contact group 'admins' specified in service 'SSH' for host 'node1' is not defined anywhere!
Error: Contact group 'admins' specified in service 'Swap Usage' for host 'node1' is not defined anywhere!
Error: Contact group 'admins' specified in service 'Total Processes' for host 'node1' is not defined anywhere!
Checked 8 services.
Checking hosts...
Error: Contact group 'node1' specified in host 'node1' is not defined anywhere!
Checked 1 hosts.
Checking host groups...
Checked 1 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 24 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 9
***> One or more problems was encountered while running the pre-flight check...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
根據上面的提示做如下處理
將templates.cfg配置中的admins組更改為contact.cfg中定義的contactgroup_name ts
[root@node1 objects]# vi contacts.cfg
define contactgroup{
contactgroup_name ts
alias Nagios Administrators
members david
}
define host{
name windows-server ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, Windows servers are monitored round the clock
check_interval 5 ; Actively check the server every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each server 10 times (max)
check_command check-host-alive ; Default command to check if servers are "alive"
notification_period 24x7 ; Send notification out at any time - day or night
notification_interval 30 ; Resend notifications every 30 minutes
notification_options d,r ; Only send notifications for specific host states
contact_groups ts ; Notifications get sent to the admins by default
hostgroups windows-servers ; Host groups that Windows servers should be a member of
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
}
重新執行驗證命令,透過驗證
[root@node1 ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 3.4.3
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 11-30-2012
License: GPL
Website:
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/localhost.cfg'...
Read object config files okay...
Running pre-flight check on configuration data...
Checking services...
Checked 8 services.
Checking hosts...
Checked 1 hosts.
Checking host groups...
Checked 1 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 24 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
二、重啟apache服務出現如下錯誤
[root@node1 ~]# /usr/local/apache2/bin/apachectl start
httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.10.101 for ServerName
處理 在httpd.conf新增下面一行
[root@node1 conf]# pwd
/usr/local/apache2/conf
[root@node1 conf]# vi httpd.conf
ServerName localhost:80
[root@node1 conf]# /usr/local/apache2/bin/apachectl restart
[root@node1 conf]# pwd
apache服務重新啟動,錯誤解決
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29108064/viewspace-1088909/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- GetDlgItem() 出現錯誤Git
- Flutter 最常出現的典型錯誤Flutter
- Opencv出現detecMultiScale錯誤OpenCV
- 埠占用出現的不同的錯誤:
- 裝nagios報You don't have permission to access /nagios/ on this server. 錯誤iOSServer
- Laravel 出現 419 錯誤Laravel
- AS打包出現app:transformClassesAndResourcesWithProguardForRelease錯誤APPORM
- 使用 sudo 命令出現錯誤
- FTP出現426錯誤FTP
- scp出現錯誤的解決辦法
- 編譯EJB出現錯誤的解決編譯
- nginx出現403錯誤的解決方法Nginx
- 執行Bex 出現 61704 錯誤
- Servlet訪問WebService出現錯誤ServletWeb
- mysql,出現同步停止的錯誤的處理MySql
- IOS 配置錯誤的BUGiOS
- Springboot中配置動態sql查詢出現的錯誤syntax error, expect ‘)‘Spring BootSQLError
- Qt專案移動時出現的錯誤QT
- DBV驗證ASM裡的datafile,出現錯誤ASM
- sql出現結果集錯誤以及出現ora-600或者ora-7445錯誤的解決方法思路SQL
- android 打包出現錯誤Error: ResourceNameAndroidError
- 網路連線出現意外錯誤
- 執行jdonMVC示例出現了錯誤MVC
- eclispe 出現超記憶體錯誤Lisp記憶體
- sloaris 出現“mount: I/O error”錯誤Error
- 經常出現 HTTP Status 500 -錯誤HTTP
- DBCA建庫出現CHMOD NOT FOUND錯誤
- JDBC 連oracle 時出現錯誤,,求助???JDBCOracle
- jboss+mysql+hibernate 出現錯誤!!!!!!!MySql
- vsftp出現500 OOPS錯誤FTPOOP
- 配置Oracle11gR2 Datagurad出現ORA-10458錯誤Oracle
- xcode 編譯opencv ios容易出現的錯誤XCode編譯OpenCViOS
- jbuilder編譯jive出現的錯誤,高手幫忙!!UI編譯
- jdon到最後出現的錯誤..如何解決
- ubuntu sudoers配置錯誤Ubuntu
- Oracle ASM 配置錯誤OracleASM
- git push出現Permission denied (publickey)錯誤Git
- Qt5.3 列印示例時出現錯誤QT