org.blue.cgi
Class avail

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.blue.cgi.blue_servlet
              extended by org.blue.cgi.avail
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class avail
extends blue_servlet

See Also:
Serialized Form

Nested Class Summary
static class avail.archived_state
           
static class avail.avail_subject
           
 
Field Summary
static int AS_CURRENT_STATE
           
static int AS_HARD_STATE
           
static int AS_HOST_DOWN
           
static int AS_HOST_DOWNTIME_END
           
static int AS_HOST_DOWNTIME_START
           
static int AS_HOST_UNREACHABLE
           
static int AS_HOST_UP
           
static int AS_NO_DATA
           
static int AS_PROGRAM_END
           
static int AS_PROGRAM_START
           
static int AS_SOFT_STATE
           
static int AS_SVC_CRITICAL
           
static int AS_SVC_DOWNTIME_END
           
static int AS_SVC_DOWNTIME_START
           
static int AS_SVC_OK
           
static int AS_SVC_UNKNOWN
           
static int AS_SVC_WARNING
           
static int assume_initial_states
           
static int assume_state_retention
           
static int assume_states_during_notrunning
           
static int backtrack_archives
           
static int compute_time_from_parts
           
static int CSV_OUTPUT
           
static cgiauth_h.authdata current_authdata
           
static objects_h.timeperiod current_timeperiod
           
static int display_header
           
static int DISPLAY_HOST_AVAIL
           
static int DISPLAY_HOSTGROUP_AVAIL
           
static int DISPLAY_NO_AVAIL
           
static int DISPLAY_SERVICE_AVAIL
           
static int DISPLAY_SERVICEGROUP_AVAIL
           
static int display_type
           
static int earliest_archive
           
static int embedded
           
static int end_day
           
static int end_hour
           
static int end_minute
           
static int end_month
           
static int end_second
           
static int end_year
           
static int full_log_entries
           
static int get_date_parts
           
static java.lang.String host_name
           
static int HOST_SUBJECT
           
static java.lang.String hostgroup_name
           
static int HTML_OUTPUT
           
static int include_soft_states
           
static int initial_assumed_host_state
           
static int initial_assumed_service_state
           
static int MAX_ARCHIVE
           
static int MAX_ARCHIVE_BACKTRACKS
           
static int MAX_ARCHIVE_SPREAD
           
static int MIN_TIMESTAMP_SPACING
           
static int output_format
           
static int select_hostgroups
           
static int select_hosts
           
static int select_output_format
           
static int select_servicegroups
           
static int select_services
           
static int SERVICE_SUBJECT
           
static java.lang.String servicegroup_name
           
static int show_all_hostgroups
           
static int show_all_hosts
           
static int show_all_servicegroups
           
static int show_all_services
           
static int show_log_entries
           
static int show_scheduled_downtime
           
static int start_day
           
static int start_hour
           
static int start_minute
           
static int start_month
           
static int start_second
           
static int start_year
           
static java.util.ArrayList<avail.avail_subject> subject_list
           
static java.lang.String svc_description
           
static long t1
           
static long t2
           
static int TIMEPERIOD_CUSTOM
           
static int TIMEPERIOD_LAST24HOURS
           
static int TIMEPERIOD_LAST31DAYS
           
static int TIMEPERIOD_LAST7DAYS
           
static int TIMEPERIOD_LASTMONTH
           
static int TIMEPERIOD_LASTQUARTER
           
static int TIMEPERIOD_LASTWEEK
           
static int TIMEPERIOD_LASTYEAR
           
static int TIMEPERIOD_THISMONTH
           
static int TIMEPERIOD_THISQUARTER
           
static int TIMEPERIOD_THISWEEK
           
static int TIMEPERIOD_THISYEAR
           
static int TIMEPERIOD_TODAY
           
static int timeperiod_type
           
static int TIMEPERIOD_YESTERDAY
           
 
Fields inherited from class org.blue.cgi.blue_servlet
request_string
 
Constructor Summary
avail()
           
 
Method Summary
static void add_archived_state(int entry_type, int state_type, long time_stamp, java.lang.String state_info, avail.avail_subject subject)
           
static void add_global_archived_state(int entry_type, int state_type, long time_stamp, java.lang.String state_info)
           
static void add_scheduled_downtime(int state_type, long time_stamp, avail.avail_subject subject)
           
static void add_subject(int subject_type, java.lang.String hn, java.lang.String sd)
           
static long calculate_total_time(long start_time, long end_time)
           
 void call_main()
           
static void compute_availability()
           
static void compute_report_times()
           
static void compute_subject_availability_times(int first_state, int last_state, long real_start_time, long start_time, long end_time, avail.avail_subject subject, avail.archived_state as)
           
static void compute_subject_availability(avail.avail_subject subject, long current_time)
           
static void compute_subject_downlongimes(long start_time, long end_time, avail.avail_subject subject, avail.archived_state sd)
           
static void compute_subject_downtime_part_times(long start_time, long end_time, int subject_state, avail.avail_subject subject)
           
static void compute_subject_downtime(avail.avail_subject subject, long current_time)
           
static int convert_host_state_to_archived_state(int current_status)
           
static int convert_service_state_to_archived_state(int current_status)
           
static void convert_timeperiod_to_times(int type)
           
static void create_subject_list()
           
static void display_host_availability()
           
static void display_hostgroup_availability()
           
static void display_service_availability()
           
static void display_servicegroup_availability()
           
static void display_specific_hostgroup_availability(objects_h.hostgroup hg)
           
static void display_specific_servicegroup_availability(objects_h.servicegroup sg)
           
static void document_footer()
           
static void document_header(int use_stylesheet)
           
static avail.avail_subject find_subject(int type, java.lang.String hn, java.lang.String sd)
           
static void free_availability_data()
           
static double get_running_average(double running_average, double new_value, int current_item)
           
static void host_report_url(java.lang.String hn, java.lang.String label)
           
static void main(java.lang.String[] argv)
           
static int process_cgivars()
           
static void read_archived_state_data()
           
static void scan_log_file_for_archived_state_data(java.lang.String filename)
           
static void service_report_url(java.lang.String hn, java.lang.String sd, java.lang.String label)
           
static void write_log_entries(avail.avail_subject subject)
           
 
Methods inherited from class org.blue.cgi.blue_servlet
doGet, doPost, init
 
Methods inherited from class javax.servlet.http.HttpServlet
service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTML_OUTPUT

public static final int HTML_OUTPUT
See Also:
Constant Field Values

CSV_OUTPUT

public static final int CSV_OUTPUT
See Also:
Constant Field Values

AS_CURRENT_STATE

public static final int AS_CURRENT_STATE
See Also:
Constant Field Values

AS_NO_DATA

public static final int AS_NO_DATA
See Also:
Constant Field Values

AS_PROGRAM_END

public static final int AS_PROGRAM_END
See Also:
Constant Field Values

AS_PROGRAM_START

public static final int AS_PROGRAM_START
See Also:
Constant Field Values

AS_HOST_UP

public static final int AS_HOST_UP
See Also:
Constant Field Values

AS_HOST_DOWN

public static final int AS_HOST_DOWN
See Also:
Constant Field Values

AS_HOST_UNREACHABLE

public static final int AS_HOST_UNREACHABLE
See Also:
Constant Field Values

AS_SVC_OK

public static final int AS_SVC_OK
See Also:
Constant Field Values

AS_SVC_UNKNOWN

public static final int AS_SVC_UNKNOWN
See Also:
Constant Field Values

AS_SVC_WARNING

public static final int AS_SVC_WARNING
See Also:
Constant Field Values

AS_SVC_CRITICAL

public static final int AS_SVC_CRITICAL
See Also:
Constant Field Values

AS_SVC_DOWNTIME_START

public static final int AS_SVC_DOWNTIME_START
See Also:
Constant Field Values

AS_SVC_DOWNTIME_END

public static final int AS_SVC_DOWNTIME_END
See Also:
Constant Field Values

AS_HOST_DOWNTIME_START

public static final int AS_HOST_DOWNTIME_START
See Also:
Constant Field Values

AS_HOST_DOWNTIME_END

public static final int AS_HOST_DOWNTIME_END
See Also:
Constant Field Values

AS_SOFT_STATE

public static final int AS_SOFT_STATE
See Also:
Constant Field Values

AS_HARD_STATE

public static final int AS_HARD_STATE
See Also:
Constant Field Values

DISPLAY_NO_AVAIL

public static final int DISPLAY_NO_AVAIL
See Also:
Constant Field Values

DISPLAY_HOSTGROUP_AVAIL

public static final int DISPLAY_HOSTGROUP_AVAIL
See Also:
Constant Field Values

DISPLAY_HOST_AVAIL

public static final int DISPLAY_HOST_AVAIL
See Also:
Constant Field Values

DISPLAY_SERVICE_AVAIL

public static final int DISPLAY_SERVICE_AVAIL
See Also:
Constant Field Values

DISPLAY_SERVICEGROUP_AVAIL

public static final int DISPLAY_SERVICEGROUP_AVAIL
See Also:
Constant Field Values

HOST_SUBJECT

public static final int HOST_SUBJECT
See Also:
Constant Field Values

SERVICE_SUBJECT

public static final int SERVICE_SUBJECT
See Also:
Constant Field Values

TIMEPERIOD_CUSTOM

public static final int TIMEPERIOD_CUSTOM
See Also:
Constant Field Values

TIMEPERIOD_TODAY

public static final int TIMEPERIOD_TODAY
See Also:
Constant Field Values

TIMEPERIOD_YESTERDAY

public static final int TIMEPERIOD_YESTERDAY
See Also:
Constant Field Values

TIMEPERIOD_THISWEEK

public static final int TIMEPERIOD_THISWEEK
See Also:
Constant Field Values

TIMEPERIOD_LASTWEEK

public static final int TIMEPERIOD_LASTWEEK
See Also:
Constant Field Values

TIMEPERIOD_THISMONTH

public static final int TIMEPERIOD_THISMONTH
See Also:
Constant Field Values

TIMEPERIOD_LASTMONTH

public static final int TIMEPERIOD_LASTMONTH
See Also:
Constant Field Values

TIMEPERIOD_THISQUARTER

public static final int TIMEPERIOD_THISQUARTER
See Also:
Constant Field Values

TIMEPERIOD_LASTQUARTER

public static final int TIMEPERIOD_LASTQUARTER
See Also:
Constant Field Values

TIMEPERIOD_THISYEAR

public static final int TIMEPERIOD_THISYEAR
See Also:
Constant Field Values

TIMEPERIOD_LASTYEAR

public static final int TIMEPERIOD_LASTYEAR
See Also:
Constant Field Values

TIMEPERIOD_LAST24HOURS

public static final int TIMEPERIOD_LAST24HOURS
See Also:
Constant Field Values

TIMEPERIOD_LAST7DAYS

public static final int TIMEPERIOD_LAST7DAYS
See Also:
Constant Field Values

TIMEPERIOD_LAST31DAYS

public static final int TIMEPERIOD_LAST31DAYS
See Also:
Constant Field Values

MIN_TIMESTAMP_SPACING

public static final int MIN_TIMESTAMP_SPACING
See Also:
Constant Field Values

MAX_ARCHIVE_SPREAD

public static final int MAX_ARCHIVE_SPREAD
See Also:
Constant Field Values

MAX_ARCHIVE

public static final int MAX_ARCHIVE
See Also:
Constant Field Values

MAX_ARCHIVE_BACKTRACKS

public static final int MAX_ARCHIVE_BACKTRACKS
See Also:
Constant Field Values

current_authdata

public static cgiauth_h.authdata current_authdata

subject_list

public static java.util.ArrayList<avail.avail_subject> subject_list

t1

public static long t1

t2

public static long t2

display_type

public static int display_type

timeperiod_type

public static int timeperiod_type

show_log_entries

public static int show_log_entries

full_log_entries

public static int full_log_entries

show_scheduled_downtime

public static int show_scheduled_downtime

start_second

public static int start_second

start_minute

public static int start_minute

start_hour

public static int start_hour

start_day

public static int start_day

start_month

public static int start_month

start_year

public static int start_year

end_second

public static int end_second

end_minute

public static int end_minute

end_hour

public static int end_hour

end_day

public static int end_day

end_month

public static int end_month

end_year

public static int end_year

get_date_parts

public static int get_date_parts

select_hostgroups

public static int select_hostgroups

select_hosts

public static int select_hosts

select_servicegroups

public static int select_servicegroups

select_services

public static int select_services

select_output_format

public static int select_output_format

compute_time_from_parts

public static int compute_time_from_parts

show_all_hostgroups

public static int show_all_hostgroups

show_all_hosts

public static int show_all_hosts

show_all_servicegroups

public static int show_all_servicegroups

show_all_services

public static int show_all_services

assume_initial_states

public static int assume_initial_states

assume_state_retention

public static int assume_state_retention

assume_states_during_notrunning

public static int assume_states_during_notrunning

initial_assumed_host_state

public static int initial_assumed_host_state

initial_assumed_service_state

public static int initial_assumed_service_state

include_soft_states

public static int include_soft_states

hostgroup_name

public static java.lang.String hostgroup_name

host_name

public static java.lang.String host_name

servicegroup_name

public static java.lang.String servicegroup_name

svc_description

public static java.lang.String svc_description

backtrack_archives

public static int backtrack_archives

earliest_archive

public static int earliest_archive

embedded

public static int embedded

display_header

public static int display_header

current_timeperiod

public static objects_h.timeperiod current_timeperiod

output_format

public static int output_format
Constructor Detail

avail

public avail()
Method Detail

call_main

public void call_main()
Specified by:
call_main in class blue_servlet

main

public static void main(java.lang.String[] argv)

document_header

public static void document_header(int use_stylesheet)

document_footer

public static void document_footer()

process_cgivars

public static int process_cgivars()

compute_availability

public static void compute_availability()

compute_subject_availability

public static void compute_subject_availability(avail.avail_subject subject,
                                                long current_time)

compute_subject_availability_times

public static void compute_subject_availability_times(int first_state,
                                                      int last_state,
                                                      long real_start_time,
                                                      long start_time,
                                                      long end_time,
                                                      avail.avail_subject subject,
                                                      avail.archived_state as)

compute_subject_downtime

public static void compute_subject_downtime(avail.avail_subject subject,
                                            long current_time)

compute_subject_downlongimes

public static void compute_subject_downlongimes(long start_time,
                                                long end_time,
                                                avail.avail_subject subject,
                                                avail.archived_state sd)

compute_subject_downtime_part_times

public static void compute_subject_downtime_part_times(long start_time,
                                                       long end_time,
                                                       int subject_state,
                                                       avail.avail_subject subject)

convert_host_state_to_archived_state

public static int convert_host_state_to_archived_state(int current_status)

convert_service_state_to_archived_state

public static int convert_service_state_to_archived_state(int current_status)

create_subject_list

public static void create_subject_list()

add_subject

public static void add_subject(int subject_type,
                               java.lang.String hn,
                               java.lang.String sd)

find_subject

public static avail.avail_subject find_subject(int type,
                                               java.lang.String hn,
                                               java.lang.String sd)

add_global_archived_state

public static void add_global_archived_state(int entry_type,
                                             int state_type,
                                             long time_stamp,
                                             java.lang.String state_info)

add_archived_state

public static void add_archived_state(int entry_type,
                                      int state_type,
                                      long time_stamp,
                                      java.lang.String state_info,
                                      avail.avail_subject subject)

add_scheduled_downtime

public static void add_scheduled_downtime(int state_type,
                                          long time_stamp,
                                          avail.avail_subject subject)

free_availability_data

public static void free_availability_data()

read_archived_state_data

public static void read_archived_state_data()

scan_log_file_for_archived_state_data

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

convert_timeperiod_to_times

public static void convert_timeperiod_to_times(int type)

compute_report_times

public static void compute_report_times()

write_log_entries

public static void write_log_entries(avail.avail_subject subject)

display_hostgroup_availability

public static void display_hostgroup_availability()

display_specific_hostgroup_availability

public static void display_specific_hostgroup_availability(objects_h.hostgroup hg)

display_servicegroup_availability

public static void display_servicegroup_availability()

display_specific_servicegroup_availability

public static void display_specific_servicegroup_availability(objects_h.servicegroup sg)

display_host_availability

public static void display_host_availability()

display_service_availability

public static void display_service_availability()

host_report_url

public static void host_report_url(java.lang.String hn,
                                   java.lang.String label)

service_report_url

public static void service_report_url(java.lang.String hn,
                                      java.lang.String sd,
                                      java.lang.String label)

get_running_average

public static double get_running_average(double running_average,
                                         double new_value,
                                         int current_item)

calculate_total_time

public static long calculate_total_time(long start_time,
                                        long end_time)