base/commands.c File Reference

#include "../include/config.h"
#include "../include/common.h"
#include "../include/comments.h"
#include "../include/downtime.h"
#include "../include/statusdata.h"
#include "../include/perfdata.h"
#include "../include/sretention.h"
#include "../include/broker.h"
#include "../include/icinga.h"

Functions

int check_for_external_commands (void)
int process_external_commands_from_file (char *fname, int delete_file)
int process_external_command1 (char *cmd)
int process_external_command2 (int cmd, time_t entry_time, char *args)
int process_host_command (int cmd, time_t entry_time, char *args)
int process_hostgroup_command (int cmd, time_t entry_time, char *args)
int process_service_command (int cmd, time_t entry_time, char *args)
int process_servicegroup_command (int cmd, time_t entry_time, char *args)
int process_contact_command (int cmd, time_t entry_time, char *args)
int process_contactgroup_command (int cmd, time_t entry_time, char *args)
int cmd_add_comment (int cmd, time_t entry_time, char *args)
int cmd_delete_comment (int cmd, char *args)
int cmd_delete_all_comments (int cmd, char *args)
int cmd_delay_notification (int cmd, char *args)
int cmd_schedule_check (int cmd, char *args)
int cmd_schedule_host_service_checks (int cmd, char *args, int force)
int cmd_signal_process (int cmd, char *args)
int cmd_process_service_check_result (int cmd, time_t check_time, char *args)
int process_passive_service_check (time_t check_time, char *host_name, char *svc_description, int return_code, char *output)
int cmd_process_host_check_result (int cmd, time_t check_time, char *args)
int process_passive_host_check (time_t check_time, char *host_name, int return_code, char *output)
int cmd_acknowledge_problem (int cmd, char *args)
int cmd_remove_acknowledgement (int cmd, char *args)
int cmd_schedule_downtime (int cmd, time_t entry_time, char *args)
int cmd_delete_downtime (int cmd, char *args)
int cmd_change_object_int_var (int cmd, char *args)
int cmd_change_object_char_var (int cmd, char *args)
int cmd_change_object_custom_var (int cmd, char *args)
int cmd_process_external_commands_from_file (int cmd, char *args)
void disable_service_checks (service *svc)
void enable_service_checks (service *svc)
void enable_all_notifications (void)
void disable_all_notifications (void)
void enable_service_notifications (service *svc)
void disable_service_notifications (service *svc)
void enable_host_notifications (host *hst)
void disable_host_notifications (host *hst)
void enable_and_propagate_notifications (host *hst, int level, int affect_top_host, int affect_hosts, int affect_services)
void disable_and_propagate_notifications (host *hst, int level, int affect_top_host, int affect_hosts, int affect_services)
void enable_contact_host_notifications (contact *cntct)
void disable_contact_host_notifications (contact *cntct)
void enable_contact_service_notifications (contact *cntct)
void disable_contact_service_notifications (contact *cntct)
void schedule_and_propagate_downtime (host *temp_host, time_t entry_time, char *author, char *comment_data, time_t start_time, time_t end_time, int fixed, unsigned long triggered_by, unsigned long duration)
void acknowledge_host_problem (host *hst, char *ack_author, char *ack_data, int type, int notify, int persistent)
void acknowledge_service_problem (service *svc, char *ack_author, char *ack_data, int type, int notify, int persistent)
void remove_host_acknowledgement (host *hst)
void remove_service_acknowledgement (service *svc)
void start_executing_service_checks (void)
void stop_executing_service_checks (void)
void start_accepting_passive_service_checks (void)
void stop_accepting_passive_service_checks (void)
void enable_passive_service_checks (service *svc)
void disable_passive_service_checks (service *svc)
void start_executing_host_checks (void)
void stop_executing_host_checks (void)
void start_accepting_passive_host_checks (void)
void stop_accepting_passive_host_checks (void)
void enable_passive_host_checks (host *hst)
void disable_passive_host_checks (host *hst)
void start_using_event_handlers (void)
void stop_using_event_handlers (void)
void enable_service_event_handler (service *svc)
void disable_service_event_handler (service *svc)
void enable_host_event_handler (host *hst)
void disable_host_event_handler (host *hst)
void disable_host_checks (host *hst)
void enable_host_checks (host *hst)
void start_obsessing_over_service_checks (void)
void stop_obsessing_over_service_checks (void)
void start_obsessing_over_host_checks (void)
void stop_obsessing_over_host_checks (void)
void enable_service_freshness_checks (void)
void disable_service_freshness_checks (void)
void enable_host_freshness_checks (void)
void disable_host_freshness_checks (void)
void enable_all_failure_prediction (void)
void disable_all_failure_prediction (void)
void enable_performance_data (void)
void disable_performance_data (void)
void start_obsessing_over_service (service *svc)
void stop_obsessing_over_service (service *svc)
void start_obsessing_over_host (host *hst)
void stop_obsessing_over_host (host *hst)
void set_host_notification_number (host *hst, int num)
void set_service_notification_number (service *svc, int num)
void process_passive_checks (void)

Variables

char * config_file
char * log_file
char * command_file
char * temp_file
char * temp_path
int sigshutdown
int sigrestart
int check_external_commands
int ipc_pipe [2]
time_t last_command_check
time_t last_command_status_update
int command_check_interval
int enable_notifications
int execute_service_checks
int accept_passive_service_checks
int execute_host_checks
int accept_passive_host_checks
int enable_event_handlers
int obsess_over_services
int obsess_over_hosts
int check_service_freshness
int check_host_freshness
int enable_failure_prediction
int process_performance_data
int log_external_commands
int log_external_commands_user
int log_passive_checks
unsigned long modified_host_process_attributes
unsigned long modified_service_process_attributes
char * global_host_event_handler
char * global_service_event_handler
commandglobal_host_event_handler_ptr
commandglobal_service_event_handler_ptr
hosthost_list
serviceservice_list
FILE * command_file_fp
int command_file_fd
passive_check_resultpassive_check_result_list = NULL
passive_check_resultpassive_check_result_list_tail = NULL
pthread_t worker_threads [TOTAL_WORKER_THREADS]
circular_buffer external_command_buffer
int external_command_buffer_slots

Function Documentation

void acknowledge_host_problem ( host hst,
char *  ack_author,
char *  ack_data,
int  type,
int  notify,
int  persistent 
)

void acknowledge_service_problem ( service svc,
char *  ack_author,
char *  ack_data,
int  type,
int  notify,
int  persistent 
)

int check_for_external_commands ( void   ) 

int cmd_acknowledge_problem ( int  cmd,
char *  args 
)

int cmd_add_comment ( int  cmd,
time_t  entry_time,
char *  args 
)

int cmd_change_object_char_var ( int  cmd,
char *  args 
)

int cmd_change_object_custom_var ( int  cmd,
char *  args 
)

int cmd_change_object_int_var ( int  cmd,
char *  args 
)

int cmd_delay_notification ( int  cmd,
char *  args 
)

int cmd_delete_all_comments ( int  cmd,
char *  args 
)

int cmd_delete_comment ( int  cmd,
char *  args 
)

int cmd_delete_downtime ( int  cmd,
char *  args 
)

int cmd_process_external_commands_from_file ( int  cmd,
char *  args 
)

int cmd_process_host_check_result ( int  cmd,
time_t  check_time,
char *  args 
)

int cmd_process_service_check_result ( int  cmd,
time_t  check_time,
char *  args 
)

int cmd_remove_acknowledgement ( int  cmd,
char *  args 
)

int cmd_schedule_check ( int  cmd,
char *  args 
)

int cmd_schedule_downtime ( int  cmd,
time_t  entry_time,
char *  args 
)

int cmd_schedule_host_service_checks ( int  cmd,
char *  args,
int  force 
)

int cmd_signal_process ( int  cmd,
char *  args 
)

void disable_all_failure_prediction ( void   ) 

void disable_all_notifications ( void   ) 

void disable_and_propagate_notifications ( host hst,
int  level,
int  affect_top_host,
int  affect_hosts,
int  affect_services 
)

void disable_contact_host_notifications ( contact cntct  ) 

void disable_contact_service_notifications ( contact cntct  ) 

void disable_host_checks ( host hst  ) 

void disable_host_event_handler ( host hst  ) 

void disable_host_freshness_checks ( void   ) 

void disable_host_notifications ( host hst  ) 

void disable_passive_host_checks ( host hst  ) 

void disable_passive_service_checks ( service svc  ) 

void disable_performance_data ( void   ) 

void disable_service_checks ( service svc  ) 

void disable_service_event_handler ( service svc  ) 

void disable_service_freshness_checks ( void   ) 

void disable_service_notifications ( service svc  ) 

void enable_all_failure_prediction ( void   ) 

void enable_all_notifications ( void   ) 

void enable_and_propagate_notifications ( host hst,
int  level,
int  affect_top_host,
int  affect_hosts,
int  affect_services 
)

void enable_contact_host_notifications ( contact cntct  ) 

void enable_contact_service_notifications ( contact cntct  ) 

void enable_host_checks ( host hst  ) 

void enable_host_event_handler ( host hst  ) 

void enable_host_freshness_checks ( void   ) 

void enable_host_notifications ( host hst  ) 

void enable_passive_host_checks ( host hst  ) 

void enable_passive_service_checks ( service svc  ) 

void enable_performance_data ( void   ) 

void enable_service_checks ( service svc  ) 

void enable_service_event_handler ( service svc  ) 

void enable_service_freshness_checks ( void   ) 

void enable_service_notifications ( service svc  ) 

int process_contact_command ( int  cmd,
time_t  entry_time,
char *  args 
)

int process_contactgroup_command ( int  cmd,
time_t  entry_time,
char *  args 
)

int process_external_command1 ( char *  cmd  ) 

int process_external_command2 ( int  cmd,
time_t  entry_time,
char *  args 
)

int process_external_commands_from_file ( char *  fname,
int  delete_file 
)

int process_host_command ( int  cmd,
time_t  entry_time,
char *  args 
)

int process_hostgroup_command ( int  cmd,
time_t  entry_time,
char *  args 
)

void process_passive_checks ( void   ) 

int process_passive_host_check ( time_t  check_time,
char *  host_name,
int  return_code,
char *  output 
)

int process_passive_service_check ( time_t  check_time,
char *  host_name,
char *  svc_description,
int  return_code,
char *  output 
)

int process_service_command ( int  cmd,
time_t  entry_time,
char *  args 
)

int process_servicegroup_command ( int  cmd,
time_t  entry_time,
char *  args 
)

void remove_host_acknowledgement ( host hst  ) 

void remove_service_acknowledgement ( service svc  ) 

void schedule_and_propagate_downtime ( host temp_host,
time_t  entry_time,
char *  author,
char *  comment_data,
time_t  start_time,
time_t  end_time,
int  fixed,
unsigned long  triggered_by,
unsigned long  duration 
)

void set_host_notification_number ( host hst,
int  num 
)

void set_service_notification_number ( service svc,
int  num 
)

void start_accepting_passive_host_checks ( void   ) 

void start_accepting_passive_service_checks ( void   ) 

void start_executing_host_checks ( void   ) 

void start_executing_service_checks ( void   ) 

void start_obsessing_over_host ( host hst  ) 

void start_obsessing_over_host_checks ( void   ) 

void start_obsessing_over_service ( service svc  ) 

void start_obsessing_over_service_checks ( void   ) 

void start_using_event_handlers ( void   ) 

void stop_accepting_passive_host_checks ( void   ) 

void stop_accepting_passive_service_checks ( void   ) 

void stop_executing_host_checks ( void   ) 

void stop_executing_service_checks ( void   ) 

void stop_obsessing_over_host ( host hst  ) 

void stop_obsessing_over_host_checks ( void   ) 

void stop_obsessing_over_service ( service svc  ) 

void stop_obsessing_over_service_checks ( void   ) 

void stop_using_event_handlers ( void   ) 


Variable Documentation

int accept_passive_host_checks

int accept_passive_service_checks

int check_external_commands

int check_host_freshness

int check_service_freshness

int command_check_interval

char* command_file

int command_file_fd

FILE* command_file_fp

char* config_file

int enable_event_handlers

int enable_failure_prediction

int enable_notifications

int execute_host_checks

int execute_service_checks

circular_buffer external_command_buffer

int external_command_buffer_slots

char* global_host_event_handler

command* global_host_event_handler_ptr

char* global_service_event_handler

command* global_service_event_handler_ptr

host* host_list

int ipc_pipe[2]

time_t last_command_check

time_t last_command_status_update

int log_external_commands

int log_external_commands_user

char* log_file

int log_passive_checks

unsigned long modified_host_process_attributes

unsigned long modified_service_process_attributes

int obsess_over_hosts

int obsess_over_services

passive_check_result* passive_check_result_list = NULL

passive_check_result* passive_check_result_list_tail = NULL

int process_performance_data

service* service_list

int sigrestart

int sigshutdown

char* temp_file

char* temp_path

pthread_t worker_threads[TOTAL_WORKER_THREADS]


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