diff -aur nagios-3.2.3-CVS-20101105/cgi/extinfo.c nagios-3.2.3+Fixes/cgi/extinfo.c
--- nagios-3.2.3-CVS-20101105/cgi/extinfo.c 2010-11-05 00:42:18.000000000 +0100
+++ nagios-3.2.3+Fixes/cgi/extinfo.c 2010-11-05 14:32:29.000000000 +0100
@@ -1092,7 +1092,10 @@
get_time_string(&temp_hoststatus->last_check,date_time,(int)sizeof(date_time),SHORT_DATE_TIME);
printf("
\n");
printf("\n");
- printf("Active Checks: | %s | \n",(temp_hoststatus->checks_enabled==TRUE)?"ENABLED":"DISABLED",(temp_hoststatus->checks_enabled==TRUE)?"ENABLED":"DISABLED");
+ if ((temp_host->host_check_command)&&(*temp_host->host_check_command!='\0'))
+ printf("Active Checks: | %s | \n",CONFIG_CGI,url_encode(temp_host->host_check_command),(temp_hoststatus->checks_enabled==TRUE)?"ENABLED":"DISABLED",(temp_hoststatus->checks_enabled==TRUE)?"ENABLED":"DISABLED");
+ else printf("Active Checks: | %s | \n",(temp_hoststatus->checks_enabled==TRUE)?"ENABLED":"DISABLED",(temp_hoststatus->checks_enabled==TRUE)?"ENABLED":"DISABLED");
printf("Passive Checks: | %s | \n",(temp_hoststatus->accept_passive_host_checks==TRUE)?"ENABLED":"DISABLED",(temp_hoststatus->accept_passive_host_checks)?"ENABLED":"DISABLED");
@@ -1158,7 +1163,9 @@
printf("Notifications: | %s | \n",(temp_hoststatus->notifications_enabled)?"ENABLED":"DISABLED",(temp_hoststatus->notifications_enabled)?"ENABLED":"DISABLED");
- printf("Event Handler: | %s | \n",(temp_hoststatus->event_handler_enabled)?"ENABLED":"DISABLED",(temp_hoststatus->event_handler_enabled)?"ENABLED":"DISABLED");
+ if ((temp_host->event_handler)&&(*temp_host->event_handler!='\0'))
+ printf("Event Handler: | %s | \n",CONFIG_CGI,url_encode(temp_host->event_handler),(temp_hoststatus->event_handler_enabled)?"ENABLED":"DISABLED",(temp_hoststatus->event_handler_enabled)?"ENABLED":"DISABLED");
+ else printf("Event Handler: | %s | \n",(temp_hoststatus->event_handler_enabled)?"ENABLED":"DISABLED",(temp_hoststatus->event_handler_enabled)?"ENABLED":"DISABLED");
printf("Flap Detection: | %s | \n",(temp_hoststatus->flap_detection_enabled==TRUE)?"ENABLED":"DISABLED",(temp_hoststatus->flap_detection_enabled==TRUE)?"ENABLED":"DISABLED");
@@ -1405,7 +1412,10 @@
get_time_string(&temp_svcstatus->last_check,date_time,(int)sizeof(date_time),SHORT_DATE_TIME);
printf("Last Check Time: | %s | \n",date_time);
- printf("Check Type: | %s | \n",(temp_svcstatus->check_type==SERVICE_CHECK_ACTIVE)?"ACTIVE":"PASSIVE");
+ if (temp_svcstatus->check_type==SERVICE_CHECK_ACTIVE)
+ printf("Check Type: | ACTIVE | \n",
+ CONFIG_CGI,url_encode(temp_service->service_check_command));
+ else printf("Check Type: | PASSIVE | \n");
printf("Check Latency / Duration: | ");
if(temp_svcstatus->check_type==SERVICE_CHECK_ACTIVE)
@@ -1465,7 +1475,9 @@
printf(" | \n");
printf("\n");
- printf("Active Checks: | %s | \n",(temp_svcstatus->checks_enabled)?"ENABLED":"DISABLED",(temp_svcstatus->checks_enabled)?"ENABLED":"DISABLED");
+ if ((temp_service->service_check_command)&&(*temp_service->service_check_command!='\0'))
+ printf("Active Checks: | %s | \n",CONFIG_CGI,url_encode(temp_service->service_check_command),(temp_svcstatus->checks_enabled)?"ENABLED":"DISABLED",(temp_svcstatus->checks_enabled)?"ENABLED":"DISABLED");
+ else printf("Active Checks: | %s | \n",(temp_svcstatus->checks_enabled)?"ENABLED":"DISABLED",(temp_svcstatus->checks_enabled)?"ENABLED":"DISABLED");
printf("Passive Checks: | %s | \n",(temp_svcstatus->accept_passive_service_checks==TRUE)?"ENABLED":"DISABLED",(temp_svcstatus->accept_passive_service_checks)?"ENABLED":"DISABLED");
@@ -1473,7 +1485,9 @@
printf("Notifications: | %s | \n",(temp_svcstatus->notifications_enabled)?"ENABLED":"DISABLED",(temp_svcstatus->notifications_enabled)?"ENABLED":"DISABLED");
- printf("Event Handler: | %s | \n",(temp_svcstatus->event_handler_enabled)?"ENABLED":"DISABLED",(temp_svcstatus->event_handler_enabled)?"ENABLED":"DISABLED");
+ if ((temp_service->event_handler)&&(*temp_service->event_handler!='\0'))
+ printf("Event Handler: | %s | \n",CONFIG_CGI,url_encode(temp_service->event_handler),(temp_svcstatus->event_handler_enabled)?"ENABLED":"DISABLED",(temp_svcstatus->event_handler_enabled)?"ENABLED":"DISABLED");
+ else printf("Event Handler: | %s | \n",(temp_svcstatus->event_handler_enabled)?"ENABLED":"DISABLED",(temp_svcstatus->event_handler_enabled)?"ENABLED":"DISABLED");
printf("Flap Detection: | %s | \n",(temp_svcstatus->flap_detection_enabled==TRUE)?"ENABLED":"DISABLED",(temp_svcstatus->flap_detection_enabled==TRUE)?"ENABLED":"DISABLED");
| |