I just installed nagios 3 on ubuntu desktop 8.10 and cannot find the windows.cfg file. Here is what I find in the documentation:
[blockquote]Prerequisites
The first time you configure Nagios to monitor a Windows machine, you’ll need to do a bit of extra work. Remember, you only need to do this for the first Windows machine you monitor.
Edit the main Nagios config file.
vi /usr/local/nagios/etc/nagios.cfg
Remove the leading pound (#) sign from the following line in the main configuration file:
#cfg_file=/usr/local/nagios/etc/objects/windows.cfg
[/blockquote]
But with the install there is no /usr/local/nagios folder, everything is in /etc/nagios3. And there are config file in the conf.d folder, but no sample windows.cfg. Can anyone tell me if I need to create one, and if so, give me an example, or if it’s located somewhere else?
You don’t really need it. Just create your own.
something like this:
###############################################################################
WINDOWS servers - SAMPLE CONFIG FILE FOR MONITORING A WINDOWS MACHINE
Last Modified: 10-27-2008
NOTES: This config file assumes that you are using the sample configuration
files that get installed with the Nagios quickstart guide.
###############################################################################
###############################################################################
###############################################################################
HOST DEFINITIONS
###############################################################################
###############################################################################
Define a host for the Windows machine we’ll be monitoring
Change the host_name, alias, and address to fit your situation
define host{
use windows-server ; Inherit default values from a template
host_name S22 ; The name we’re giving to this host
alias S22 ; A longer name associated with the host
address 192.168.168.22 ; IP address of the host
parents sonicwall_3500_primary,sonicwall_3500_secondary
hostgroups windows-servers-2003
}
###############################################################################
###############################################################################
HOST GROUP DEFINITIONS
###############################################################################
###############################################################################
Define a hostgroup for Windows machines
All hosts that use the windows-server template will automatically be a member of this group
define hostgroup{
hostgroup_name windows-servers-2003 ; The name of the hostgroup
alias Windows Servers 2003; Long name of the group
}
###############################################################################
###############################################################################
SERVICE DEFINITIONS
###############################################################################
###############################################################################
define service{
use generic-service ; Inherit values from a template
hostgroups windows-servers-2003 ; The name of XXXXXXXX
service_description PING ; The service description
check_command check_ping!200.0,20%!600.0,60% ; The command used to monitor the service
normal_check_interval 5 ; Check the service every 5 minutes under normal conditions
retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined
}