Icinga-core 1.4.0
next gen monitoring
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"

Go to the source code of this file.

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_delete_downtime_by_host_name (int cmd, char *args)
int cmd_delete_downtime_by_hostgroup_name (int cmd, char *args)
int cmd_delete_downtime_by_start_time_comment (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
int dummy

Function Documentation

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

Definition at line 4081 of file commands.c.

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

Definition at line 4115 of file commands.c.

int check_for_external_commands ( void  )

Definition at line 100 of file commands.c.

int cmd_acknowledge_problem ( int  cmd,
char *  args 
)

Definition at line 2340 of file commands.c.

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

Definition at line 1777 of file commands.c.

int cmd_change_object_char_var ( int  cmd,
char *  args 
)

Definition at line 3125 of file commands.c.

int cmd_change_object_custom_var ( int  cmd,
char *  args 
)

Definition at line 3474 of file commands.c.

int cmd_change_object_int_var ( int  cmd,
char *  args 
)

Definition at line 2841 of file commands.c.

int cmd_delay_notification ( int  cmd,
char *  args 
)

Definition at line 1891 of file commands.c.

int cmd_delete_all_comments ( int  cmd,
char *  args 
)

Definition at line 1856 of file commands.c.

int cmd_delete_comment ( int  cmd,
char *  args 
)

Definition at line 1837 of file commands.c.

int cmd_delete_downtime ( int  cmd,
char *  args 
)

Definition at line 2658 of file commands.c.

int cmd_delete_downtime_by_host_name ( int  cmd,
char *  args 
)

Definition at line 2678 of file commands.c.

int cmd_delete_downtime_by_hostgroup_name ( int  cmd,
char *  args 
)

Definition at line 2723 of file commands.c.

int cmd_delete_downtime_by_start_time_comment ( int  cmd,
char *  args 
)

Definition at line 2807 of file commands.c.

int cmd_process_external_commands_from_file ( int  cmd,
char *  args 
)

Definition at line 3602 of file commands.c.

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

Definition at line 2203 of file commands.c.

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

Definition at line 2050 of file commands.c.

int cmd_remove_acknowledgement ( int  cmd,
char *  args 
)

Definition at line 2417 of file commands.c.

int cmd_schedule_check ( int  cmd,
char *  args 
)

Definition at line 1939 of file commands.c.

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

Definition at line 2457 of file commands.c.

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

Definition at line 1995 of file commands.c.

int cmd_signal_process ( int  cmd,
char *  args 
)

Definition at line 2030 of file commands.c.

void disable_all_failure_prediction ( void  )

Definition at line 4977 of file commands.c.

void disable_all_notifications ( void  )

Definition at line 3740 of file commands.c.

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

Definition at line 3909 of file commands.c.

void disable_contact_host_notifications ( contact cntct)

Definition at line 3978 of file commands.c.

void disable_contact_service_notifications ( contact cntct)

Definition at line 4032 of file commands.c.

void disable_host_checks ( host hst)

Definition at line 4665 of file commands.c.

void disable_host_event_handler ( host hst)

Definition at line 4639 of file commands.c.

void disable_host_freshness_checks ( void  )

Definition at line 4925 of file commands.c.

void disable_host_notifications ( host hst)

Definition at line 3845 of file commands.c.

void disable_passive_host_checks ( host hst)

Definition at line 4480 of file commands.c.

void disable_passive_service_checks ( service svc)

Definition at line 4317 of file commands.c.

void disable_performance_data ( void  )

Definition at line 5029 of file commands.c.

void disable_service_checks ( service svc)

Definition at line 3638 of file commands.c.

void disable_service_event_handler ( service svc)

Definition at line 4587 of file commands.c.

void disable_service_freshness_checks ( void  )

Definition at line 4873 of file commands.c.

void disable_service_notifications ( service svc)

Definition at line 3793 of file commands.c.

void enable_all_failure_prediction ( void  )

Definition at line 4951 of file commands.c.

void enable_all_notifications ( void  )

Definition at line 3713 of file commands.c.

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

Definition at line 3871 of file commands.c.

void enable_contact_host_notifications ( contact cntct)

Definition at line 3951 of file commands.c.

void enable_contact_service_notifications ( contact cntct)

Definition at line 4005 of file commands.c.

void enable_host_checks ( host hst)

Definition at line 4692 of file commands.c.

void enable_host_event_handler ( host hst)

Definition at line 4613 of file commands.c.

void enable_host_freshness_checks ( void  )

Definition at line 4899 of file commands.c.

void enable_host_notifications ( host hst)

Definition at line 3819 of file commands.c.

void enable_passive_host_checks ( host hst)

Definition at line 4453 of file commands.c.

void enable_passive_service_checks ( service svc)

Definition at line 4290 of file commands.c.

void enable_performance_data ( void  )

Definition at line 5003 of file commands.c.

void enable_service_checks ( service svc)

Definition at line 3666 of file commands.c.

void enable_service_event_handler ( service svc)

Definition at line 4560 of file commands.c.

void enable_service_freshness_checks ( void  )

Definition at line 4847 of file commands.c.

void enable_service_notifications ( service svc)

Definition at line 3767 of file commands.c.

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

Definition at line 1672 of file commands.c.

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

Definition at line 1711 of file commands.c.

int process_external_command1 ( char *  cmd)

Definition at line 215 of file commands.c.

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

Definition at line 802 of file commands.c.

int process_external_commands_from_file ( char *  fname,
int  delete_file 
)

Definition at line 170 of file commands.c.

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

Definition at line 1211 of file commands.c.

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

Definition at line 1349 of file commands.c.

void process_passive_checks ( void  )

Definition at line 5186 of file commands.c.

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

Definition at line 2240 of file commands.c.

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

Definition at line 2098 of file commands.c.

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

Definition at line 1446 of file commands.c.

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

Definition at line 1545 of file commands.c.

void remove_host_acknowledgement ( host hst)

Definition at line 4149 of file commands.c.

void remove_service_acknowledgement ( service svc)

Definition at line 4165 of file commands.c.

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 
)

Definition at line 4059 of file commands.c.

void set_host_notification_number ( host hst,
int  num 
)

Definition at line 5159 of file commands.c.

void set_service_notification_number ( service svc,
int  num 
)

Definition at line 5172 of file commands.c.

void start_accepting_passive_host_checks ( void  )

Definition at line 4399 of file commands.c.

void start_accepting_passive_service_checks ( void  )

Definition at line 4236 of file commands.c.

void start_executing_host_checks ( void  )

Definition at line 4344 of file commands.c.

void start_executing_service_checks ( void  )

Definition at line 4181 of file commands.c.

void start_obsessing_over_host ( host hst)

Definition at line 5107 of file commands.c.

void start_obsessing_over_host_checks ( void  )

Definition at line 4793 of file commands.c.

void start_obsessing_over_service ( service svc)

Definition at line 5055 of file commands.c.

void start_obsessing_over_service_checks ( void  )

Definition at line 4739 of file commands.c.

void start_using_event_handlers ( void  )

Definition at line 4506 of file commands.c.

void stop_accepting_passive_host_checks ( void  )

Definition at line 4426 of file commands.c.

void stop_accepting_passive_service_checks ( void  )

Definition at line 4263 of file commands.c.

void stop_executing_host_checks ( void  )

Definition at line 4372 of file commands.c.

void stop_executing_service_checks ( void  )

Definition at line 4209 of file commands.c.

void stop_obsessing_over_host ( host hst)

Definition at line 5133 of file commands.c.

void stop_obsessing_over_host_checks ( void  )

Definition at line 4820 of file commands.c.

void stop_obsessing_over_service ( service svc)

Definition at line 5081 of file commands.c.

void stop_obsessing_over_service_checks ( void  )

Definition at line 4766 of file commands.c.

void stop_using_event_handlers ( void  )

Definition at line 4533 of file commands.c.


Variable Documentation

Definition at line 206 of file icinga.c.

Definition at line 204 of file icinga.c.

Definition at line 132 of file icinga.c.

Definition at line 136 of file icinga.c.

Definition at line 135 of file icinga.c.

Definition at line 125 of file icinga.c.

char* command_file

Definition at line 64 of file icinga.c.

Definition at line 248 of file icinga.c.

Definition at line 249 of file icinga.c.

char* config_file

Definition at line 62 of file icinga.c.

int dummy

Definition at line 92 of file commands.c.

Definition at line 207 of file icinga.c.

Definition at line 210 of file icinga.c.

Definition at line 202 of file icinga.c.

Definition at line 205 of file icinga.c.

Definition at line 203 of file icinga.c.

Definition at line 273 of file icinga.c.

Definition at line 276 of file icinga.c.

Definition at line 75 of file icinga.c.

Definition at line 77 of file icinga.c.

Definition at line 76 of file icinga.c.

Definition at line 78 of file icinga.c.

Definition at line 52 of file objects.c.

int ipc_pipe[2]

Definition at line 142 of file icinga.c.

Definition at line 143 of file icinga.c.

Definition at line 101 of file icinga.c.

Definition at line 102 of file icinga.c.

char* log_file

Definition at line 63 of file icinga.c.

Definition at line 103 of file icinga.c.

Definition at line 159 of file icinga.c.

Definition at line 160 of file icinga.c.

Definition at line 209 of file icinga.c.

Definition at line 208 of file icinga.c.

Definition at line 85 of file commands.c.

Definition at line 222 of file icinga.c.

Definition at line 53 of file objects.c.

Definition at line 177 of file icinga.c.

Definition at line 176 of file icinga.c.

char* temp_file

Definition at line 65 of file icinga.c.

char* temp_path

Definition at line 66 of file icinga.c.

pthread_t worker_threads[TOTAL_WORKER_THREADS]

Definition at line 275 of file icinga.c.

 All Data Structures Files Functions Variables Typedefs Defines