###############################################################################
# WINDOWS.CFG - SAMPLE CONFIG FILE FOR MONITORING A WINDOWS MACHINE
#
#
# 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       PortalApp1       ; The name we're giving to this host
		hostgroups		Portal-PROD-servers
        alias           PortalApp1  ; A longer name associated with the host
        address         152.38.30.109     ; IP address of the host
        contact_groups	portaladmin
		notifications_enabled	1
		}

		
define host{
        use             windows-server  ; Inherit default values from a template
        host_name       PortalSQL1       ; The name we're giving to this host
		hostgroups		Portal-PROD-servers
        alias           PortalSQL1  ; A longer name associated with the host
        address         152.38.30.108     ; IP address of the host
        contact_groups	portaladmin
		notifications_enabled	1
		}		


define host{
        use             windows-server  ; Inherit default values from a template
        host_name       PortalWeb1       ; The name we're giving to this host
		hostgroups		Portal-PROD-servers
        alias           PortalWeb1  ; A longer name associated with the host
        address         152.38.30.110     ; IP address of the host
        contact_groups	portaladmin
		notifications_enabled	1
		}		

		
###############################################################################
###############################################################################
#
# 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	Portal-PROD-servers	; The name of the hostgroup
	alias		Portal PROD Servers	; Long name of the group
	}	

###############################################################################
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
###############################################################################


# Create a service for monitoring the version of NSCLient++ that is installed
# Change the host_name to match the name of the host you defined above

define service{
	use			generic-service
	host_name		PortalApp1,PortalSQL1,PortalWeb1
	service_description	NSClient++ Version
	check_command		check_nt!CLIENTVERSION
	}


# Create a service for monitoring the uptime of the server
# Change the host_name to match the name of the host you defined above

define service{
	use			generic-service
	host_name		PortalApp1,PortalSQL1,PortalWeb1
	service_description	Uptime
	check_command		check_nt!UPTIME
	}



# Create a service for monitoring CPU load
# Change the host_name to match the name of the host you defined above

define service{
	use			generic-service
	host_name		PortalApp1,PortalSQL1,PortalWeb1
	service_description	CPU Load
	check_command		check_nt!CPULOAD!-l 5,80,90
	}



# Create a service for monitoring memory usage
# Change the host_name to match the name of the host you defined above

define service{
	use			generic-service
	host_name		PortalApp1,PortalSQL1,PortalWeb1
	service_description	Memory Usage
	check_command		check_nt!MEMUSE!-w 80 -c 90
	}



# Create a service for monitoring C:\ disk usage
# Change the host_name to match the name of the host you defined above

define service{
	use			generic-service
	host_name		PortalApp1,PortalSQL1,PortalWeb1
	service_description	C:\ Drive Space
	check_command		check_nt!USEDDISKSPACE!-l c -w 90 -c 95
	}

	
# Create a service for monitoring the W3SVC service
# Change the host_name to match the name of the host you defined above

define service{
	use			generic-service
	host_name		PortalApp1,PortalWeb1
	service_description	W3SVC
	check_command		check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
	}

# Create a service for SQL & Onbase services

define service{
	use			generic-service
	host_name		PortalSQL1
	service_description	SQL Server
	check_command		check_nt!SERVICESTATE!-d SHOWALL -l MSSQLSERVER
	}

define service{
	use			generic-service
	host_name		PortalSQL1
	service_description	SQL Server Agent
	check_command		check_nt!SERVICESTATE!-d SHOWALL -l SQLSERVERAGENT
	}
	
	