cgi/cgiutils.c File Reference

#include "../include/config.h"
#include "../include/common.h"
#include "../include/locations.h"
#include "../include/objects.h"
#include "../include/statusdata.h"
#include "../include/cgiutils.h"

Functions

void logit (int data_type, int display, const char *fmt,...)
int log_debug_info (int leve, int verbosity, const char *fmt,...)
void reset_cgi_vars (void)
void free_memory (void)
char * get_cgi_config_location (void)
char * get_cmd_file_location (void)
int read_cgi_config_file (char *filename)
int read_main_config_file (char *filename)
int read_all_object_configuration_data (char *config_file, int options)
int read_all_status_data (char *config_file, int options)
int read_file_into_lifo (char *filename)
void free_lifo_memory (void)
int push_lifo (char *buffer)
char * pop_lifo (void)
void document_header (int cgi_id, int use_stylesheet)
void document_footer (int cgi_id)
void write_popup_code (int cgi_id)
char * unescape_newlines (char *rawbuf)
char * escape_newlines (char *rawbuf)
void sanitize_plugin_output (char *buffer)
void get_time_string (time_t *raw_time, char *buffer, int buffer_length, int type)
void get_interval_time_string (double time_units, char *buffer, int buffer_length)
char * url_encode (char *input)
char * html_encode (char *input, int escape_newlines)
void strip_html_brackets (char *buffer)
char * escape_string (char *input)
void get_log_archive_to_use (int archive, char *buffer, int buffer_length)
int determine_archive_to_use_from_time (time_t target_time)
void determine_log_rotation_times (int archive)
void display_info_table (char *title, int refresh, authdata *current_authdata, int daemon_check)
void display_nav_table (char *url, int archive)
void print_extra_hostgroup_url (char *group_name, char *url)
void print_extra_servicegroup_url (char *group_name, char *url)
void include_ssi_files (char *cgi_name, int type)
void include_ssi_file (char *filename)
void cgi_config_file_error (char *config_file)
void main_config_file_error (char *config_file)
void object_data_error (void)
void status_data_error (void)
void print_error (char *config_file, int error_type)
void display_context_help (char *chid)
void display_splunk_host_url (host *hst)
void display_splunk_service_url (service *svc)
void display_splunk_generic_url (char *buf, int icon)
void strip_splunk_query_terms (char *buffer)
void print_generic_error_message (char *title, char *text, int returnlevels)
char * get_export_csv_link (char *cgi)

Variables

char main_config_file [MAX_FILENAME_LENGTH]
char log_file [MAX_FILENAME_LENGTH]
char log_archive_path [MAX_FILENAME_LENGTH]
char command_file [MAX_FILENAME_LENGTH]
char physical_html_path [MAX_FILENAME_LENGTH]
char physical_images_path [MAX_FILENAME_LENGTH]
char physical_ssi_path [MAX_FILENAME_LENGTH]
char url_html_path [MAX_FILENAME_LENGTH]
char url_docs_path [MAX_FILENAME_LENGTH]
char url_context_help_path [MAX_FILENAME_LENGTH]
char url_images_path [MAX_FILENAME_LENGTH]
char url_logo_images_path [MAX_FILENAME_LENGTH]
char url_stylesheets_path [MAX_FILENAME_LENGTH]
char url_js_path [MAX_FILENAME_LENGTH]
char url_media_path [MAX_FILENAME_LENGTH]
char * service_critical_sound = NULL
char * service_warning_sound = NULL
char * service_unknown_sound = NULL
char * host_down_sound = NULL
char * host_unreachable_sound = NULL
char * normal_sound = NULL
char * statusmap_background_image = NULL
char * statuswrl_include = NULL
char * illegal_output_chars = NULL
char * http_charset = NULL
char * notes_url_target = NULL
char * action_url_target = NULL
char * ping_syntax = NULL
char * csv_delimiter = CSV_DELIMITER
char * csv_data_enclosure = CSV_DATA_ENCLOSURE
char nagios_check_command [MAX_INPUT_BUFFER] = ""
char nagios_process_info [MAX_INPUT_BUFFER] = ""
int nagios_process_state = STATE_OK
int enable_splunk_integration = FALSE
char * splunk_url = NULL
int lock_author_names = TRUE
time_t program_start
int nagios_pid
int daemon_mode
int enable_notifications
int execute_service_checks
int accept_passive_service_checks
int enable_event_handlers
int obsess_over_services
int enable_failure_prediction
int process_performance_data
time_t last_command_check
time_t last_log_rotation
int check_external_commands = 0
int log_external_commands_user = FALSE
int date_format = DATE_FORMAT_US
int log_rotation_method = LOG_ROTATION_NONE
time_t this_scheduled_log_rotation = 0L
time_t last_scheduled_log_rotation = 0L
time_t next_scheduled_log_rotation = 0L
int use_authentication = TRUE
int interval_length = 60
int show_context_help = FALSE
int show_all_services_host_is_authorized_for = TRUE
int use_pending_states = TRUE
int host_status_has_been_read = FALSE
int service_status_has_been_read = FALSE
int program_status_has_been_read = FALSE
int refresh_rate = DEFAULT_REFRESH_RATE
int escape_html_tags = FALSE
int persistent_ack_comments = FALSE
int use_ssl_authentication = FALSE
int default_statusmap_layout_method = 0
int default_statuswrl_layout_method = 0
int color_transparency_index_r = 255
int color_transparency_index_g = 255
int color_transparency_index_b = 255
int status_show_long_plugin_output = FALSE
int tac_show_only_hard_state = FALSE
int showlog_initial_states = TRUE
int showlog_current_states = TRUE
int tab_friendly_titles = FALSE
int add_notif_num_hard = 0
int add_notif_num_soft = 0
hostgrouphostgroup_list
contactgroupcontactgroup_list
commandcommand_list
timeperiodtimeperiod_list
contactcontact_list
serviceescalationserviceescalation_list
hoststatus * hoststatus_list
servicestatus * servicestatus_list
lifolifo_list = NULL
char encoded_url_string [2][MAX_INPUT_BUFFER]
char * encoded_html_string = NULL
int content_type = HTML_CONTENT
int embedded = FALSE
int display_header = TRUE
int refresh = TRUE
int daemon_check = TRUE
char alert_message
char * host_name
char * host_filter
char * hostgroup_name
char * service_desc
char * servicegroup_name
char * service_filter
int host_alert
int show_all_hosts
int show_all_hostgroups
int show_all_servicegroups
int display_type
int overview_columns
int max_grid_width
int group_style_type
int navbar_search
int CGI_ID

Function Documentation

void cgi_config_file_error ( char *  config_file  ) 

int determine_archive_to_use_from_time ( time_t  target_time  ) 

void determine_log_rotation_times ( int  archive  ) 

void display_context_help ( char *  chid  ) 

void display_info_table ( char *  title,
int  refresh,
authdata current_authdata,
int  daemon_check 
)

void display_nav_table ( char *  url,
int  archive 
)

void display_splunk_generic_url ( char *  buf,
int  icon 
)

void display_splunk_host_url ( host hst  ) 

void display_splunk_service_url ( service svc  ) 

void document_footer ( int  cgi_id  ) 

void document_header ( int  cgi_id,
int  use_stylesheet 
)

char* escape_newlines ( char *  rawbuf  ) 

char* escape_string ( char *  input  ) 

void free_lifo_memory ( void   ) 

void free_memory ( void   ) 

char* get_cgi_config_location ( void   ) 

char* get_cmd_file_location ( void   ) 

char* get_export_csv_link ( char *  cgi  ) 

void get_interval_time_string ( double  time_units,
char *  buffer,
int  buffer_length 
)

void get_log_archive_to_use ( int  archive,
char *  buffer,
int  buffer_length 
)

void get_time_string ( time_t *  raw_time,
char *  buffer,
int  buffer_length,
int  type 
)

char* html_encode ( char *  input,
int  escape_newlines 
)

void include_ssi_file ( char *  filename  ) 

void include_ssi_files ( char *  cgi_name,
int  type 
)

int log_debug_info ( int  leve,
int  verbosity,
const char *  fmt,
  ... 
)

void logit ( int  data_type,
int  display,
const char *  fmt,
  ... 
)

void main_config_file_error ( char *  config_file  ) 

void object_data_error ( void   ) 

char* pop_lifo ( void   ) 

void print_error ( char *  config_file,
int  error_type 
)

void print_extra_hostgroup_url ( char *  group_name,
char *  url 
)

void print_extra_servicegroup_url ( char *  group_name,
char *  url 
)

void print_generic_error_message ( char *  title,
char *  text,
int  returnlevels 
)

int push_lifo ( char *  buffer  ) 

int read_all_object_configuration_data ( char *  config_file,
int  options 
)

int read_all_status_data ( char *  config_file,
int  options 
)

int read_cgi_config_file ( char *  filename  ) 

int read_file_into_lifo ( char *  filename  ) 

int read_main_config_file ( char *  filename  ) 

void reset_cgi_vars ( void   ) 

void sanitize_plugin_output ( char *  buffer  ) 

void status_data_error ( void   ) 

void strip_html_brackets ( char *  buffer  ) 

void strip_splunk_query_terms ( char *  buffer  ) 

char* unescape_newlines ( char *  rawbuf  ) 

char* url_encode ( char *  input  ) 

void write_popup_code ( int  cgi_id  ) 


Variable Documentation

int accept_passive_service_checks

char* action_url_target = NULL

int add_notif_num_hard = 0

int add_notif_num_soft = 0

char alert_message

int CGI_ID

int check_external_commands = 0

int color_transparency_index_b = 255

int color_transparency_index_g = 255

int color_transparency_index_r = 255

char command_file[MAX_FILENAME_LENGTH]

command* command_list

contact* contact_list

contactgroup* contactgroup_list

int content_type = HTML_CONTENT

char* csv_data_enclosure = CSV_DATA_ENCLOSURE

char* csv_delimiter = CSV_DELIMITER

int daemon_check = TRUE

int daemon_mode

int date_format = DATE_FORMAT_US

int default_statusmap_layout_method = 0

int default_statuswrl_layout_method = 0

int display_header = TRUE

int display_type

int embedded = FALSE

int enable_event_handlers

int enable_failure_prediction

int enable_notifications

int enable_splunk_integration = FALSE

char* encoded_html_string = NULL

char encoded_url_string[2][MAX_INPUT_BUFFER]

int escape_html_tags = FALSE

int execute_service_checks

int group_style_type

int host_alert

char* host_down_sound = NULL

char* host_filter

char* host_name

int host_status_has_been_read = FALSE

char* host_unreachable_sound = NULL

hostgroup* hostgroup_list

char* hostgroup_name

hoststatus* hoststatus_list

char* http_charset = NULL

char* illegal_output_chars = NULL

int interval_length = 60

time_t last_command_check

time_t last_log_rotation

time_t last_scheduled_log_rotation = 0L

lifo* lifo_list = NULL

int lock_author_names = TRUE

char log_archive_path[MAX_FILENAME_LENGTH]

int log_external_commands_user = FALSE

char log_file[MAX_FILENAME_LENGTH]

int log_rotation_method = LOG_ROTATION_NONE

char main_config_file[MAX_FILENAME_LENGTH]

int max_grid_width

char nagios_check_command[MAX_INPUT_BUFFER] = ""

int nagios_pid

char nagios_process_info[MAX_INPUT_BUFFER] = ""

int nagios_process_state = STATE_OK

int navbar_search

time_t next_scheduled_log_rotation = 0L

char* normal_sound = NULL

char* notes_url_target = NULL

int obsess_over_services

int overview_columns

int persistent_ack_comments = FALSE

char physical_html_path[MAX_FILENAME_LENGTH]

char physical_images_path[MAX_FILENAME_LENGTH]

char physical_ssi_path[MAX_FILENAME_LENGTH]

char* ping_syntax = NULL

int process_performance_data

time_t program_start

int program_status_has_been_read = FALSE

int refresh = TRUE

int refresh_rate = DEFAULT_REFRESH_RATE

char* service_critical_sound = NULL

char* service_desc

char* service_filter

int service_status_has_been_read = FALSE

char* service_unknown_sound = NULL

char* service_warning_sound = NULL

serviceescalation* serviceescalation_list

char* servicegroup_name

servicestatus* servicestatus_list

int show_all_hostgroups

int show_all_hosts

int show_all_servicegroups

int show_all_services_host_is_authorized_for = TRUE

int show_context_help = FALSE

int showlog_current_states = TRUE

int showlog_initial_states = TRUE

char* splunk_url = NULL

int status_show_long_plugin_output = FALSE

char* statusmap_background_image = NULL

char* statuswrl_include = NULL

int tab_friendly_titles = FALSE

int tac_show_only_hard_state = FALSE

time_t this_scheduled_log_rotation = 0L

timeperiod* timeperiod_list

char url_context_help_path[MAX_FILENAME_LENGTH]

char url_docs_path[MAX_FILENAME_LENGTH]

char url_html_path[MAX_FILENAME_LENGTH]

char url_images_path[MAX_FILENAME_LENGTH]

char url_js_path[MAX_FILENAME_LENGTH]

char url_logo_images_path[MAX_FILENAME_LENGTH]

char url_media_path[MAX_FILENAME_LENGTH]

char url_stylesheets_path[MAX_FILENAME_LENGTH]

int use_authentication = TRUE

int use_pending_states = TRUE

int use_ssl_authentication = FALSE


Generated on Wed Mar 30 17:22:22 2011 for icinga-core by  doxygen 1.4.7