--- base/nagiostats.c.orig	2011-11-07 12:55:19.000000000 +0100
+++ base/nagiostats.c	2011-11-18 09:40:04.000000000 +0100
@@ -125,6 +125,7 @@
 int services_in_downtime = 0;
 int services_checked = 0;
 int services_scheduled = 0;
+int services_acknowledged = 0;
 int passive_host_checks = 0;
 int active_host_checks = 0;
 int hosts_up = 0;
@@ -134,6 +135,7 @@
 int hosts_in_downtime = 0;
 int hosts_checked = 0;
 int hosts_scheduled = 0;
+int hosts_acknowledged = 0;
 
 int passive_services_checked_last_1min = 0;
 int passive_services_checked_last_5min = 0;
@@ -350,6 +352,7 @@
 		printf(" NUMSVCPROB           number of service problems (WARNING, UNKNOWN or CRITIAL).\n");
 		printf(" NUMSVCCHECKED        number of services that have been checked since start.\n");
 		printf(" NUMSVCSCHEDULED      number of services that are currently scheduled to be checked.\n");
+		printf(" NUMSVCACKNOWLEDGED   number of down services that are currently acknowledged.\n");
 		printf(" NUMSVCFLAPPING       number of services that are currently flapping.\n");
 		printf(" NUMSVCDOWNTIME       number of services that are currently in downtime.\n");
 		printf(" NUMHSTUP             number of hosts UP.\n");
@@ -358,6 +361,7 @@
 		printf(" NUMHSTPROB           number of host problems (DOWN or UNREACHABLE).\n");
 		printf(" NUMHSTCHECKED        number of hosts that have been checked since start.\n");
 		printf(" NUMHSTSCHEDULED      number of hosts that are currently scheduled to be checked.\n");
+		printf(" NUMHSTACKNOWLEDGED   number of down hosts that are currently acknowledged.\n");
 		printf(" NUMHSTFLAPPING       number of hosts that are currently flapping.\n");
 		printf(" NUMHSTDOWNTIME       number of hosts that are currently in downtime.\n");
 		printf(" NUMHSTACTCHKxM       number of hosts actively checked in last 1/5/15/60 minutes.\n");
@@ -734,6 +738,8 @@
 			printf("%d%s", services_checked, mrtg_delimiter);
 		else if(!strcmp(temp_ptr, "NUMSVCSCHEDULED"))
 			printf("%d%s", services_scheduled, mrtg_delimiter);
+		else if(!strcmp(temp_ptr, "NUMSVCACKNOWLEDGED"))
+			printf("%d%s", services_acknowledged, mrtg_delimiter);
 		else if(!strcmp(temp_ptr, "NUMSVCFLAPPING"))
 			printf("%d%s", services_flapping, mrtg_delimiter);
 		else if(!strcmp(temp_ptr, "NUMSVCDOWNTIME"))
@@ -754,6 +760,8 @@
 			printf("%d%s", hosts_checked, mrtg_delimiter);
 		else if(!strcmp(temp_ptr, "NUMHSTSCHEDULED"))
 			printf("%d%s", hosts_scheduled, mrtg_delimiter);
+		else if(!strcmp(temp_ptr, "NUMHSTACKNOWLEDGED"))
+			printf("%d%s", hosts_acknowledged, mrtg_delimiter);
 		else if(!strcmp(temp_ptr, "NUMHSTFLAPPING"))
 			printf("%d%s", hosts_flapping, mrtg_delimiter);
 		else if(!strcmp(temp_ptr, "NUMHSTDOWNTIME"))
@@ -798,6 +806,7 @@
 	printf("Total Services:                         %d\n", status_service_entries);
 	printf("Services Checked:                       %d\n", services_checked);
 	printf("Services Scheduled:                     %d\n", services_scheduled);
+	printf("Services Acknoledged:                   %d\n", services_acknowledged);
 	printf("Services Actively Checked:              %d\n", active_service_checks);
 	printf("Services Passively Checked:             %d\n", passive_service_checks);
 	printf("Total Service State Change:             %.3f / %.3f / %.3f %%\n", min_service_state_change, max_service_state_change, average_service_state_change);
@@ -815,6 +824,7 @@
 	printf("Total Hosts:                            %d\n", status_host_entries);
 	printf("Hosts Checked:                          %d\n", hosts_checked);
 	printf("Hosts Scheduled:                        %d\n", hosts_scheduled);
+	printf("Hosts Acknoledged:                      %d\n", hosts_acknowledged);
 	printf("Hosts Actively Checked:                 %d\n", active_host_checks);
 	printf("Host Passively Checked:                 %d\n", passive_host_checks);
 	printf("Total Host State Change:                %.3f / %.3f / %.3f %%\n", min_host_state_change, max_host_state_change, average_host_state_change);
@@ -922,6 +932,7 @@
 	time_t last_check = 0L;
 	int should_be_scheduled = TRUE;
 	int has_been_checked = TRUE;
+	int has_been_acknowledged = FALSE;
 
 
 	time(&current_time);
@@ -1074,6 +1085,8 @@
 						hosts_checked++;
 					if(should_be_scheduled == TRUE)
 						hosts_scheduled++;
+					if(has_been_acknowledged == TRUE)
+						hosts_acknowledged++;
 					break;
 
 				case STATUS_SERVICE_DATA:
@@ -1179,6 +1192,8 @@
 						services_checked++;
 					if(should_be_scheduled == TRUE)
 						services_scheduled++;
+					if(has_been_acknowledged == TRUE)
+						services_acknowledged++;
 					break;
 
 				default:
@@ -1197,6 +1212,7 @@
 			last_check = (time_t)0;
 			has_been_checked = FALSE;
 			should_be_scheduled = FALSE;
+			has_been_acknowledged = FALSE;
 			}
 
 
@@ -1339,6 +1355,8 @@
 						has_been_checked = (atoi(val) > 0) ? TRUE : FALSE;
 					else if(!strcmp(var, "should_be_scheduled"))
 						should_be_scheduled = (atoi(val) > 0) ? TRUE : FALSE;
+					else if(!strcmp(var, "problem_has_been_acknowledged"))
+						has_been_acknowledged = (atoi(val) > 0) ? TRUE : FALSE;
 					break;
 
 				case STATUS_SERVICE_DATA:
@@ -1362,6 +1380,8 @@
 						has_been_checked = (atoi(val) > 0) ? TRUE : FALSE;
 					else if(!strcmp(var, "should_be_scheduled"))
 						should_be_scheduled = (atoi(val) > 0) ? TRUE : FALSE;
+					else if(!strcmp(var, "problem_has_been_acknowledged"))
+						has_been_acknowledged = (atoi(val) > 0) ? TRUE : FALSE;
 					break;
 
 				default:
@@ -1519,6 +1539,8 @@
 			hosts_checked = atoi(val);
 		else if(!strcmp(var, "hosts_scheduled"))
 			hosts_scheduled = atoi(val);
+		else if(!strcmp(var, "hosts_acknowledged"))
+			hosts_acknowledged = atoi(val);
 		else if(!strcmp(var, "hosts_flapping"))
 			hosts_flapping = atoi(val);
 		else if(!strcmp(var, "hosts_in_downtime"))
@@ -1611,6 +1633,8 @@
 			services_checked = atoi(val);
 		else if(!strcmp(var, "services_scheduled"))
 			services_scheduled = atoi(val);
+		else if(!strcmp(var, "services_acknowledged"))
+			services_acknowledged = atoi(val);
 		else if(!strcmp(var, "services_flapping"))
 			services_flapping = atoi(val);
 		else if(!strcmp(var, "services_in_downtime"))
