Hi all,
i had configured nagios server and nagios hosts however i am stuck with an error, to verify Nagios Configuration files for any errors.
command:- /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
current output of above command:-
Nagios Core 4.0.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-15-2013
License: GPL
Website:
http://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Unexpected token or statement in file '/usr/local/nagios/etc/services.cfg' on line 1.
Error processing object config files!
***> 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.
Desired output should be :- Total Warnings: 0
Total Errors: 0
##################################################
Nagios server configuration:
IP:- 192.168.180.185
hostname:- server.example.com
domainname:- example.com
Nagios Client configuration
IP:- 192.168.180.186
hostname:- client.example.com
domainname:- example.com
####################################################
hosts.cfg file on nagios server is:
## Default Linux Host Template ##
define host{
name linux-box ; Name of this template
use generic-host ; Inherit default values
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 10
check_command check-host-alive
notification_period 24x7
notification_interval 30
notification_options d,r
contact_groups admins
register 0 ; DONT REGISTER THIS - ITS A TEMPLATE
}
## Default
define host{
use linux-box ; Inherit default values from a template
host_name client.example.com ; The name we're giving to this server
alias client.example.com ; A longer name for the server
address 192.168.180.186 ; IP address of Remote Linux host
}
kindly help me to resolve this problem....
one question hosts.cfg and services.cfg file created on nagios server or nagios host.....jst for confirmation.
Thanks
Anil