#include "../include/config.h"
#include "../include/common.h"
#include "../include/objects.h"
#include "../include/comments.h"
#include "../include/statusdata.h"
#include "../include/cgiutils.h"
#include "../include/getcgi.h"
#include "../include/cgiauth.h"
#include <gd.h>
#include <gdfonts.h>
#include "../include/skiplist.h"
#define AS_CURRENT_STATE -1 |
#define AS_HARD_STATE 2 |
#define AS_HOST_DOWN 4 |
#define AS_HOST_UNREACHABLE 5 |
#define AS_HOST_UP 3 |
#define AS_NO_DATA 0 |
#define AS_PROGRAM_END 1 |
#define AS_PROGRAM_START 2 |
#define AS_SOFT_STATE 1 |
#define AS_SVC_CRITICAL 9 |
#define AS_SVC_OK 6 |
#define AS_SVC_UNKNOWN 7 |
#define AS_SVC_WARNING 8 |
#define DISPLAY_HOST_TRENDS 0 |
#define DISPLAY_NO_TRENDS 2 |
#define DISPLAY_SERVICE_TRENDS 1 |
#define GET_INPUT_HOST_TARGET 2 |
#define GET_INPUT_NONE 0 |
#define GET_INPUT_OPTIONS 4 |
#define GET_INPUT_SERVICE_TARGET 3 |
#define GET_INPUT_TARGET_TYPE 1 |
#define HOST_DRAWING_HEIGHT 70 |
#define HOST_DRAWING_WIDTH 498 |
#define HOST_DRAWING_X_OFFSET 116 |
#define HOST_DRAWING_Y_OFFSET 55 |
#define MAX_ARCHIVE 65 |
#define MAX_ARCHIVE_BACKTRACKS 60 |
#define MAX_ARCHIVE_SPREAD 65 |
#define MIN_TIMESTAMP_SPACING 10 |
#define SMALL_HOST_DRAWING_HEIGHT 20 |
#define SMALL_HOST_DRAWING_WIDTH 500 |
#define SMALL_HOST_DRAWING_X_OFFSET 0 |
#define SMALL_HOST_DRAWING_Y_OFFSET 0 |
#define SMALL_SVC_DRAWING_HEIGHT 20 |
#define SMALL_SVC_DRAWING_WIDTH 500 |
#define SMALL_SVC_DRAWING_X_OFFSET 0 |
#define SMALL_SVC_DRAWING_Y_OFFSET 0 |
#define SVC_DRAWING_HEIGHT 90 |
#define SVC_DRAWING_WIDTH 498 |
#define SVC_DRAWING_X_OFFSET 116 |
#define SVC_DRAWING_Y_OFFSET 55 |
#define TIMEPERIOD_CUSTOM 0 |
#define TIMEPERIOD_LAST24HOURS 11 |
#define TIMEPERIOD_LAST31DAYS 13 |
#define TIMEPERIOD_LAST7DAYS 12 |
#define TIMEPERIOD_LASTMONTH 6 |
#define TIMEPERIOD_LASTQUARTER 8 |
#define TIMEPERIOD_LASTWEEK 4 |
#define TIMEPERIOD_LASTYEAR 10 |
#define TIMEPERIOD_NEXTPROBLEM 14 |
#define TIMEPERIOD_THISMONTH 5 |
#define TIMEPERIOD_THISQUARTER 7 |
#define TIMEPERIOD_THISWEEK 3 |
#define TIMEPERIOD_THISYEAR 9 |
#define TIMEPERIOD_TODAY 1 |
#define TIMEPERIOD_YESTERDAY 2 |
typedef struct archived_state_struct archived_state |
void add_archived_state | ( | int | , | |
int | , | |||
time_t | , | |||
char * | ||||
) |
void compute_report_times | ( | void | ) |
int convert_host_state_to_archived_state | ( | int | ) |
int convert_service_state_to_archived_state | ( | int | ) |
void convert_timeperiod_to_times | ( | int | ) |
void draw_dashed_line | ( | int | , | |
int | , | |||
int | , | |||
int | , | |||
int | ||||
) |
void draw_horizontal_grid_lines | ( | void | ) |
void draw_time_breakdowns | ( | void | ) |
void draw_timestamp | ( | int | , | |
time_t | ||||
) |
void draw_timestamps | ( | void | ) |
void free_archived_state_list | ( | void | ) |
void get_time_breakdown_string | ( | unsigned | long, | |
unsigned | long, | |||
char * | , | |||
char * | buffer, | |||
int | ||||
) |
void graph_all_trend_data | ( | void | ) |
void graph_trend_data | ( | int | , | |
int | , | |||
time_t | , | |||
time_t | , | |||
time_t | , | |||
char * | ||||
) |
int main | ( | int | argc, | |
char ** | argv | |||
) |
int process_cgivars | ( | void | ) |
void read_archived_state_data | ( | void | ) |
void scan_log_file_for_archived_state_data | ( | char * | ) |
archived_state* as_list = NULL |
int assume_initial_states = TRUE |
int assume_state_retention = TRUE |
int assume_states_during_notrunning = TRUE |
int backtrack_archives = 2 |
int CGI_ID = TRENDS_CGI_ID |
int color_black = 0 |
int color_darkgreen = 0 |
int color_darkred = 0 |
int color_green = 0 |
int color_orange = 0 |
int color_red = 0 |
int color_white = 0 |
int color_yellow = 0 |
int compute_time_from_parts = FALSE |
int content_type |
int daemon_check |
int display_header |
int display_popups = TRUE |
int display_type = DISPLAY_NO_TRENDS |
int drawing_height = 0 |
int drawing_width = 0 |
int drawing_x_offset = 0 |
int drawing_y_offset = 0 |
int earliest_archive = 0 |
int earliest_state = AS_NO_DATA |
time_t earliest_time |
int embedded |
int end_day = 1 |
int end_hour = 24 |
int end_minute = 0 |
int end_month = 1 |
int end_second = 0 |
int end_year = 2000 |
char* host_filter = NULL |
char* host_name = "" |
char* hostgroup_name = NULL |
FILE* image_file = NULL |
int image_height = 300 |
int image_width = 900 |
int include_soft_states = FALSE |
int initial_assumed_host_state = AS_NO_DATA |
int initial_assumed_service_state = AS_NO_DATA |
int input_type = GET_INPUT_NONE |
int last_known_state = AS_NO_DATA |
int latest_state = AS_NO_DATA |
time_t latest_time |
char main_config_file[MAX_FILENAME_LENGTH] |
skiplist* object_skiplists[NUM_OBJECT_SKIPLISTS] |
char physical_images_path[MAX_FILENAME_LENGTH] |
int problem_found |
char* service_desc = "" |
char* service_filter = NULL |
char* servicegroup_name = NULL |
int show_all_hostgroups = TRUE |
int show_all_hosts = TRUE |
int show_all_servicegroups = TRUE |
int small_image = FALSE |
int start_day = 1 |
int start_hour = 0 |
int start_minute = 0 |
int start_month = 1 |
int start_second = 0 |
int start_year = 2000 |
time_t t1 |
time_t t2 |
unsigned long time_critical = 0L |
unsigned long time_down = 0L |
unsigned long time_ok = 0L |
unsigned long time_unknown = 0L |
unsigned long time_unreachable = 0L |
unsigned long time_up = 0L |
unsigned long time_warning = 0L |
int timeperiod_type = TIMEPERIOD_LAST24HOURS |
gdImagePtr trends_image = 0 |
char url_html_path[MAX_FILENAME_LENGTH] |
char url_images_path[MAX_FILENAME_LENGTH] |
char url_js_path[MAX_FILENAME_LENGTH] |
char url_stylesheets_path[MAX_FILENAME_LENGTH] |
int use_map = TRUE |
int zoom_factor = 4 |