diff -ur base/config.c base/config.c
--- base/config.c	2009-05-17 08:54:28.000000000 -0400
+++ base/config.c	2010-06-12 10:44:54.000000000 -0400
@@ -213,6 +213,8 @@
 extern int              debug_verbosity;
 extern unsigned long    max_debug_file_size;
 
+extern int              allow_empty_hostgroups;
+
 
 
 /******************************************************************/
@@ -1333,6 +1335,8 @@
 			continue;
 		else if(strstr(input,"precached_object_file=")==input)
 			continue;
+		else if(strstr(input,"allow_empty_hostgroups=")==input)
+			allow_empty_hostgroups=(atoi(value)>0)?TRUE:FALSE;
 
 		/* we don't know what this variable is... */
 		else{
diff -ur base/nagios.c base/nagios.c
--- base/nagios.c	2009-08-12 14:28:10.000000000 -0400
+++ base/nagios.c	2010-06-11 14:13:52.000000000 -0400
@@ -238,6 +238,8 @@
 int             date_format=DATE_FORMAT_US;
 char            *use_timezone=NULL;
 
+int             allow_empty_hostgroups=DEFAULT_ALLOW_EMPTY_HOSTGROUPS;
+
 int             command_file_fd;
 FILE            *command_file_fp;
 int             command_file_created=FALSE;
diff -ur include/nagios.h include/nagios.h
--- include/nagios.h	2008-12-14 09:52:23.000000000 -0500
+++ include/nagios.h	2010-06-11 14:13:52.000000000 -0400
@@ -133,6 +133,7 @@
 #define BASE_UPDATE_CHECK_RETRY_INTERVAL                        60*60*1  /* 1 hour base retry interval */
 #define UPDATE_CHECK_RETRY_INTERVAL_WOBBLE                      60*60*3  /* 3 hour wobble on top of base retry interval */
 
+#define DEFAULT_ALLOW_EMPTY_HOSTGROUPS                          0        /* Do not allow empty hostgroups by default */
 
 /******************* LOGGING TYPES ********************/
 
Only in nagios-3.2.0-max-export: remake.sh
diff -ur xdata/xodtemplate.c xdata/xodtemplate.c
--- xdata/xodtemplate.c	2009-06-16 23:57:21.000000000 -0400
+++ xdata/xodtemplate.c	2010-06-13 01:40:04.000000000 -0400
@@ -124,6 +124,8 @@
 
 int presorted_objects=FALSE;
 
+extern int allow_empty_hostgroups;
+
 /*
  * Macro magic used to determine if a service is assigned
  * via hostgroup_name or host_name. Those assigned via host_name
@@ -5180,6 +5182,7 @@
 	int result=OK;
 	xodtemplate_service *temp_service=NULL;
 	xodtemplate_memberlist *temp_memberlist=NULL;
+	xodtemplate_memberlist *temp_rejectlist=NULL;
 	xodtemplate_memberlist *this_memberlist=NULL;
 	char *host_name=NULL;
 	int first_item=FALSE;
@@ -5192,6 +5195,25 @@
 		if(temp_service->hostgroup_name==NULL && temp_service->host_name==NULL)
 			continue;
 
+		/* If hostgroup is not null and hostgroup has no members, check to see if */
+		/* allow_empty_hostgroups is set to 1 - if it is, continue without error  */
+		if(temp_service->hostgroup_name!=NULL){
+			if(xodtemplate_expand_hostgroups(&temp_memberlist,&temp_rejectlist,temp_service->hostgroup_name,temp_service->_config_file,temp_service->_start_line)==ERROR){
+				return ERROR;
+				}
+			else{
+				xodtemplate_free_memberlist(&temp_rejectlist);
+				if (temp_memberlist!=NULL){
+					xodtemplate_free_memberlist(&temp_memberlist);
+					}
+				else{
+					/* User is ok with hostgroup -> service mappings with no services */
+					if(allow_empty_hostgroups==1)
+						continue;				
+					}
+				}
+			}
+
 		/* skip services that shouldn't be registered */
 		if(temp_service->register_object==FALSE)
 			continue;
