/***********************************************************************
*
* TAC.C - Nagios Tactical Monitoring Overview CGI
*
* Copyright (c) 2001-2006 Ethan Galstad (nagios@nagios.org)
* Last Modified: 08-22-2006
*
* This CGI program will display the contents of the Nagios
* log file.
*
* License:
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
***********************************************************************/
#include "../include/config.h"
#include "../include/common.h"
#include "../include/objects.h"
#include "../include/statusdata.h"
#include "../include/getcgi.h"
#include "../include/cgiutils.h"
#include "../include/cgiauth.h"
#define HEALTH_WARNING_PERCENTAGE 90
#define HEALTH_CRITICAL_PERCENTAGE 75
/* HOSTOUTAGE structure */
typedef struct hostoutage_struct{
host *hst;
int affected_child_hosts;
struct hostoutage_struct *next;
}hostoutage;
extern char main_config_file[MAX_FILENAME_LENGTH];
extern char url_images_path[MAX_FILENAME_LENGTH];
extern char url_stylesheets_path[MAX_FILENAME_LENGTH];
extern char url_media_path[MAX_FILENAME_LENGTH];
extern int refresh_rate;
extern char *service_critical_sound;
extern char *service_warning_sound;
extern char *service_unknown_sound;
extern char *host_down_sound;
extern char *host_unreachable_sound;
extern char *normal_sound;
extern host *host_list;
extern hostgroup *hostgroup_list;
extern hoststatus *hoststatus_list;
extern servicestatus *servicestatus_list;
extern int enable_notifications;
extern int execute_service_checks;
extern int accept_passive_service_checks;
extern int enable_event_handlers;
extern int enable_flap_detection;
extern int nagios_process_state;
void analyze_status_data(void);
void display_tac_overview(void);
void find_hosts_causing_outages(void);
void calculate_outage_effect_of_host(host *,int *);
int is_route_to_host_blocked(host *);
int number_of_host_services(host *);
void add_hostoutage(host *);
void free_hostoutage_list(void);
void document_header(int);
void document_footer(void);
int process_cgivars(void);
authdata current_authdata;
int embedded=FALSE;
int display_header=FALSE;
hostoutage *hostoutage_list=NULL;
int total_blocking_outages=0;
=1= |