Thanks for the update, as mentioned by you, my default template.cfg is in the path, "/usr/local/nagios/etc/objects/template.cfg." The default host definition is intact and uncommented. No " # " in any part of the file. Is there any alternate way to cross check the configuration, am i specifying anything wrong in the configuration. Do tell me if you require any .cfg file from me to verify.
---------- Original message ----------
From:Christopher McAtackney< email@example.com >
Date: 12 May 09 14:54:05
Subject: Re: [Nagios-users] Problem in configuring NSClient ++
To: Sundar V S
2009/5/12 Sundar V S
> I configured NSClient on Windows server, as menitoned in Nagios
> Documentation. Now, when i restarted the Nagios service on my Nagios Server,
> i gave me the following error,
> Stopping nagios: No lock file found in /usr/local/nagios/var/nagios.lock
> When i started the nagios service it gave,
> Starting nagios:CONFIG ERROR! Start aborted. Check your Nagios
> I tried to verify the nagios configuration it gave me the below error.
> Nagios 3.0.6
> Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
> Last Modified: 12-01-2008
> License: GPL
> Reading configuration data...
> Error: Template 'windows-server' specified in host definition could not be
> not found (config file '/usr/local/nagios/etc/objects/windows.cfg', starting
> on line 25)
> ***> 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.
> Can anyone guide me whats going wrong in my configuration. I followed all
> the steps mentioned in NSCLient++ site. I want to montior my Windows Server
> (10.180.117.172) on my Nagios Server (10 .180.117.171) having OS RHEL 4.
> Please help.
Check your etc/objects/templates.cfg file and make sure that the
following default template is defined;
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
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 admins ; Notifications get sent to the admin s by default
hostgroups windows-servers ; Host groups that Windows servers should
be a member of
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
This should be there by default, but it sounds like your configuration
is missing this definition for some reason. It may be commented out by
default, I can't remember - but if so, just uncomment it.