<P>Are you talking about changing the default red for critical and warning on the stats page? If not, then look at the .css style sheets, there's a lot of options....
<P> 
<P>See below, I have Red, Yellow, and brown for my Tac page.
<P>
<P><B><I>Henrique leandro <henrique.leandro@varig.com></I></B> wrote: 
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hi,<BR><BR>ho do i for change the status colors ?<BR>we would like something:<BR><BR>CRITICAL: ORANGE<BR>WARNING: BLUE<BR>UNKNOWN: GRAY<BR>PENDING: RED<BR><BR><BR><BR>thanks <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>-------------------------------------------------------<BR>This SF.NET email is sponsored by:<BR>SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!<BR>http://www.vasoftware.com<BR>_______________________________________________<BR>Nagios-users mailing list<BR>Nagios-users@lists.sourceforge.net<BR>https://lists.sourceforge.net/lists/listinfo/nagios-users</BLOCKQUOTE>
<P>
<P>
<P>
<P>
<P> <B><I>Jon Lyons <jlyons30@yahoo.com></I></B> wrote: 
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
<P>FYI, I've updated my tac.c and tac.css (1.0b6) stylesheet to change the default colors of the tac.cgi text backgrounds from red to yellow for warnings, and brownish for unknown. Now only the critical alerts on the tac.cgi are in red... 
<P>Basically I added two stylesheet definitions to tac.css; and call them in tac.c... 
<P>warningserviceImportantProblem { text-align: left; font-family: arial; font-size: 8pt; background-color: #FFFF00; color: black; }<BR> .unknownserviceImportantProblem { text-align: left; font-family: arial; font-size: 8pt; background-color: #FF9966; color: black; }<BR>
<P>/your/nagios/path/share/stylesheets/tac.css 
<P> <B><I>Jon Lyons <jlyons30@yahoo.com></I></B> wrote: 
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
<P>
<P>Hi, I've modified my  tac.css stylesheet colors, but I'd like to change the service warning text block from red to something more like yellow for the tac.cgi, is this in the style sheet or somewhere else?? I'd like the critical sections to only use red.. :) 
<P>Thanks....</P>
<P><BR>
<HR SIZE=1>
Do you Yahoo!?<BR><A href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Yahoo! Mail Plus</A> - Powerful. Affordable. <A href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Sign up now</A></BLOCKQUOTE>
<P><BR>
<HR SIZE=1>
Do you Yahoo!?<BR><A href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Yahoo! Mail Plus</A> - Powerful. Affordable. <A href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Sign up now</A>/***********************************************************************<BR>*<BR>* TAC.C - Nagios Tactical Monitoring Overview CGI<BR>*<BR>* Copyright (c) 2001-2002 Ethan Galstad (nagios@nagios.org)<BR>* Last Modified: 08-07-2002<BR>*<BR>* This CGI program will display the contents of the Nagios<BR>* log file.<BR>*<BR>*<BR>* This program is free software; you can redistribute it and/or modify<BR>* it under the terms of the GNU General Public License as published by<BR>* the Free Software Foundation; either version 2 of the License, or<BR>* (at your option) any later version.<BR>*<BR>* This program is distributed in the hope that it will be useful,<BR>* but WITHOUT ANY WARRANTY; without even the implied warranty of<BR>* MERCHANTABILITY or FITNESS FOR A PARTICULAR
  PURPOSE. See the<BR>* GNU General Public License for more details.<BR>*<BR>* You should have received a copy of the GNU General Public License<BR>* along with this program; if not, write to the Free Software<BR>* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.<BR>***********************************************************************/<BR><BR>#include "../common/config.h"<BR>#include "../common/locations.h"<BR>#include "../common/common.h"<BR>#include "../common/objects.h"<BR>#include "../common/statusdata.h"<BR><BR>#include "getcgi.h"<BR>#include "cgiutils.h"<BR>#include "auth.h"<BR>#include "lifo.h"<BR><BR><BR>#define HEALTH_WARNING_PERCENTAGE 90<BR>#define HEALTH_CRITICAL_PERCENTAGE 75<BR><BR><BR>/* HOSTOUTAGE structure */<BR>typedef struct hostoutage_struct{<BR>host *hst;<BR>int affected_child_hosts;<BR>struct hostoutage_struct *next;<BR>}hostoutage;<BR><BR><BR>extern char main_config_file[MAX_FILENAME_LENGTH];<BR>extern char url_images_path[MAX_FILENAME_LENGT
 H];<BR>extern char url_stylesheets_path[MAX_FILENAME_LENGTH];<BR>extern char url_media_path[MAX_FILENAME_LENGTH];<BR><BR>extern int refresh_rate;<BR><BR>extern char *service_critical_sound;<BR>extern char *service_warning_sound;<BR>extern char *service_unknown_sound;<BR>extern char *host_down_sound;<BR>extern char *host_unreachable_sound;<BR>extern char *normal_sound;<BR><BR>extern hostgroup *hostgroup_list;<BR>extern hoststatus *hoststatus_list;<BR>extern servicestatus *servicestatus_list;<BR>extern host *host_list;<BR>extern service *service_list;<BR><BR>extern int enable_notifications;<BR>extern int execute_service_checks;<BR>extern int accept_passive_service_checks;<BR>extern int enable_event_handlers;<BR>extern int enable_flap_detection;<BR><BR>extern int nagios_process_state;<BR><BR><BR><BR>void analyze_status_data(void);<BR>void display_tac_overview(void);<BR><BR>void find_hosts_causing_outages(void);<BR>void calculate_outage_effect_of_host(host *,int *);<BR>int is_r
 oute_to_host_blocked(host *);<BR>int number_of_host_services(host *);<BR>void add_hostoutage(host *);<BR>void free_hostoutage_list(void);<BR><BR>void document_header(int);<BR>void document_footer(void);<BR>int process_cgivars(void);<BR><BR>authdata current_authdata;<BR><BR>int embedded=FALSE;<BR>int display_header=FALSE;<BR><BR>hostoutage *hostoutage_list=NULL;<BR><BR>int total_blocking_outages=0;<BR>int total_nonblocking_outages=0;<BR><BR>int total_service_health=0;<BR>int total_host_health=0;<BR>int potential_service_health=0;<BR>int potential_host_health=0;<BR>double percent_service_health=0.0;<BR>double percent_host_health=0.0;<BR><BR>int total_hosts=0;<BR>int total_services=0;<BR><BR>int total_active_checks=0;<BR>int total_passive_checks=0;<BR><BR>int min_execution_time=-1;<BR>int max_execution_time=-1;<BR>unsigned long total_execution_time=0L;<BR>double average_execution_time=-1.0;<BR>int min_latency=-1;<BR>int max_latency=-1;<BR>unsigned long total_latency=0L;<BR>dou
 ble average_latency=-1.0;<BR><BR>int flapping_services=0;<BR>int flapping_hosts=0;<BR>int flap_disabled_services=0;<BR>int flap_disabled_hosts=0;<BR>int notification_disabled_services=0;<BR>int notification_disabled_hosts=0;<BR>int event_handler_disabled_services=0;<BR>int event_handler_disabled_hosts=0;<BR>int active_checks_disabled_services=0;<BR>int active_checks_disabled_hosts=0;<BR>int passive_checks_disabled_services=0;<BR><BR>int hosts_pending=0;<BR>int hosts_pending_disabled=0;<BR>int hosts_up_disabled=0;<BR>int hosts_up_unacknowledged=0;<BR>int hosts_up=0;<BR>int hosts_down_scheduled=0;<BR>int hosts_down_acknowledged=0;<BR>int hosts_down_disabled=0;<BR>int hosts_down_unacknowledged=0;<BR>int hosts_down=0;<BR>int hosts_unreachable_scheduled=0;<BR>int hosts_unreachable_acknowledged=0;<BR>int hosts_unreachable_disabled=0;<BR>int hosts_unreachable_unacknowledged=0;<BR>int hosts_unreachable=0;<BR><BR>int services_pending=0;<BR>int services_pending_disabled=0;<BR>int ser
 vices_ok_disabled=0;<BR>int services_ok_unacknowledged=0;<BR>int services_ok=0;<BR>int services_warning_host_problem=0;<BR>int services_warning_scheduled=0;<BR>int services_warning_acknowledged=0;<BR>int services_warning_disabled=0;<BR>int services_warning_unacknowledged=0;<BR>int services_warning=0;<BR>int services_unknown_host_problem=0;<BR>int services_unknown_scheduled=0;<BR>int services_unknown_acknowledged=0;<BR>int services_unknown_disabled=0;<BR>int services_unknown_unacknowledged=0;<BR>int services_unknown=0;<BR>int services_critical_host_problem=0;<BR>int services_critical_scheduled=0;<BR>int services_critical_acknowledged=0;<BR>int services_critical_disabled=0;<BR>int services_critical_unacknowledged=0;<BR>int services_critical=0;<BR><BR><BR><BR>int main(void){<BR>int result=OK;<BR>char *sound=NULL;<BR><BR><BR>/* get the CGI variables passed in the URL */<BR>process_cgivars();<BR><BR>/* reset internal variables */<BR>reset_cgi_vars();<BR><BR>/* read the CGI confi
 guration file */<BR>result=read_cgi_config_file(DEFAULT_CGI_CONFIG_FILE);<BR>if(result==ERROR){<BR>document_header(FALSE);<BR>cgi_config_file_error(DEFAULT_CGI_CONFIG_FILE);<BR>document_footer();<BR>return ERROR;<BR>}<BR><BR>/* read the main configuration file */<BR>result=read_main_config_file(main_config_file);<BR>if(result==ERROR){<BR>document_header(FALSE);<BR>main_config_file_error(main_config_file);<BR>document_footer();<BR>return ERROR;<BR>}<BR><BR>/* read all object configuration data */<BR>result=read_all_object_configuration_data(main_config_file,READ_ALL_OBJECT_DATA);<BR>if(result==ERROR){<BR>document_header(FALSE);<BR>object_data_error();<BR>document_footer();<BR>return ERROR;<BR>}<BR><BR>/* read all status data */<BR>result=read_all_status_data(DEFAULT_CGI_CONFIG_FILE,READ_ALL_STATUS_DATA);<BR>if(result==ERROR){<BR>document_header(FALSE);<BR>status_data_error();<BR>document_footer();<BR>free_memory();<BR>return ERROR;<BR>}<BR><BR>document_header(TRUE);<BR><BR>/
 * get authentication information */<BR>get_authentication_information(¤t_authdata);<BR><BR>if(display_header==TRUE){<BR><BR>/* begin top table */<BR>printf(" 
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>\n");<BR>printf(" 
<TBODY>
<TR>\n");<BR><BR>/* left column of top table - info box */<BR>printf(" 
<TD vAlign=top align=left width="33%">\n");<BR>display_info_table("Tactical Status Overview",TRUE,¤t_authdata);<BR>printf("</TD>\n");<BR><BR>/* middle column of top table - log file navigation options */<BR>printf(" 
<TD vAlign=top align=middle width="33%">\n");<BR>printf("</TD>\n");<BR><BR>/* right hand column of top row */<BR>printf(" 
<TD vAlign=top align=right width="33%">\n");<BR>printf("</TD>\n");<BR><BR>/* end of top table */<BR>printf("</TR>\n");<BR>printf("</TBODY></TABLE>\n");<BR>printf(" 
<P></P>\n");<BR><BR>}<BR><BR><BR>/* analyze current host and service status data for tac overview */<BR>analyze_status_data();<BR><BR>/* find all hosts that are causing network outages */<BR>find_hosts_causing_outages();<BR><BR><BR>/* embed sound tag if necessary... */<BR>if(hosts_unreachable_unacknowledged > 0 && host_unreachable_sound!=NULL)<BR>sound=host_unreachable_sound;<BR>else if(hosts_down_unacknowledged > 0 && host_down_sound!=NULL)<BR>sound=host_down_sound;<BR>else if(services_critical_unacknowledged > 0 && service_critical_sound!=NULL)<BR>sound=service_critical_sound;<BR>else if(services_warning_unacknowledged > 0 && service_warning_sound!=NULL)<BR>sound=service_warning_sound;<BR>else if(services_unknown_unacknowledged==0 && services_warning_unacknowledged==0 && services_critical_unacknowledged==0 && hosts_down_unacknowledged==0 && hosts_unreachable_unacknowledged==0 && normal_sound
 !=NULL)<BR>sound=normal_sound;<BR>if(sound!=NULL)<BR>printf("<EMBED src=%s%s hidden=true type="text/html; charset=iso-8859-1" AUTOSTART="TRUE">",url_media_path,sound);<BR><BR><BR>/**** display main tac screen ****/<BR>display_tac_overview();<BR><BR>document_footer();<BR><BR>/* free memory allocated to the host outage list */<BR>free_hostoutage_list();<BR><BR>/* free allocated memory */<BR>free_memory();<BR><BR>return OK;<BR>}<BR><BR><BR><BR><BR>void document_header(int use_stylesheet){<BR>char date_time[MAX_DATETIME_LENGTH];<BR>time_t current_time;<BR>time_t expire_time;<BR><BR>printf("Cache-Control: no-store\n");<BR>printf("Pragma: no-cache\n");<BR>printf("Refresh: %d\n",refresh_rate);<BR><BR>time(¤t_time);<BR>get_time_string(¤t_time,date_time,(int)sizeof(date_time),HTTP_DATE_TIME);<BR>printf("Last-Modified: %s\n",date_time);<BR><BR>expire_time=(time_t)0L;<BR>get_time_string(&expire_time,date_time,(int)sizeof(date_time),HTTP_DATE_TIME);<BR>printf("Expires: %s\n",date_t
 ime);<BR><BR>printf("Content-type: text/html\n\n");<BR><BR>if(embedded==TRUE)<BR>return;<BR><BR>printf("\n");<BR>printf("\n");<BR>printf("\n");<BR><BR>if(use_stylesheet==TRUE)<BR>printf("<LINK href="%s%s" type=text/css rel=stylesheet>\n",url_stylesheets_path,TAC_CSS);<BR><BR>printf("\n");<BR>printf("\n");<BR><BR>/* include user SSI header */<BR>include_ssi_files(TAC_CGI,SSI_HEADER);<BR><BR>return;<BR>}<BR><BR><BR>void document_footer(void){<BR><BR>if(embedded==TRUE)<BR>return;<BR><BR>/* include user SSI footer */<BR>include_ssi_files(TAC_CGI,SSI_FOOTER);<BR><BR>printf("\n");<BR>printf("\n");<BR><BR>return;<BR>}<BR><BR><BR>int process_cgivars(void){<BR>char **variables;<BR>int error=FALSE;<BR>int x;<BR><BR>variables=getcgivars();<BR><BR>for(x=0;variables[x]!=NULL;x++){<BR><BR>/* do some basic length checking on the variable identifier to prevent buffer overflows */<BR>if(strlen(variables[x])>=MAX_INPUT_BUFFER-1){<BR>continue;<BR>}<BR><BR>/* we found the embed option */<BR
 >else if(!strcmp(variables[x],"embedded"))<BR>embedded=TRUE;<BR><BR>/* we found the noheader option */<BR>else if(!strcmp(variables[x],"noheader"))<BR>display_header=FALSE;<BR><BR>/* we recieved an invalid argument */<BR>else<BR>error=TRUE;<BR><BR>}<BR><BR>/* free memory allocated to the CGI variables */<BR>free_cgivars(variables);<BR><BR>return error;<BR>}<BR><BR><BR><BR>void analyze_status_data(void){<BR>servicestatus *temp_servicestatus;<BR>service *temp_service;<BR>hoststatus *temp_hoststatus;<BR>host *temp_host;<BR>int problem=TRUE;<BR><BR><BR>/* check all services */<BR>for(temp_servicestatus=servicestatus_list;temp_servicestatus!=NULL;temp_servicestatus=temp_servicestatus->next){<BR><BR>/* see if user is authorized to view this service */<BR>temp_service=find_service(temp_servicestatus->host_name,temp_servicestatus->description,NULL);<BR>if(is_authorized_for_service(temp_service,¤t_authdata)==FALSE)<BR>continue;<BR><BR>/******** CHECK FEATURES *******/<BR><B
 R>/* check flapping */<BR>if(temp_servicestatus->flap_detection_enabled==FALSE)<BR>flap_disabled_services++;<BR>else if(temp_servicestatus->is_flapping==TRUE)<BR>flapping_services++;<BR><BR>/* check notifications */<BR>if(temp_servicestatus->notifications_enabled==FALSE)<BR>notification_disabled_services++;<BR><BR>/* check event handler */<BR>if(temp_servicestatus->event_handler_enabled==FALSE)<BR>event_handler_disabled_services++;<BR><BR>/* active check execution */<BR>if(temp_servicestatus->checks_enabled==FALSE)<BR>active_checks_disabled_services++;<BR><BR>/* passive check acceptance */<BR>if(temp_servicestatus->accept_passive_service_checks==FALSE)<BR>passive_checks_disabled_services++;<BR><BR><BR>/********* CHECK STATUS ********/<BR><BR>problem=TRUE;<BR><BR>if(temp_servicestatus->status==SERVICE_OK || temp_servicestatus->status==SERVICE_RECOVERY){<BR>if(temp_servicestatus->checks_enabled==FALSE)<BR>services_ok_disabled++;<BR>else<BR>services_
 ok_unacknowledged++;<BR>services_ok++;<BR>}<BR><BR>else if(temp_servicestatus->status==SERVICE_WARNING){<BR>temp_hoststatus=find_hoststatus(temp_servicestatus->host_name);<BR>if(temp_hoststatus!=NULL && (temp_hoststatus->status==HOST_DOWN || temp_hoststatus->status==HOST_UNREACHABLE)){<BR>services_warning_host_problem++;<BR>problem=FALSE;<BR>}<BR>if(temp_servicestatus->scheduled_downtime_depth>0){<BR>services_warning_scheduled++;<BR>problem=FALSE;<BR>}<BR>if(temp_servicestatus->problem_has_been_acknowledged==TRUE){<BR>services_warning_acknowledged++;<BR>problem=FALSE;<BR>}<BR>if(temp_servicestatus->checks_enabled==FALSE){<BR>services_warning_disabled++;<BR>problem=FALSE;<BR>}<BR>if(problem==TRUE)<BR>services_warning_unacknowledged++;<BR>services_warning++;<BR>}<BR><BR>else if(temp_servicestatus->status==SERVICE_UNKNOWN){<BR>temp_hoststatus=find_hoststatus(temp_servicestatus->host_name);<BR>if(temp_hoststatus!=NULL && (temp_hosts
 tatus->status==HOST_DOWN || temp_hoststatus->status==HOST_UNREACHABLE)){<BR>services_unknown_host_problem++;<BR>problem=FALSE;<BR>}<BR>if(temp_servicestatus->scheduled_downtime_depth>0){<BR>services_unknown_scheduled++;<BR>problem=FALSE;<BR>}<BR>if(temp_servicestatus->problem_has_been_acknowledged==TRUE){<BR>services_unknown_acknowledged++;<BR>problem=FALSE;<BR>}<BR>if(temp_servicestatus->checks_enabled==FALSE){<BR>services_unknown_disabled++;<BR>problem=FALSE;<BR>}<BR>if(problem==TRUE)<BR>services_unknown_unacknowledged++;<BR>services_unknown++;<BR>}<BR><BR>else if(temp_servicestatus->status==SERVICE_CRITICAL){<BR>temp_hoststatus=find_hoststatus(temp_servicestatus->host_name);<BR>if(temp_hoststatus!=NULL && (temp_hoststatus->status==HOST_DOWN || temp_hoststatus->status==HOST_UNREACHABLE)){<BR>services_critical_host_problem++;<BR>problem=FALSE;<BR>}<BR>if(temp_servicestatus->scheduled_downtime_depth>0){<BR>services_critical_schedu
 led++;<BR>problem=FALSE;<BR>}<BR>if(temp_servicestatus->problem_has_been_acknowledged==TRUE){<BR>services_critical_acknowledged++;<BR>problem=FALSE;<BR>}<BR>if(temp_servicestatus->checks_enabled==FALSE){<BR>services_critical_disabled++;<BR>problem=FALSE;<BR>}<BR>if(problem==TRUE)<BR>services_critical_unacknowledged++;<BR>services_critical++;<BR>}<BR><BR>else if(temp_servicestatus->status==SERVICE_PENDING){<BR>if(temp_servicestatus->checks_enabled==FALSE)<BR>services_pending_disabled++;<BR>services_pending++;<BR>}<BR><BR><BR>/* get health stats */<BR>if(temp_servicestatus->status==SERVICE_OK)<BR>total_service_health+=2;<BR><BR>else if(temp_servicestatus->status==SERVICE_WARNING || temp_servicestatus->status==SERVICE_UNKNOWN)<BR>total_service_health++;<BR><BR>if(temp_servicestatus->status!=SERVICE_PENDING)<BR>potential_service_health+=2;<BR><BR><BR>/* calculate execution time and latency stats */<BR>if(temp_servicestatus->check_type==SERVICE_CHECK_A
 CTIVE){<BR><BR>total_active_checks++;<BR><BR>if(min_latency==-1 || temp_servicestatus->latency<MIN_LATENCY)<BR> min_latency=temp_servicestatus->latency;<BR>if(max_latency==-1 || temp_servicestatus->latency>max_latency)<BR>max_latency=temp_servicestatus->latency;<BR><BR>if(min_execution_time==-1 || temp_servicestatus->execution_time<MIN_EXECUTION_TIME)<BR> min_execution_time=temp_servicestatus->execution_time;<BR>if(max_execution_time==-1 || temp_servicestatus->execution_time>max_execution_time)<BR>max_execution_time=temp_servicestatus->execution_time;<BR><BR>total_latency+=temp_servicestatus->latency;<BR>total_execution_time+=temp_servicestatus->execution_time;<BR>}<BR>else<BR>total_passive_checks++;<BR><BR><BR>total_services++;<BR>}<BR><BR><BR><BR>/* check all hosts */<BR>for(temp_hoststatus=hoststatus_list;temp_hoststatus!=NULL;temp_hoststatus=temp_hoststatus->next){<BR><BR>/* see if user is authorized to view this host */<BR>temp_ho
 st=find_host(temp_hoststatus->host_name,NULL);<BR>if(is_authorized_for_host(temp_host,¤t_authdata)==FALSE)<BR>continue;<BR><BR>/******** CHECK FEATURES *******/<BR><BR>/* check flapping */<BR>if(temp_hoststatus->flap_detection_enabled==FALSE)<BR>flap_disabled_hosts++;<BR>else if(temp_hoststatus->is_flapping==TRUE)<BR>flapping_hosts++;<BR><BR>/* check notifications */<BR>if(temp_hoststatus->notifications_enabled==FALSE)<BR>notification_disabled_hosts++;<BR><BR>/* check event handler */<BR>if(temp_hoststatus->event_handler_enabled==FALSE)<BR>event_handler_disabled_hosts++;<BR><BR>/* active check execution */<BR>if(temp_hoststatus->checks_enabled==FALSE)<BR>active_checks_disabled_hosts++;<BR><BR><BR>/********* CHECK STATUS ********/<BR><BR>problem=TRUE;<BR><BR>if(temp_hoststatus->status==HOST_UP){<BR>if(temp_hoststatus->checks_enabled==FALSE)<BR>hosts_up_disabled++;<BR>else<BR>hosts_up_unacknowledged++;<BR>hosts_up++;<BR>}<BR><BR>else if(temp_hoststatus
 ->status==HOST_DOWN){<BR>if(temp_hoststatus->scheduled_downtime_depth>0){<BR>hosts_down_scheduled++;<BR>problem=FALSE;<BR>}<BR>if(temp_hoststatus->problem_has_been_acknowledged==TRUE){<BR>hosts_down_acknowledged++;<BR>problem=FALSE;<BR>}<BR>if(temp_hoststatus->checks_enabled==FALSE){<BR>hosts_down_disabled++;<BR>problem=FALSE;<BR>}<BR>if(problem==TRUE)<BR>hosts_down_unacknowledged++;<BR>hosts_down++;<BR>}<BR><BR>else if(temp_hoststatus->status==HOST_UNREACHABLE){<BR>if(temp_hoststatus->scheduled_downtime_depth>0){<BR>hosts_unreachable_scheduled++;<BR>problem=FALSE;<BR>}<BR>if(temp_hoststatus->problem_has_been_acknowledged==TRUE){<BR>hosts_unreachable_acknowledged++;<BR>problem=FALSE;<BR>}<BR>if(temp_hoststatus->checks_enabled==FALSE){<BR>hosts_unreachable_disabled++;<BR>problem=FALSE;<BR>}<BR>if(problem==TRUE)<BR>hosts_unreachable_unacknowledged++;<BR>hosts_unreachable++;<BR>}<BR><BR>else if(temp_hoststatus->status==HOST_PENDING){<BR>if(temp
 _hoststatus->checks_enabled==FALSE)<BR>hosts_pending_disabled++;<BR>hosts_pending++;<BR>}<BR><BR>/* get health stats */<BR>if(temp_hoststatus->status==HOST_UP)<BR>total_host_health++;<BR><BR>if(temp_hoststatus->status!=HOST_PENDING)<BR>potential_host_health++;<BR><BR>total_hosts++;<BR>}<BR><BR><BR>/* calculate service health */<BR>if(potential_service_health==0)<BR>percent_service_health=0.0;<BR>else<BR>percent_service_health=((double)total_service_health/(double)potential_service_health)*100.0;<BR><BR>/* calculate host health */<BR>if(potential_host_health==0)<BR>percent_host_health=0.0;<BR>else<BR>percent_host_health=((double)total_host_health/(double)potential_host_health)*100.0;<BR><BR>/* calculate latency */<BR>if(total_latency==0L)<BR>average_latency=0.0;<BR>else<BR>average_latency=((double)total_latency/(double)total_active_checks);<BR><BR>/* calculate execution time */<BR>if(total_execution_time==0L)<BR>average_execution_time=0.0;<BR>else<BR>average_executi
 on_time=((double)total_execution_time/(double)total_active_checks);<BR><BR>return;<BR>}<BR><BR><BR><BR><BR>/* determine what hosts are causing network outages */<BR>void find_hosts_causing_outages(void){<BR>hoststatus *temp_hoststatus;<BR>hostoutage *temp_hostoutage;<BR>host *temp_host;<BR><BR>/* user must be authorized for all hosts in order to see outages */<BR>if(is_authorized_for_all_hosts(¤t_authdata)==FALSE)<BR>return;<BR><BR>/* check all hosts */<BR>for(temp_hoststatus=hoststatus_list;temp_hoststatus!=NULL;temp_hoststatus=temp_hoststatus->next){<BR><BR>/* check only hosts that are not up and not pending */<BR>if(temp_hoststatus->status!=HOST_UP && temp_hoststatus->status!=HOST_PENDING){<BR><BR>/* find the host entry */<BR>temp_host=find_host(temp_hoststatus->host_name,NULL);<BR><BR>if(temp_host==NULL)<BR>continue;<BR><BR>/* if the route to this host is not blocked, it is a causing an outage */<BR>if(is_route_to_host_blocked(temp_host)==FALSE)<BR>a
 dd_hostoutage(temp_host);<BR>}<BR>}<BR><BR><BR>/* check all hosts that are causing problems and calculate the extent of the problem */<BR>for(temp_hostoutage=hostoutage_list;temp_hostoutage!=NULL;temp_hostoutage=temp_hostoutage->next){<BR><BR>/* calculate the outage effect of this particular hosts */<BR>calculate_outage_effect_of_host(temp_hostoutage->hst,&temp_hostoutage->affected_child_hosts);<BR><BR>if(temp_hostoutage->affected_child_hosts>1)<BR>total_blocking_outages++;<BR>else<BR>total_nonblocking_outages++;<BR>}<BR><BR>return;<BR>}<BR><BR><BR><BR><BR><BR>/* adds a host outage entry */<BR>void add_hostoutage(host *hst){<BR>hostoutage *new_hostoutage;<BR><BR>/* allocate memory for a new structure */<BR>new_hostoutage=(hostoutage *)malloc(sizeof(hostoutage));<BR><BR>if(new_hostoutage==NULL)<BR>return;<BR><BR>new_hostoutage->hst=hst;<BR>new_hostoutage->affected_child_hosts=0;<BR><BR>/* add the structure to the head of the list in memory */<BR>new_
 hostoutage->next=hostoutage_list;<BR>hostoutage_list=new_hostoutage;<BR><BR>return;<BR>}<BR><BR><BR><BR><BR>/* frees all memory allocated to the host outage list */<BR>void free_hostoutage_list(void){<BR>hostoutage *this_hostoutage;<BR>hostoutage *next_hostoutage;<BR><BR>for(this_hostoutage=hostoutage_list;this_hostoutage!=NULL;this_hostoutage=next_hostoutage){<BR><BR>=== message truncated ===<BR>.tac { font-family: arial,serif; background-color: black; background: black; color: white; background-color: black; }<BR><BR>.errorMessage { font-family: arial; font-weight: bold; font-size: 12pt; background-color: black; color: white; }<BR>.errorDescription { font-family: arial,serif; text-align: center; font-weight: bold; font-size: 12pt; }<BR>.warningMessage { font-family: arial,serif; text-align: center; color: red; font-weight: bold; font-size: 10pt; }<BR><BR>.infoBox { font-family: arial,serif; font-size: 8pt; background-color: #C4C2C2; color: black; padding: 2; }<BR>.info
 BoxTitle { font-family: arial,serif; font-size: 10pt; font-weight: bold; color: black; }<BR>.infoBoxBadProcStatus {font-family: arial,serif; color: red; }<BR>A { font-family: arial,serif; color: black; }<BR><BR>.title { text-align: left; font-family: arial; font-weight: bold; font-size: large; background-color: black; color: white; }<BR>.titleItem { text-align: left; font-family: arial; font-weight: bold; font-size: 8pt; background-color: black; color: white; }<BR>.infoBoxBadProcStatus { text-align: left; font-family: arial; font-weight: bold; font-size: 8pt; background-color: #C4C2C2; color: red; }<BR><BR>.healthTitle { text-align: left; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #33FF33; color: black; }<BR>.healthBox { text-align: left; font-family: arial; font-weight: bold; font-size: 8pt; background-color: #C4C2C2; color: white; }<BR>.healthItem { text-align: left; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #
 C4C2C2; color: black; }<BR>.healthBar { text-align: left; font-family: arial; font-weight: bold; font-size: 8pt; background-color: gray; color: white; }<BR><BR>.perfTitle { text-align: left; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #33FF33; color: black; text-decoration: none; }<BR>.perfBox { text-align: left; font-family: arial; font-weight: bold; font-size: 8pt; background-color: #C4C2C2; color: white; }<BR>.perfItem { text-align: left; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #C4C2C2; color: black; text-decoration: none; }<BR>.perfValue { text-align: left; font-family: arial; font-size: 10pt; background-color: #C4C2C2; color: black; text-decoration: none; }<BR><BR>.featureTitle { text-align: left; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #33FF33; color: black; }<BR>.featureHeader { text-align: center; font-family: arial; font-weight: bold; font-size: 10pt; background-color:
  #C4C2C2; color: black; }<BR><BR>.featureEnabled { text-align: center; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #ccffcc; color: #8f8f8f; }<BR>.featureDisabled { text-align: center; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #ffcccc; color: #b3b3b3; }<BR><BR>.featureEnabledFlapDetection { text-align: center; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #ccffcc; color: #8f8f8f; }<BR>.featureDisabledFlapDetection { text-align: center; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #ffcccc; color: #b3b3b3; }<BR>.featureItemEnabledServiceFlapDetection { text-align: left; font-family: arial; font-size: 8pt; background-color: #ccffcc; color: black; }<BR>.featureItemDisabledServiceFlapDetection { text-align: left; font-family: arial; font-size: 8pt; background-color: #ff0000; color: black; }<BR>.featureItemEnabledHostFlapDetection { text-align: left; font-family: 
 arial; font-size: 8pt; background-color: #ccffcc; color: black; }<BR>.featureItemDisabledHostFlapDetection { text-align: left; font-family: arial; font-size: 8pt; background-color: #ff0000; color: black; }<BR>.featureItemServicesNotFlapping { text-align: left; font-family: arial; font-size: 8pt; background-color: #ccffcc; color: black; }<BR>.featureItemServicesFlapping { text-align: left; font-family: arial; font-size: 8pt; background-color: #ff0000; color: black; }<BR>.featureItemHostsNotFlapping { text-align: left; font-family: arial; font-size: 8pt; background-color: #ccffcc; color: black; }<BR>.featureItemHostsFlapping { text-align: left; font-family: arial; font-size: 8pt; background-color: #ff0000; color: black; }<BR><BR>.featureEnabledNotifications { text-align: center; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #ccffcc; color: #8f8f8f; }<BR>.featureDisabledNotifications { text-align: center; font-family: arial; font-weight: bold; font-
 size: 10pt; background-color: #ffcccc; color: #b3b3b3; }<BR>.featureItemEnabledServiceNotifications { text-align: left; font-family: arial; font-size: 8pt; background-color: #ccffcc; color: black; }<BR>.featureItemDisabledServiceNotifications { text-align: left; font-family: arial; font-size: 8pt; background-color: #0000FF; color: black; }<BR>.featureItemEnabledHostNotifications { text-align: left; font-family: arial; font-size: 8pt; background-color: #ccffcc; color: black; }<BR>.featureItemDisabledHostNotifications { text-align: left; font-family: arial; font-size: 8pt; background-color: #0000FF; color: black; }<BR><BR>.featureEnabledHandlers { text-align: center; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #ccffcc; color: #8f8f8f; }<BR>.featureDisabledHandlers { text-align: center; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #ffcccc; color: #b3b3b3; }<BR>.featureItemEnabledServiceHandlers { text-align: left; font
 -family: arial; font-size: 8pt; background-color: #ccffcc; color: black; }<BR>.featureItemDisabledServiceHandlers { text-align: left; font-family: arial; font-size: 8pt; background-color: #ff0000; color: black; }<BR>.featureItemEnabledHostHandlers { text-align: left; font-family: arial; font-size: 8pt; background-color: #ccffcc; color: black; }<BR>.featureItemDisabledHostHandlers { text-align: left; font-family: arial; font-size: 8pt; background-color: #ff0000; color: black; }<BR><BR>.featureEnabledActiveChecks { text-align: center; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #ccffcc; color: #8f8f8f; }<BR>.featureDisabledActiveChecks { text-align: center; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #ffcccc; color: #b3b3b3; }<BR>.featureItemEnabledActiveServiceChecks { text-align: left; font-family: arial; font-size: 8pt; background-color: #ccffcc; color: black; }<BR>.featureItemDisabledActiveServiceChecks { text-al
 ign: left; font-family: arial; font-size: 8pt; background-color: #ff0000; color: black; }<BR>.featureItemEnabledActiveHostChecks { text-align: left; font-family: arial; font-size: 8pt; background-color: #ccffcc; color: black; }<BR>.featureItemDisabledActiveHostChecks { text-align: left; font-family: arial; font-size: 8pt; background-color: #ff0000; color: black; }<BR><BR>.featureEnabledPassiveChecks { text-align: center; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #ccffcc; color: #8f8f8f; }<BR>.featureDisabledPassiveChecks { text-align: center; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #ffcccc; color: #b3b3b3; }<BR>.featureItemEnabledPassiveServiceChecks { text-align: left; font-family: arial; font-size: 8pt; background-color: #ccffcc; color: black; }<BR>.featureItemDisabledPassiveServiceChecks { text-align: left; font-family: arial; font-size: 8pt; background-color: #ff0000; color: black; }<BR><BR>.outageTitle {
  text-align: left; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #999797; color: black; }<BR>.outageHeader { text-align: center; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #C4C2C2; color: black; text-decoration: none; }<BR><BR>.outageImportantProblem { text-align: left; font-family: arial; font-size: 8pt; background-color: #ff0000; color: black; }<BR>.outageUnimportantProblem { text-align: left; font-family: arial; font-size: 8pt; background-color: #ffcccc; color: black; }<BR><BR>.hostTitle { text-align: left; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #999797; color: black; }<BR>.hostHeader { text-align: center; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #C4C2C2; color: black; text-decoration: none; }<BR><BR>.hostImportantProblem { text-align: left; font-family: arial; font-size: 8pt; background-color: #ff0000; color: black; }<BR>.hostUnimportantProblem 
 { text-align: left; font-family: arial; font-size: 8pt; background-color: #ffcccc; color: black; }<BR><BR>.serviceTitle { text-align: left; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #999797; color: black; }<BR>.serviceHeader { text-align: center; font-family: arial; font-weight: bold; font-size: 10pt; background-color: #C4C2C2; color: black; text-decoration: none; }<BR><BR>.serviceImportantProblem { text-align: left; font-family: arial; font-size: 8pt; background-color: #ff0000; color: black; }<BR>.serviceUnimportantProblem { text-align: left; font-family: arial; font-size: 8pt; background-color: #ffcccc; color: black; }<BR>.warningserviceImportantProblem { text-align: left; font-family: arial; font-size: 8pt; background-color: #FFFF00; color: black; }<BR>.unknownserviceImportantProblem { text-align: left; font-family: arial; font-size: 8pt; background-color: #FF9966; color: black; }<BR><BR></BLOCKQUOTE><p><br><hr size=1>Do you Yahoo!?<br>
<a href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Yahoo! Mail Plus</a> - Powerful. Affordable. <a href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Sign up now</a>