windows-server template

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
tsmullins
Posts: 3
Joined: Tue Jun 26, 2012 10:19 am

windows-server template

Post by tsmullins »

Hello all,

Nagios is still new to me. We are using Nagios 3.4.1 to monitor Linux boxes just fine. Really need to monitor some Windows boxes as well. A template, I thought, had been defined in /objects/templates.cfg called windows server:

# Windows host definition template - This is NOT a real host, just a template!

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 admins ; 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
}

However when Nagios is restarted, we rcv this error message:

Error: Template 'windows-server' specified in host definition could not be not found (config file '/etc/nagios3/objects/windows.cfg', starting on line 25)
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Can someone please tell me what we are doing wrong?

Thanks
Shane
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: windows-server template

Post by agriffin »

Have you added templates.cfg to your main nagios.cfg?
Locked