diff -urN ../nagios.orig/base/notifications.c ./base/notifications.c
--- ../nagios.orig/base/notifications.c	2005-11-24 12:18:41.000000000 +0100
+++ ./base/notifications.c	2005-11-24 13:11:59.000000000 +0100
@@ -1116,6 +1116,17 @@
 #endif
 		return ERROR;
 	        }
+
+	/* See if enough time has elapsed since the host went down */
+	if(current_time < (hst->last_hard_state_change + hst->first_notification_delay*interval_length)){
+		if(hst->current_state==HOST_DOWN || hst->current_state==HOST_UNREACHABLE){
+#ifdef DEBUG4
+			printf("\tEnough time has not elapsed since the host went DOWN or UNREACHABLE so we should not notify about this yet!\n");
+#endif
+			return ERROR;
+	        	}
+		}
+
 	if(hst->current_state==HOST_UP){
 
 		if(hst->notify_on_recovery==FALSE){
diff -urN ../nagios.orig/cgi/config.c ./cgi/config.c
--- ../nagios.orig/cgi/config.c	2005-11-18 14:06:08.000000000 +0100
+++ ./cgi/config.c	2005-11-24 13:11:59.000000000 +0100
@@ -458,6 +458,7 @@
 	printf("<TH CLASS='data'>Freshness Threshold</TH>\n");
 	printf("<TH CLASS='data'>Default Contact Groups</TH>\n");
 	printf("<TH CLASS='data'>Notification Interval</TH>");
+	printf("<TH CLASS='data'>First Notification Delay</TH>");
 	printf("<TH CLASS='data'>Notification Options</TH>");
 	printf("<TH CLASS='data'>Notification Period</TH>");
 	printf("<TH CLASS='data'>Event Handler</TH>");
@@ -544,6 +545,8 @@
 		get_interval_time_string(temp_host->notification_interval,time_string,sizeof(time_string));
 		printf("<TD CLASS='%s'>%s</TD>\n",bg_class,(temp_host->notification_interval==0)?"<i>No Re-notification</I>":time_string);
 
+		printf("<TD CLASS='%s'>%d</TD>\n",bg_class,temp_host->first_notification_delay);
+
 		printf("<TD CLASS='%s'>",bg_class);
 		options=0;
 		if(temp_host->notify_on_down==TRUE){
diff -urN ../nagios.orig/common/objects.c ./common/objects.c
--- ../nagios.orig/common/objects.c	2005-11-24 12:16:58.000000000 +0100
+++ ./common/objects.c	2005-11-24 14:49:24.000000000 +0100
@@ -922,7 +922,7 @@
 
 
 /* add a new host definition */
-host *add_host(char *name, char *alias, char *address, char *check_period, int check_interval, int max_attempts, int notify_up, int notify_down, int notify_unreachable, int notify_flapping, int notification_interval, char *notification_period, int notifications_enabled, char *check_command, int checks_enabled, int accept_passive_checks, char *event_handler, int event_handler_enabled, int flap_detection_enabled, double low_flap_threshold, double high_flap_threshold, int stalk_up, int stalk_down, int stalk_unreachable, int process_perfdata, int failure_prediction_enabled, char *failure_prediction_options, int check_freshness, int freshness_threshold, int retain_status_information, int retain_nonstatus_information, int obsess_over_host){
+host *add_host(char *name, char *alias, char *address, char *check_period, int check_interval, int max_attempts, int notify_up, int notify_down, int notify_unreachable, int notify_flapping, int notification_interval, int first_notification_delay, char *notification_period, int notifications_enabled, char *check_command, int checks_enabled, int accept_passive_checks, char *event_handler, int event_handler_enabled, int flap_detection_enabled, double low_flap_threshold, double high_flap_threshold, int stalk_up, int stalk_down, int stalk_unreachable, int process_perfdata, int failure_prediction_enabled, char *failure_prediction_options, int check_freshness, int freshness_threshold, int retain_status_information, int retain_nonstatus_information, int obsess_over_host){
 	host *temp_host;
 	host *new_host;
 #ifdef NSCORE
@@ -1008,6 +1008,15 @@
 		return NULL;
 	        }
 
+	if(first_notification_delay<0){
+#ifdef NSCORE
+		snprintf(temp_buffer,sizeof(temp_buffer)-1,"Error: Invalid first_notification_delay value for host '%s'\n",name);
+		temp_buffer[sizeof(temp_buffer)-1]='\x0';
+		write_to_logs_and_console(temp_buffer,NSLOG_CONFIG_ERROR,TRUE);
+#endif
+		return NULL;
+	        }
+
 	if(notify_up<0 || notify_up>1){
 #ifdef NSCORE
 		snprintf(temp_buffer,sizeof(temp_buffer)-1,"Error: Invalid notify_up value for host '%s'\n",name);
@@ -1313,6 +1322,7 @@
 	new_host->contact_groups=NULL;
 	new_host->check_interval=check_interval;
 	new_host->notification_interval=notification_interval;
+	new_host->first_notification_delay=first_notification_delay;
 	new_host->notify_on_recovery=(notify_up>0)?TRUE:FALSE;
 	new_host->notify_on_down=(notify_down>0)?TRUE:FALSE;
 	new_host->notify_on_unreachable=(notify_unreachable>0)?TRUE:FALSE;
@@ -1485,6 +1495,7 @@
 	printf("\tNotify On Unreachable:    %s\n",(new_host->notify_on_unreachable==1)?"yes":"no");
 	printf("\tNotify On Recovery:       %s\n",(new_host->notify_on_recovery==1)?"yes":"no");
 	printf("\tNotification Interval:    %d\n",new_host->notification_interval);
+	printf("\tFirst Notification Delay: %d\n",new_host->first_notification_delay);
 	printf("\tNotification Time Period: %s\n",(new_host->notification_period==NULL)?"N/A":new_host->notification_period);
 #endif
 #ifdef DEBUG0
diff -urN ../nagios.orig/html/docs/xodtemplate.html ./html/docs/xodtemplate.html
--- ../nagios.orig/html/docs/xodtemplate.html	2005-11-18 14:06:09.000000000 +0100
+++ ./html/docs/xodtemplate.html	2005-11-24 13:23:31.000000000 +0100
@@ -154,6 +154,7 @@
 <tr><td></td><td class="Required">notification_period</td><td class="Required"><i>timeperiod_name</i></td></tr>
 <tr><td></td><td class="Required">notification_options</td><td class="Required">[d,u,r,f]</td></tr>
 <tr><td></td><td class="Optional">notifications_enabled</td><td class="Optional">[0/1]</td></tr>
+<tr><td></td><td class="Optional">first_notifiation_delay</td><td class="Optional">#</td></tr>
 <tr><td></td><td class="Optional">stalking_options</td><td class="Optional">[o,d,u]</td></tr>
 
 <tr><td>&nbsp;&nbsp;&nbsp;</td><td colspan=2 class="Definition">}</td></tr>
@@ -350,6 +351,16 @@
 </td>
 </tr>
 <tr>
+<td valign="top"><strong>first_notification_delay</strong>:</td>
+This directive can be used to delay the first host notification. Nagios runs
+all the hostchecks serially (ie, it starts the next hostcheck attempt as soon
+as the first is finished). This option creates, for notification purposes,
+the illusion that hostchecks are scheduled just like servicechecks by delaying
+the first notification of the host <strong>first_notification_delay *
+interval_length</strong> seconds.
+</td>
+</tr>
+<tr>
 <td valign="top"><strong>stalking_options</strong>:</td>
 <td>
 This directive determines which host states "stalking" is enabled for.  Valid options are a combination of one or more of the following: <b>o</b> = stalk on UP states, <b>d</b> = stalk on DOWN states, and <b>u</b> = stalk on UNREACHABLE states.  More information on state stalking can be found <a href="stalking.html">here</a>.
diff -urN ../nagios.orig/include/objects.h ./include/objects.h
--- ../nagios.orig/include/objects.h	2005-11-24 12:16:59.000000000 +0100
+++ ./include/objects.h	2005-11-24 13:11:59.000000000 +0100
@@ -123,6 +123,7 @@
 	char    *event_handler;
 	contactgroupsmember *contact_groups;
 	int     notification_interval;
+	int	first_notification_delay;
 	int	notify_on_down;
 	int	notify_on_unreachable;
 	int     notify_on_recovery;
@@ -515,7 +516,7 @@
 contact *add_contact(char *,char *,char *,char *,char **,char *,char *,int,int,int,int,int,int,int,int,int);	/* adds a contact definition */
 commandsmember *add_service_notification_command_to_contact(contact *,char *);				/* adds a service notification command to a contact definition */
 commandsmember *add_host_notification_command_to_contact(contact *,char *);				/* adds a host notification command to a contact definition */
-host *add_host(char *,char *,char *,char *,int,int,int,int,int,int,int,char *,int,char *,int,int,char *,int,int,double,double,int,int,int,int,int,char *,int,int,int,int,int);	/* adds a host definition */
+host *add_host(char *,char *,char *,char *,int,int,int,int,int,int,int,int,char *,int,char *,int,int,char *,int,int,double,double,int,int,int,int,int,char *,int,int,int,int,int);	/* adds a host definition */
 hostsmember *add_parent_host_to_host(host *,char *);							/* adds a parent host to a host definition */
 contactgroupsmember *add_contactgroup_to_host(host *,char *);					        /* adds a contactgroup to a host definition */
 timeperiod *add_timeperiod(char *,char *);								/* adds a timeperiod definition */
diff -urN ../nagios.orig/xdata/xodtemplate.c ./xdata/xodtemplate.c
--- ../nagios.orig/xdata/xodtemplate.c	2005-11-24 12:17:00.000000000 +0100
+++ ./xdata/xodtemplate.c	2005-11-24 13:11:59.000000000 +0100
@@ -1246,6 +1246,8 @@
 		new_host->have_notifications_enabled=FALSE;
 		new_host->notification_interval=-2;
 		new_host->have_notification_interval=FALSE;
+		new_host->first_notification_delay=0;
+		new_host->have_first_notification_delay=FALSE;
 		new_host->stalk_on_up=FALSE;
 		new_host->stalk_on_down=FALSE;
 		new_host->stalk_on_unreachable=FALSE;
@@ -2799,6 +2801,10 @@
 			temp_host->notification_interval=atoi(value);
 			temp_host->have_notification_interval=TRUE;
 		        }
+		else if(!strcmp(variable,"first_notification_delay")){
+			temp_host->first_notification_delay=atoi(value);
+			temp_host->have_first_notification_delay=TRUE;
+		        }
 		else if(!strcmp(variable,"stalking_options")){
 			for(temp_ptr=strtok(value,", ");temp_ptr;temp_ptr=strtok(NULL,", ")){
 				if(!strcmp(temp_ptr,"o") || !strcmp(temp_ptr,"up"))
@@ -6032,6 +6038,10 @@
 		this_host->notification_interval=template_host->notification_interval;
 		this_host->have_notification_interval=TRUE;
 	        }
+	if(this_host->have_first_notification_delay==FALSE && template_host->have_first_notification_delay==TRUE){
+		this_host->first_notification_delay=template_host->first_notification_delay;
+		this_host->have_first_notification_delay=TRUE;
+	        }
 	if(this_host->have_stalking_options==FALSE && template_host->have_stalking_options==TRUE){
 		this_host->stalk_on_up=template_host->stalk_on_up;
 		this_host->stalk_on_down=template_host->stalk_on_down;
@@ -8024,7 +8034,7 @@
 		this_host->address=strdup(this_host->host_name);
 
 	/* add the host definition */
-	new_host=add_host(this_host->host_name,this_host->alias,(this_host->address==NULL)?this_host->host_name:this_host->address,this_host->check_period,this_host->check_interval,this_host->max_check_attempts,this_host->notify_on_recovery,this_host->notify_on_down,this_host->notify_on_unreachable,this_host->notify_on_flapping,this_host->notification_interval,this_host->notification_period,this_host->notifications_enabled,this_host->check_command,this_host->active_checks_enabled,this_host->passive_checks_enabled,this_host->event_handler,this_host->event_handler_enabled,this_host->flap_detection_enabled,this_host->low_flap_threshold,this_host->high_flap_threshold,this_host->stalk_on_up,this_host->stalk_on_down,this_host->stalk_on_unreachable,this_host->process_perf_data,this_host->failure_prediction_enabled,this_host->failure_prediction_options,this_host->check_freshness,this_host->freshness_threshold,this_host->retain_status_information,this_host->retain_nonstatus_information,this_host->obsess_over_host);
+	new_host=add_host(this_host->host_name,this_host->alias,(this_host->address==NULL)?this_host->host_name:this_host->address,this_host->check_period,this_host->check_interval,this_host->max_check_attempts,this_host->notify_on_recovery,this_host->notify_on_down,this_host->notify_on_unreachable,this_host->notify_on_flapping,this_host->notification_interval,this_host->first_notification_delay,this_host->notification_period,this_host->notifications_enabled,this_host->check_command,this_host->active_checks_enabled,this_host->passive_checks_enabled,this_host->event_handler,this_host->event_handler_enabled,this_host->flap_detection_enabled,this_host->low_flap_threshold,this_host->high_flap_threshold,this_host->stalk_on_up,this_host->stalk_on_down,this_host->stalk_on_unreachable,this_host->process_perf_data,this_host->failure_prediction_enabled,this_host->failure_prediction_options,this_host->check_freshness,this_host->freshness_threshold,this_host->retain_status_information,this_host->retain_nonstatus_information,this_host->obsess_over_host);
 
 #ifdef TEST_DEBUG
 	printf("HOST: %s, MAXATTEMPTS: %d, NOTINVERVAL: %d \n",this_host->host_name,this_host->max_check_attempts,this_host->notification_interval);
@@ -9472,6 +9482,7 @@
 		fprintf(fp,"\n");
 		fprintf(fp,"\tnotifications_enabled\t%d\n",temp_host->notifications_enabled);
 		fprintf(fp,"\tnotification_interval\t%d\n",temp_host->notification_interval);
+		fprintf(fp,"\tfirst_notification_delay\t%d\n",temp_host->first_notification_delay);
 		fprintf(fp,"\tstalking_options\t");
 		x=0;
 		if(temp_host->stalk_on_up==TRUE)
diff -urN ../nagios.orig/xdata/xodtemplate.h ./xdata/xodtemplate.h
--- ../nagios.orig/xdata/xodtemplate.h	2005-11-24 12:17:00.000000000 +0100
+++ ./xdata/xodtemplate.h	2005-11-24 13:11:59.000000000 +0100
@@ -175,6 +175,7 @@
 	int       notifications_enabled;
 	char      *notification_period;
 	int       notification_interval;
+	int       first_notification_delay;
 	int       stalk_on_up;
 	int       stalk_on_down;
 	int       stalk_on_unreachable;
@@ -198,6 +199,7 @@
 	int       have_notification_options;
 	int       have_notifications_enabled;
 	int       have_notification_interval;
+	int       have_first_notification_delay;
 	int       have_stalking_options;
 	int       have_process_perf_data;
 	int       have_failure_prediction_enabled;
