Generate Nagios config
display this error:
Deployment not possible due to errors in configuration.
Code: Select all
Nagios Core 4.0.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 03-14-2014
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Service has no hosts and/or service_description (config file '/var/www/html/nconf/temp/Default_collector/advanced_services.cfg', starting on line 79)
Error processing object config files!
***> The name of the main configuration file looks suspicious...
Make sure you are specifying the name of the MAIN configuration file on
the command line and not the name of another configuration file. The
main configuration file is typically '/usr/local/nagios/etc/nagios.cfg'
***> One or more problems was encountered while processing the config files...
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.
Code: Select all
define service {
service_description PING
check_command check_ping!100.0,20%!500.0,60%
hostgroup_name linux-servers
use local-service
contact_groups +admins
}
define service {
service_description Current Users
check_command check_local_users!20!50
hostgroup_name linux-servers
use local-service
contact_groups +admins
}
define service {
service_description Total Processes
check_command check_local_procs!250!400!RSZDT
hostgroup_name linux-servers
use local-service
contact_groups +admins
}
define service {
service_description Current Load
check_command check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
hostgroup_name linux-servers
use local-service
contact_groups +admins
}
define service {
service_description Swap Usage
check_command check_local_swap!20!10
hostgroup_name linux-servers
use local-service
contact_groups +admins
}
define service {
service_description SSH
notifications_enabled 0
check_command check_ssh!
hostgroup_name linux-servers
use local-service
contact_groups +admins
}
define service {
service_description HTTP
notifications_enabled 0
check_command check_http!
hostgroup_name linux-servers
servicegroups web-services
use local-service
contact_groups +admins
}
define service {
service_description PING
check_interval 10
retry_interval 1
check_command check_ping!3000.0,80%!5000.0,100%
hostgroup_name network-printers
use generic-service
contact_groups +admins
}
define service {
service_description PING
check_interval 5
retry_interval 1
check_command check_ping!200.0,20%!600.0,60%
hostgroup_name switches
use generic-service
contact_groups +admins
}
define service {
service_description Uptime
check_command check_snmp!-C public -o sysUpTime.0
hostgroup_name switches
use generic-service
contact_groups +admins
}
define service {
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
hostgroup_name windows-servers
use generic-service
contact_groups +admins
}
define service {
service_description Uptime
check_command check_nt!UPTIME
hostgroup_name windows-servers
use generic-service
contact_groups +admins
}
define service {
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
hostgroup_name windows-servers
use generic-service
contact_groups +admins
}
define service {
service_description Memory Usage
check_command check_nt!MEMUSE!-w 80 -c 90
hostgroup_name windows-servers
use generic-service
contact_groups +admins
}
define service {
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
hostgroup_name windows-servers
use generic-service
contact_groups +admins
}
define service {
service_description Explorer
check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
hostgroup_name windows-servers
use generic-service
contact_groups +admins
}