Icinga-core 1.4.0
next gen monitoring
cgi/history.c File Reference

cgi to browse through log history of a host/service More...

#include "../include/config.h"
#include "../include/common.h"
#include "../include/objects.h"
#include "../include/getcgi.h"
#include "../include/cgiutils.h"
#include "../include/cgiauth.h"
#include "../include/readlogs.h"

Go to the source code of this file.

Functions

void show_history (void)
 displays the requested historical log entries
int process_cgivars (void)
 Parses the requested GET/POST variables.
int main (void)
 Yes we need a main function.

Variables

External vars
char main_config_file [MAX_FILENAME_LENGTH]
char url_html_path [MAX_FILENAME_LENGTH]
char url_images_path [MAX_FILENAME_LENGTH]
char url_stylesheets_path [MAX_FILENAME_LENGTH]
char url_js_path [MAX_FILENAME_LENGTH]
int log_rotation_method
int enable_splunk_integration
int embedded
int display_header
int daemon_check
logentryentry_list
Vars which are imported for cgiutils
Warning:
these wars should be all extern,
then they could get deleted, because they aren't used here.
cgiutils.c , needs them
int show_all_hostgroups = TRUE
int show_all_servicegroups = TRUE
char * host_filter = NULL
char * hostgroup_name = NULL
char * servicegroup_name = NULL
char * service_filter = NULL
Internal vars
int log_archive = 0
int display_type = DISPLAY_HOSTS
int show_all_hosts = TRUE
int reverse = FALSE
int history_options = HISTORY_ALL
int state_options = STATE_ALL
int display_frills = TRUE
int display_timebreaks = TRUE
int display_system_messages = TRUE
int display_flapping_alerts = TRUE
int display_downtime_alerts = TRUE
char * host_name = "all"
char * service_desc = ""
char log_file_to_use [MAX_FILENAME_LENGTH]
authdata current_authdata
int CGI_ID = HISTORY_CGI_ID

Detailed Description

cgi to browse through log history of a host/service

Definition in file history.c.


Function Documentation

int main ( void  )

Yes we need a main function.

Definition at line 110 of file history.c.

int process_cgivars ( void  )

Parses the requested GET/POST variables.

Returns:
wether parsing was successful or not
Return values:
TRUE
FALSE
This function parses the request and set's the necessary variables
void show_history ( void  )

displays the requested historical log entries

Applies the requested filters, reads in all necessary log files and afterwards showing each log entry.

Definition at line 447 of file history.c.


Variable Documentation

int CGI_ID = HISTORY_CGI_ID

ID to identify the cgi for functions in cgiutils.c

Definition at line 90 of file history.c.

struct to hold current authentication data

Definition at line 88 of file history.c.

Definition at line 169 of file cgiutils.c.

determine if downtime alerts should be shown

Definition at line 82 of file history.c.

determine if flapping alerts should be shown

Definition at line 81 of file history.c.

int display_frills = TRUE

determine if icons should be shown in listing

Definition at line 78 of file history.c.

Definition at line 167 of file cgiutils.c.

determine if system messages should be shown

Definition at line 80 of file history.c.

int display_timebreaks = TRUE

determine if time breaks should be shown

Definition at line 79 of file history.c.

int display_type = DISPLAY_HOSTS

determine the view (host/service)

Definition at line 72 of file history.c.

int embedded

Definition at line 166 of file cgiutils.c.

Definition at line 72 of file cgiutils.c.

the list with all current logentries

Definition at line 36 of file readlogs.c.

int history_options = HISTORY_ALL

determines the type of historical data

Definition at line 75 of file history.c.

char* host_filter = NULL

Definition at line 63 of file history.c.

char* host_name = "all"

the requested host name

Definition at line 84 of file history.c.

char* hostgroup_name = NULL

requested hostgroup name

Definition at line 64 of file history.c.

int log_archive = 0

holds the archive id, which should be shown

Definition at line 71 of file history.c.

char log_file_to_use[MAX_FILENAME_LENGTH]

the name of the logfile to read data from

Definition at line 86 of file history.c.

readlogs.c

Definition at line 174 of file icinga.c.

char main_config_file[MAX_FILENAME_LENGTH]

Definition at line 50 of file icingastats.c.

int reverse = FALSE

determine if log should be viewed in reverse order

Definition at line 74 of file history.c.

char* service_desc = ""

the requested service name

Definition at line 85 of file history.c.

char* service_filter = NULL

Definition at line 66 of file history.c.

char* servicegroup_name = NULL

requested servicegroup name

Definition at line 65 of file history.c.

int show_all_hostgroups = TRUE

Definition at line 61 of file history.c.

int show_all_hosts = TRUE

if historical data is requested for all hosts

Definition at line 73 of file history.c.

Definition at line 62 of file history.c.

int state_options = STATE_ALL

the state of historical data

Definition at line 76 of file history.c.

char url_html_path[MAX_FILENAME_LENGTH]

Definition at line 38 of file cgiutils.c.

char url_images_path[MAX_FILENAME_LENGTH]

Definition at line 41 of file cgiutils.c.

char url_js_path[MAX_FILENAME_LENGTH]

Definition at line 44 of file cgiutils.c.

char url_stylesheets_path[MAX_FILENAME_LENGTH]

Definition at line 43 of file cgiutils.c.

 All Data Structures Files Functions Variables Typedefs Defines