org.blue.cgi
Class cgiutils

java.lang.Object
  extended by org.blue.cgi.cgiutils

public class cgiutils
extends java.lang.Object


Nested Class Summary
static class cgiutils.time_breakdown
           
 
Field Summary
static int check_external_commands
           
static java.lang.String command_file
           
static int commands_have_been_read
           
static int contactgroups_have_been_read
           
static int contacts_have_been_read
           
static int date_format
           
static int default_statusmap_layout_method
           
static int default_statuswrl_layout_method
           
static java.lang.String host_down_sound
           
static int host_status_has_been_read
           
static java.lang.String host_unreachable_sound
           
static int hostdependencies_have_been_read
           
static int hostescalations_have_been_read
           
static int hostextinfo_have_been_read
           
static int hostgroups_have_been_read
           
static int hosts_have_been_read
           
static int interval_length
           
static boolean is_servlet
           
static long last_scheduled_log_rotation
           
static java.util.Stack<java.lang.String> lifo_list
           
static java.lang.String log_archive_path
           
static java.lang.String log_file
           
static int log_rotation_method
           
static java.lang.String main_config_file
           
static java.lang.String nagios_cgi_config
           
static java.lang.String nagios_check_command
           
static java.lang.String nagios_command_file
           
static java.lang.String nagios_process_info
           
static int nagios_process_state
           
static long next_scheduled_log_rotation
           
static java.lang.String normal_sound
           
static java.lang.String physical_html_path
           
static java.lang.String physical_images_path
           
static java.lang.String physical_ssi_path
           
static java.lang.String ping_syntax
           
static int program_status_has_been_read
           
static int refresh_rate
           
static java.lang.String service_critical_sound
           
static int service_status_has_been_read
           
static java.lang.String service_unknown_sound
           
static java.lang.String service_warning_sound
           
static int servicedependencies_have_been_read
           
static int serviceescalations_have_been_read
           
static int serviceextinfo_have_been_read
           
static int servicegroups_have_been_read
           
static int services_have_been_read
           
static int show_context_help
           
static java.lang.String statusmap_background_image
           
static java.lang.String statuswrl_include
           
static long this_scheduled_log_rotation
           
static int timeperiods_have_been_read
           
static java.lang.String url_context_help_path
           
static java.lang.String url_docs_path
           
static java.lang.String url_html_path
           
static java.lang.String url_images_path
           
static java.lang.String url_logo_images_path
           
static java.lang.String url_media_path
           
static java.lang.String url_stylesheets_path
           
static int use_authentication
           
 
Constructor Summary
cgiutils()
           
 
Method Summary
static void cgi_config_file_error(java.lang.String config_file)
           
static int determine_archive_to_use_from_time(long target_time)
           
static void determine_log_rotation_times(int archive)
           
static void display_context_help(java.lang.String chid)
           
static void display_info_table(java.lang.String title, int refresh, cgiauth_h.authdata current_authdata)
          COMMON HTML FUNCTIONS ********************
static void display_nav_table(java.lang.String url, int archive)
           
static void exit(int result)
          CLEANUP FUNCTIONS **********************
static void free_lifo_memory()
           
static void free_memory()
           
static java.lang.String get_cgi_config_location()
          CONFIG FILE FUNCTIONS ********************
static java.lang.String get_cmd_file_location()
           
static java.lang.String get_interval_time_string(int time_units)
           
static java.lang.String get_log_archive_to_use(int archive)
           
static cgiutils.time_breakdown get_time_breakdown(long raw_time)
           
static java.lang.String get_time_string(long raw_time, int type)
           
static java.lang.String html_encode(java.lang.String input_string)
           
static void include_ssi_file(java.lang.String filename)
           
static void include_ssi_files(java.lang.String cgi_name, int type)
           
static void main_config_file_error(java.lang.String config_file)
           
static int mmap_fclose(cgiutils_h.mmapfile temp_mmapfile)
           
static java.lang.String mmap_fgets(cgiutils_h.mmapfile temp_mmapfile)
           
static cgiutils_h.mmapfile mmap_fopen(java.lang.String filename)
           
static void object_data_error()
           
static java.lang.String pop_lifo()
           
static void print_extra_host_url(java.lang.String host_name, java.lang.String url)
           
static void print_extra_service_url(java.lang.String host_name, java.lang.String svc_description, java.lang.String url)
           
static int push_lifo(java.lang.String buffer)
           
static int read_all_object_configuration_data(java.lang.String config_file, int options)
           
static int read_all_status_data(java.lang.String config_file, int options)
           
static int read_cgi_config_file(java.lang.String filename)
           
static int read_file_into_lifo(java.lang.String filename)
          LIFO FUNCTIONS ***********************
static int read_main_config_file(java.lang.String filename)
           
static void reset_cgi_vars()
           
static java.lang.String sanitize_plugin_output(java.lang.String buffer)
           
static void status_data_error()
           
static java.lang.String url_encode(java.lang.String input)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

main_config_file

public static java.lang.String main_config_file

log_file

public static java.lang.String log_file

log_archive_path

public static java.lang.String log_archive_path

command_file

public static java.lang.String command_file

physical_html_path

public static java.lang.String physical_html_path

physical_images_path

public static java.lang.String physical_images_path

physical_ssi_path

public static java.lang.String physical_ssi_path

url_html_path

public static java.lang.String url_html_path

url_docs_path

public static java.lang.String url_docs_path

url_context_help_path

public static java.lang.String url_context_help_path

url_images_path

public static java.lang.String url_images_path

url_logo_images_path

public static java.lang.String url_logo_images_path

url_stylesheets_path

public static java.lang.String url_stylesheets_path

url_media_path

public static java.lang.String url_media_path

service_critical_sound

public static java.lang.String service_critical_sound

service_warning_sound

public static java.lang.String service_warning_sound

service_unknown_sound

public static java.lang.String service_unknown_sound

host_down_sound

public static java.lang.String host_down_sound

host_unreachable_sound

public static java.lang.String host_unreachable_sound

normal_sound

public static java.lang.String normal_sound

statusmap_background_image

public static java.lang.String statusmap_background_image

statuswrl_include

public static java.lang.String statuswrl_include

ping_syntax

public static java.lang.String ping_syntax

nagios_check_command

public static java.lang.String nagios_check_command

nagios_process_info

public static java.lang.String nagios_process_info

nagios_process_state

public static int nagios_process_state

check_external_commands

public static int check_external_commands

date_format

public static int date_format

log_rotation_method

public static int log_rotation_method

this_scheduled_log_rotation

public static long this_scheduled_log_rotation

last_scheduled_log_rotation

public static long last_scheduled_log_rotation

next_scheduled_log_rotation

public static long next_scheduled_log_rotation

use_authentication

public static int use_authentication

interval_length

public static int interval_length

show_context_help

public static int show_context_help

hosts_have_been_read

public static int hosts_have_been_read

hostgroups_have_been_read

public static int hostgroups_have_been_read

servicegroups_have_been_read

public static int servicegroups_have_been_read

contacts_have_been_read

public static int contacts_have_been_read

contactgroups_have_been_read

public static int contactgroups_have_been_read

services_have_been_read

public static int services_have_been_read

timeperiods_have_been_read

public static int timeperiods_have_been_read

commands_have_been_read

public static int commands_have_been_read

servicedependencies_have_been_read

public static int servicedependencies_have_been_read

serviceescalations_have_been_read

public static int serviceescalations_have_been_read

hostdependencies_have_been_read

public static int hostdependencies_have_been_read

hostescalations_have_been_read

public static int hostescalations_have_been_read

hostextinfo_have_been_read

public static int hostextinfo_have_been_read

serviceextinfo_have_been_read

public static int serviceextinfo_have_been_read

host_status_has_been_read

public static int host_status_has_been_read

service_status_has_been_read

public static int service_status_has_been_read

program_status_has_been_read

public static int program_status_has_been_read

refresh_rate

public static int refresh_rate

default_statusmap_layout_method

public static int default_statusmap_layout_method

default_statuswrl_layout_method

public static int default_statuswrl_layout_method

lifo_list

public static java.util.Stack<java.lang.String> lifo_list

nagios_cgi_config

public static java.lang.String nagios_cgi_config

nagios_command_file

public static java.lang.String nagios_command_file

is_servlet

public static boolean is_servlet
Constructor Detail

cgiutils

public cgiutils()
Method Detail

exit

public static void exit(int result)
CLEANUP FUNCTIONS **********************


reset_cgi_vars

public static void reset_cgi_vars()

free_memory

public static void free_memory()

get_cgi_config_location

public static java.lang.String get_cgi_config_location()
CONFIG FILE FUNCTIONS ********************


get_cmd_file_location

public static java.lang.String get_cmd_file_location()

read_cgi_config_file

public static int read_cgi_config_file(java.lang.String filename)

read_main_config_file

public static int read_main_config_file(java.lang.String filename)

read_all_object_configuration_data

public static int read_all_object_configuration_data(java.lang.String config_file,
                                                     int options)

read_all_status_data

public static int read_all_status_data(java.lang.String config_file,
                                       int options)

read_file_into_lifo

public static int read_file_into_lifo(java.lang.String filename)
LIFO FUNCTIONS ***********************


free_lifo_memory

public static void free_lifo_memory()

push_lifo

public static int push_lifo(java.lang.String buffer)

pop_lifo

public static java.lang.String pop_lifo()

sanitize_plugin_output

public static java.lang.String sanitize_plugin_output(java.lang.String buffer)

get_time_string

public static java.lang.String get_time_string(long raw_time,
                                               int type)

get_interval_time_string

public static java.lang.String get_interval_time_string(int time_units)

mmap_fopen

public static cgiutils_h.mmapfile mmap_fopen(java.lang.String filename)

mmap_fclose

public static int mmap_fclose(cgiutils_h.mmapfile temp_mmapfile)

mmap_fgets

public static java.lang.String mmap_fgets(cgiutils_h.mmapfile temp_mmapfile)

get_time_breakdown

public static cgiutils.time_breakdown get_time_breakdown(long raw_time)

url_encode

public static java.lang.String url_encode(java.lang.String input)

html_encode

public static java.lang.String html_encode(java.lang.String input_string)

get_log_archive_to_use

public static java.lang.String get_log_archive_to_use(int archive)

determine_archive_to_use_from_time

public static int determine_archive_to_use_from_time(long target_time)

determine_log_rotation_times

public static void determine_log_rotation_times(int archive)

display_info_table

public static void display_info_table(java.lang.String title,
                                      int refresh,
                                      cgiauth_h.authdata current_authdata)
COMMON HTML FUNCTIONS ********************


display_nav_table

public static void display_nav_table(java.lang.String url,
                                     int archive)

print_extra_host_url

public static void print_extra_host_url(java.lang.String host_name,
                                        java.lang.String url)

print_extra_service_url

public static void print_extra_service_url(java.lang.String host_name,
                                           java.lang.String svc_description,
                                           java.lang.String url)

include_ssi_files

public static void include_ssi_files(java.lang.String cgi_name,
                                     int type)

include_ssi_file

public static void include_ssi_file(java.lang.String filename)

cgi_config_file_error

public static void cgi_config_file_error(java.lang.String config_file)

main_config_file_error

public static void main_config_file_error(java.lang.String config_file)

object_data_error

public static void object_data_error()

status_data_error

public static void status_data_error()

display_context_help

public static void display_context_help(java.lang.String chid)