00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _ICINGA_H
00024 #define _ICINGA_H
00025
00026 #ifndef __GNUC__
00027 # define __attribute__(x)
00028 #endif
00029 #ifndef NSCORE
00030 # define NSCORE
00031 #endif
00032
00033 #include "config.h"
00034 #include "logging.h"
00035 #include "common.h"
00036 #include "locations.h"
00037 #include "objects.h"
00038 #include "macros.h"
00039
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 #define MAX_PLUGIN_OUTPUT_LENGTH 8192
00054 #define MAX_CMD_ARGS 4096
00055
00056
00057
00058
00059 #define DEFAULT_USE_DAEMON_LOG 1
00060 #define DEFAULT_LOG_LEVEL 1
00061 #define DEFAULT_USE_SYSLOG 1
00062 #define DEFAULT_USE_SYSLOG_LOCAL_FACILITY 0
00063 #define DEFAULT_SYSLOG_LOCAL_FACILITY 5
00064
00065 #define DEFAULT_SYSLOG_LEVEL 2
00066
00067 #define DEFAULT_NOTIFICATION_LOGGING 1
00068
00069 #define DEFAULT_INTER_CHECK_DELAY 5.0
00070 #define DEFAULT_INTERLEAVE_FACTOR 1
00071 #define DEFAULT_SLEEP_TIME 0.5
00072 #define DEFAULT_INTERVAL_LENGTH 60
00073 #define DEFAULT_RETRY_INTERVAL 30
00074 #define DEFAULT_COMMAND_CHECK_INTERVAL -1
00075 #define DEFAULT_CHECK_REAPER_INTERVAL 10
00076 #define DEFAULT_MAX_REAPER_TIME 30
00077 #define DEFAULT_MAX_CHECK_RESULT_AGE 3600
00078 #define DEFAULT_MAX_PARALLEL_SERVICE_CHECKS 0
00079 #define DEFAULT_RETENTION_UPDATE_INTERVAL 60
00080 #define DEFAULT_RETENTION_SCHEDULING_HORIZON 900
00081 #define DEFAULT_STATUS_UPDATE_INTERVAL 60
00082 #define DEFAULT_FRESHNESS_CHECK_INTERVAL 60
00083 #define DEFAULT_AUTO_RESCHEDULING_INTERVAL 30
00084 #define DEFAULT_AUTO_RESCHEDULING_WINDOW 180
00085 #define DEFAULT_ORPHAN_CHECK_INTERVAL 60
00086
00087 #define DEFAULT_NOTIFICATION_TIMEOUT 30
00088 #define DEFAULT_EVENT_HANDLER_TIMEOUT 30
00089 #define DEFAULT_HOST_CHECK_TIMEOUT 30
00090 #define DEFAULT_SERVICE_CHECK_TIMEOUT 60
00091 #define DEFAULT_OCSP_TIMEOUT 15
00092 #define DEFAULT_OCHP_TIMEOUT 15
00093 #define DEFAULT_PERFDATA_TIMEOUT 5
00094 #define DEFAULT_TIME_CHANGE_THRESHOLD 900
00095
00096 #define DEFAULT_LOG_HOST_RETRIES 0
00097 #define DEFAULT_LOG_SERVICE_RETRIES 0
00098 #define DEFAULT_LOG_EVENT_HANDLERS 1
00099 #define DEFAULT_LOG_INITIAL_STATES 0
00100 #define DEFAULT_LOG_CURRENT_STATES 1
00101 #define DEFAULT_LOG_EXTERNAL_COMMANDS 1
00102 #define DEFAULT_LOG_EXTERNAL_COMMANDS_USER 0
00103 #define DEFAULT_LOG_PASSIVE_CHECKS 1
00104 #define DEFAULT_LOG_LONG_PLUGIN_OUTPUT 0
00105
00106 #define DEFAULT_DEBUG_LEVEL 0
00107 #define DEFAULT_DEBUG_VERBOSITY 1
00108 #define DEFAULT_MAX_DEBUG_FILE_SIZE 1000000
00109
00110 #define DEFAULT_AGGRESSIVE_HOST_CHECKING 0
00111 #define DEFAULT_CHECK_EXTERNAL_COMMANDS 1
00112 #define DEFAULT_CHECK_ORPHANED_SERVICES 1
00113 #define DEFAULT_CHECK_ORPHANED_HOSTS 1
00114 #define DEFAULT_ENABLE_FLAP_DETECTION 0
00115 #define DEFAULT_PROCESS_PERFORMANCE_DATA 0
00116 #define DEFAULT_CHECK_SERVICE_FRESHNESS 1
00117 #define DEFAULT_CHECK_HOST_FRESHNESS 0
00118 #define DEFAULT_AUTO_RESCHEDULE_CHECKS 0
00119 #define DEFAULT_TRANSLATE_PASSIVE_HOST_CHECKS 0
00120 #define DEFAULT_PASSIVE_HOST_CHECKS_SOFT 0
00121
00122 #define DEFAULT_LOW_SERVICE_FLAP_THRESHOLD 20.0
00123 #define DEFAULT_HIGH_SERVICE_FLAP_THRESHOLD 30.0
00124 #define DEFAULT_LOW_HOST_FLAP_THRESHOLD 20.0
00125 #define DEFAULT_HIGH_HOST_FLAP_THRESHOLD 30.0
00126
00127 #define DEFAULT_HOST_CHECK_SPREAD 30
00128 #define DEFAULT_SERVICE_CHECK_SPREAD 30
00129
00130 #define DEFAULT_CACHED_HOST_CHECK_HORIZON 15
00131 #define DEFAULT_CACHED_SERVICE_CHECK_HORIZON 15
00132 #define DEFAULT_ENABLE_PREDICTIVE_HOST_DEPENDENCY_CHECKS 1
00133 #define DEFAULT_ENABLE_PREDICTIVE_SERVICE_DEPENDENCY_CHECKS 1
00134
00135 #define DEFAULT_USE_LARGE_INSTALLATION_TWEAKS 0
00136
00137 #define DEFAULT_ENABLE_EMBEDDED_PERL 0
00138 #define DEFAULT_USE_EMBEDDED_PERL_IMPLICITLY 1
00139
00140 #define DEFAULT_STALKING_EVENT_HANDLERS_FOR_HOSTS 0
00141 #define DEFAULT_STALKING_EVENT_HANDLERS_FOR_SERVICES 0
00142
00143 #define DEFAULT_ADDITIONAL_FRESHNESS_LATENCY 15
00144
00145 #define DEFAULT_ALLOW_EMPTY_HOSTGROUP_ASSIGNMENT 0
00146
00147
00148
00149
00150 #define HOST_UP 0
00151 #define HOST_DOWN 1
00152 #define HOST_UNREACHABLE 2
00153
00154
00155
00156
00157
00158 #define INITIAL_STATES 1
00159 #define CURRENT_STATES 2
00160
00161
00162
00163
00164
00165 #define DEPENDENCIES_OK 0
00166 #define DEPENDENCIES_FAILED 1
00167
00168
00169
00170
00171
00172 #define PROPAGATE_TO_PARENT_HOSTS 1
00173 #define PROPAGATE_TO_CHILD_HOSTS 2
00174
00175
00176
00177
00178
00179 #define STATE_OK 0
00180 #define STATE_WARNING 1
00181 #define STATE_CRITICAL 2
00182 #define STATE_UNKNOWN 3
00183
00184
00185
00186
00187
00188 #define HOST_FLAPPING 0
00189 #define SERVICE_FLAPPING 1
00190
00191
00192
00193
00194
00195 #define HOST_NOTIFICATION 0
00196 #define SERVICE_NOTIFICATION 1
00197
00198
00199
00200
00201
00202 #define NOTIFICATION_NORMAL 0
00203 #define NOTIFICATION_ACKNOWLEDGEMENT 1
00204 #define NOTIFICATION_FLAPPINGSTART 2
00205 #define NOTIFICATION_FLAPPINGSTOP 3
00206 #define NOTIFICATION_FLAPPINGDISABLED 4
00207 #define NOTIFICATION_DOWNTIMESTART 5
00208 #define NOTIFICATION_DOWNTIMEEND 6
00209 #define NOTIFICATION_DOWNTIMECANCELLED 7
00210 #define NOTIFICATION_CUSTOM 99
00211
00212
00213
00214
00215
00216 #define HOST_EVENTHANDLER 0
00217 #define SERVICE_EVENTHANDLER 1
00218 #define GLOBAL_HOST_EVENTHANDLER 2
00219 #define GLOBAL_SERVICE_EVENTHANDLER 3
00220
00221
00222
00223
00224
00225 #define HOST_STATECHANGE 0
00226 #define SERVICE_STATECHANGE 1
00227
00228
00229
00230
00231 #define SERVICE_CHECK 0
00232 #define HOST_CHECK 1
00233
00234
00235
00236
00237
00238 #define EVENT_SERVICE_CHECK 0
00239 #define EVENT_COMMAND_CHECK 1
00240 #define EVENT_LOG_ROTATION 2
00241 #define EVENT_PROGRAM_SHUTDOWN 3
00242 #define EVENT_PROGRAM_RESTART 4
00243 #define EVENT_CHECK_REAPER 5
00244 #define EVENT_ORPHAN_CHECK 6
00245 #define EVENT_RETENTION_SAVE 7
00246 #define EVENT_STATUS_SAVE 8
00247 #define EVENT_SCHEDULED_DOWNTIME 9
00248 #define EVENT_SFRESHNESS_CHECK 10
00249 #define EVENT_EXPIRE_DOWNTIME 11
00250 #define EVENT_HOST_CHECK 12
00251 #define EVENT_HFRESHNESS_CHECK 13
00252 #define EVENT_RESCHEDULE_CHECKS 14
00253 #define EVENT_EXPIRE_COMMENT 15
00254 #define EVENT_SLEEP 98
00255 #define EVENT_USER_FUNCTION 99
00256
00257
00258
00259
00260
00261 #define ICD_NONE 0
00262 #define ICD_DUMB 1
00263 #define ICD_SMART 2
00264 #define ICD_USER 3
00265
00266
00267
00268
00269
00270 #define ILF_USER 0
00271 #define ILF_SMART 1
00272
00273
00274
00275
00276
00277 #define ACTIVE_DOWNTIME 0
00278 #define PENDING_DOWNTIME 1
00279
00280
00281
00282
00283
00284
00285 typedef struct timed_event_struct{
00286 int event_type;
00287 time_t run_time;
00288 int recurring;
00289 unsigned long event_interval;
00290 int compensate_for_time_change;
00291 void *timing_func;
00292 void *event_data;
00293 void *event_args;
00294 int event_options;
00295 struct timed_event_struct *next;
00296 struct timed_event_struct *prev;
00297 }timed_event;
00298
00299
00300
00301 typedef struct notify_list_struct{
00302 contact *contact;
00303 struct notify_list_struct *next;
00304 }notification;
00305
00306
00307
00308 typedef struct check_result_struct{
00309 int object_check_type;
00310 char *host_name;
00311 char *service_description;
00312 int check_type;
00313 int check_options;
00314 int scheduled_check;
00315 int reschedule_check;
00316 char *output_file;
00317 FILE *output_file_fp;
00318 int output_file_fd;
00319 double latency;
00320 struct timeval start_time;
00321 struct timeval finish_time;
00322 int early_timeout;
00323 int exited_ok;
00324 int return_code;
00325 char *output;
00326 struct check_result_struct *next;
00327 }check_result;
00328
00329
00330
00331 typedef struct sched_info_struct{
00332 int total_services;
00333 int total_scheduled_services;
00334 int total_hosts;
00335 int total_scheduled_hosts;
00336 double average_services_per_host;
00337 double average_scheduled_services_per_host;
00338 unsigned long service_check_interval_total;
00339 unsigned long host_check_interval_total;
00340 double average_service_execution_time;
00341 double average_service_check_interval;
00342 double average_host_check_interval;
00343 double average_service_inter_check_delay;
00344 double average_host_inter_check_delay;
00345 double service_inter_check_delay;
00346 double host_inter_check_delay;
00347 int service_interleave_factor;
00348 int max_service_check_spread;
00349 int max_host_check_spread;
00350 time_t first_service_check;
00351 time_t last_service_check;
00352 time_t first_host_check;
00353 time_t last_host_check;
00354 }sched_info;
00355
00356
00357
00358 typedef struct passive_check_result_struct{
00359 int object_check_type;
00360 char *host_name;
00361 char *service_description;
00362 int return_code;
00363 char *output;
00364 time_t check_time;
00365 double latency;
00366 struct passive_check_result_struct *next;
00367 }passive_check_result;
00368
00369
00370
00371 typedef struct circular_buffer_struct{
00372 void **buffer;
00373 int tail;
00374 int head;
00375 int items;
00376 int high;
00377 unsigned long overflow;
00378 pthread_mutex_t buffer_lock;
00379 }circular_buffer;
00380
00381
00382
00383 typedef struct dbuf_struct{
00384 char *buf;
00385 unsigned long used_size;
00386 unsigned long allocated_size;
00387 unsigned long chunk_size;
00388 }dbuf;
00389
00390
00391 #define CHECK_STATS_BUCKETS 15
00392
00393
00394 typedef struct check_stats_struct{
00395 int current_bucket;
00396 int bucket[CHECK_STATS_BUCKETS];
00397 int overflow_bucket;
00398 int minute_stats[3];
00399 time_t last_update;
00400 }check_stats;
00401
00402
00403
00404
00405
00406 #define DEFAULT_EXTERNAL_COMMAND_BUFFER_SLOTS 4096
00407
00408
00409 #define TOTAL_WORKER_THREADS 1
00410
00411 #define COMMAND_WORKER_THREAD 0
00412
00413
00414
00415
00416
00417
00418 int read_main_config_file(char *);
00419 int read_resource_file(char *);
00420 int read_all_object_data(char *);
00421
00422
00423
00424 int pre_flight_check(void);
00425 int pre_flight_object_check(int *,int *);
00426 int pre_flight_circular_check(int *,int *);
00427 void init_timing_loop(void);
00428 void setup_sighandler(void);
00429 void reset_sighandler(void);
00430 int daemon_init(void);
00431 int drop_privileges(char *,char *);
00432 void display_scheduling_info(void);
00433
00434
00435
00436 int schedule_new_event(int,int,time_t,int,unsigned long,void *,int,void *,void *,int);
00437 void reschedule_event(timed_event *,timed_event **,timed_event **);
00438 void add_event(timed_event *,timed_event **,timed_event **);
00439 void remove_event(timed_event *,timed_event **,timed_event **);
00440 int event_execution_loop(void);
00441 int handle_timed_event(timed_event *);
00442 void adjust_check_scheduling(void);
00443 void compensate_for_system_time_change(unsigned long,unsigned long);
00444 void adjust_timestamp_for_time_change(time_t,time_t,unsigned long,time_t *);
00445 void resort_event_list(timed_event **,timed_event **);
00446
00447
00448
00449 int move_check_result_to_queue(char *);
00450 int process_check_result_queue(char *);
00451 int process_check_result_file(char *);
00452 int add_check_result_to_list(check_result *);
00453 check_result *read_check_result(void);
00454 int delete_check_result_file(char *);
00455 int free_check_result_list(void);
00456 int init_check_result(check_result *);
00457 int free_check_result(check_result *);
00458 int parse_check_output(char *,char **,char **,char **,int,int);
00459 int open_command_file(void);
00460 int close_command_file(void);
00461
00462
00463
00464 int check_service_dependencies(service *,int);
00465 int check_host_dependencies(host *,int);
00466 void check_for_orphaned_services(void);
00467 void check_for_orphaned_hosts(void);
00468 void check_service_result_freshness(void);
00469 int is_service_result_fresh(service *,time_t,int);
00470 void check_host_result_freshness(void);
00471 int is_host_result_fresh(host *,time_t,int);
00472 int my_system(char *,int,int *,double *,char **,int);
00473 int my_system_r(icinga_macros *mac, char *,int,int *,double *,char **,int);
00474
00475
00476 void check_for_service_flapping(service *,int,int);
00477 void check_for_host_flapping(host *,int,int,int);
00478 void set_service_flap(service *,double,double,double,int);
00479 void clear_service_flap(service *,double,double,double);
00480 void set_host_flap(host *,double,double,double,int);
00481 void clear_host_flap(host *,double,double,double);
00482 void enable_flap_detection_routines(void);
00483 void disable_flap_detection_routines(void);
00484 void enable_host_flap_detection(host *);
00485 void disable_host_flap_detection(host *);
00486 void enable_service_flap_detection(service *);
00487 void disable_service_flap_detection(service *);
00488 void handle_host_flap_detection_disabled(host *);
00489 void handle_service_flap_detection_disabled(service *);
00490
00491
00492
00493 int perform_on_demand_host_check(host *,int *,int,int,unsigned long);
00494 int perform_scheduled_host_check(host *,int,double);
00495 int check_host_check_viability_3x(host *,int,int *,time_t *);
00496 int adjust_host_check_attempt_3x(host *,int);
00497 int determine_host_reachability(host *);
00498 int process_host_check_result_3x(host *,int,char *,int,int,int,unsigned long);
00499 int perform_on_demand_host_check_3x(host *,int *,int,int,unsigned long);
00500 int run_sync_host_check_3x(host *,int *,int,int,unsigned long);
00501 int execute_sync_host_check_3x(host *);
00502 int run_scheduled_host_check_3x(host *,int,double);
00503 int run_async_host_check_3x(host *,int,double,int,int,int *,time_t *);
00504 int handle_async_host_check_result_3x(host *,check_result *);
00505
00506
00507
00508 int check_service_check_viability(service *,int,int *,time_t *);
00509 int run_scheduled_service_check(service *,int,double);
00510 int run_async_service_check(service *,int,double,int,int,int *,time_t *);
00511 int handle_async_service_check_result(service *,check_result *);
00512
00513
00514
00515 int handle_host_state(host *);
00516
00517
00518
00519
00520 int reap_check_results(void);
00521
00522
00523
00524 int init_check_stats(void);
00525 int update_check_stats(int,time_t);
00526 int generate_check_stats(void);
00527
00528
00529
00530
00531 int obsessive_compulsive_service_check_processor(service *);
00532 int obsessive_compulsive_host_check_processor(host *);
00533 int handle_service_event(service *);
00534 int run_service_event_handler(icinga_macros *mac, service *);
00535 int run_global_service_event_handler(icinga_macros *mac, service *);
00536 int handle_host_event(host *);
00537 int run_host_event_handler(icinga_macros *mac, host *);
00538 int run_global_host_event_handler(icinga_macros *mac, host *);
00539
00540
00541
00542 int check_service_notification_viability(service *,int,int);
00543 int is_valid_escalation_for_service_notification(service *,serviceescalation *,int);
00544 int should_service_notification_be_escalated(service *);
00545 int service_notification(service *,int,char *,char *,int);
00546 int check_contact_service_notification_viability(contact *,service *,int,int);
00547 int notify_contact_of_service(icinga_macros *mac, contact *,service *,int,char *,char *,int,int);
00548 int check_host_notification_viability(host *,int,int);
00549 int is_valid_escalation_for_host_notification(host *,hostescalation *,int);
00550 int should_host_notification_be_escalated(host *);
00551 int host_notification(host *,int,char *,char *,int);
00552 int check_contact_host_notification_viability(contact *,host *,int,int);
00553 int notify_contact_of_host(icinga_macros *mac, contact *,host *,int,char *,char *,int,int);
00554 int create_notification_list_from_host(icinga_macros *mac, host *,int,int *);
00555 int create_notification_list_from_service(icinga_macros *mac, service *,int,int *);
00556 int add_notification(icinga_macros *mac, contact *);
00557 notification *find_notification(contact *);
00558 time_t get_next_host_notification_time(host *,time_t);
00559 time_t get_next_service_notification_time(service *,time_t);
00560
00561
00562
00563 void cleanup(void);
00564 void free_memory(icinga_macros *mac);
00565 int reset_variables(void);
00566 void free_notification_list(void);
00567
00568
00569
00570 void sighandler(int);
00571 void service_check_sighandler(int);
00572 void host_check_sighandler(int);
00573 void my_system_sighandler(int);
00574 void file_lock_sighandler(int);
00575
00576 char *get_next_string_from_buf(char *buf, int *start_index, int bufsize);
00577 int compare_strings(char *,char *);
00578 char *escape_newlines(char *);
00579 int contains_illegal_object_chars(char *);
00580 int my_rename(char *,char *);
00581 int my_fcopy(char *,char *);
00582 int my_fdcopy(char *, char *, int);
00583
00584
00585 extern int get_raw_command_line_r(icinga_macros *mac, command *,char *,char **,int);
00586
00587
00588
00589
00590
00591 extern int get_raw_command_line(command *,char *,char **,int);
00592
00593 int check_time_against_period(time_t,timeperiod *);
00594 int is_daterange_single_day(daterange *);
00595 time_t calculate_time_from_weekday_of_month(int,int,int,int);
00596 time_t calculate_time_from_day_of_month(int,int,int);
00597 void get_next_valid_time(time_t, time_t *,timeperiod *);
00598 void _get_next_valid_time_per_timeperiod(time_t, time_t *, time_t, timeperiod *);
00599 void get_earliest_time(time_t, time_t *, time_t, timeperiod *, int);
00600 void get_min_invalid_time_per_timeperiod(time_t, time_t *, time_t, timeperiod *);
00601 time_t get_next_log_rotation_time(void);
00602 int init_embedded_perl(char **);
00603 int deinit_embedded_perl(void);
00604 int file_uses_embedded_perl(char *);
00605 int dbuf_init(dbuf *,int);
00606 int dbuf_free(dbuf *);
00607 int dbuf_strcat(dbuf *,char *);
00608 int set_environment_var(char *,char *,int);
00609
00610
00611
00612 int check_for_external_commands(void);
00613 int process_external_command1(char *);
00614 int process_external_command2(int,time_t,char *);
00615 int process_external_commands_from_file(char *,int);
00616 int process_host_command(int,time_t,char *);
00617 int process_hostgroup_command(int,time_t,char *);
00618 int process_service_command(int,time_t,char *);
00619 int process_servicegroup_command(int,time_t,char *);
00620 int process_contact_command(int,time_t,char *);
00621 int process_contactgroup_command(int,time_t,char *);
00622
00623
00624
00625 int cmd_add_comment(int,time_t,char *);
00626 int cmd_delete_comment(int,char *);
00627 int cmd_delete_all_comments(int,char *);
00628 int cmd_delay_notification(int,char *);
00629 int cmd_schedule_service_check(int,char *,int);
00630 int cmd_schedule_check(int,char *);
00631 int cmd_schedule_host_service_checks(int,char *,int);
00632 int cmd_signal_process(int,char *);
00633 int cmd_process_service_check_result(int,time_t,char *);
00634 int cmd_process_host_check_result(int,time_t,char *);
00635 int cmd_acknowledge_problem(int,char *);
00636 int cmd_remove_acknowledgement(int,char *);
00637 int cmd_schedule_downtime(int,time_t,char *);
00638 int cmd_delete_downtime(int,char *);
00639 int cmd_change_object_int_var(int,char *);
00640 int cmd_change_object_char_var(int,char *);
00641 int cmd_change_object_custom_var(int,char *);
00642 int cmd_process_external_commands_from_file(int,char *);
00643
00644 int process_passive_service_check(time_t,char *,char *,int,char *);
00645 int process_passive_host_check(time_t,char *,int,char *);
00646
00647
00648
00649 void disable_service_checks(service *);
00650 void enable_service_checks(service *);
00651 void schedule_service_check(service *,time_t,int);
00652 void schedule_host_check(host *,time_t,int);
00653 void enable_all_notifications(void);
00654 void disable_all_notifications(void);
00655 void enable_service_notifications(service *);
00656 void disable_service_notifications(service *);
00657 void enable_host_notifications(host *);
00658 void disable_host_notifications(host *);
00659 void enable_and_propagate_notifications(host *,int,int,int,int);
00660 void disable_and_propagate_notifications(host *,int,int,int,int);
00661 void schedule_and_propagate_downtime(host *,time_t,char *,char *,time_t,time_t,int,unsigned long,unsigned long);
00662 void acknowledge_host_problem(host *,char *,char *,int,int,int);
00663 void acknowledge_service_problem(service *,char *,char *,int,int,int);
00664 void remove_host_acknowledgement(host *);
00665 void remove_service_acknowledgement(service *);
00666 void start_executing_service_checks(void);
00667 void stop_executing_service_checks(void);
00668 void start_accepting_passive_service_checks(void);
00669 void stop_accepting_passive_service_checks(void);
00670 void enable_passive_service_checks(service *);
00671 void disable_passive_service_checks(service *);
00672 void start_using_event_handlers(void);
00673 void stop_using_event_handlers(void);
00674 void enable_service_event_handler(service *);
00675 void disable_service_event_handler(service *);
00676 void enable_host_event_handler(host *);
00677 void disable_host_event_handler(host *);
00678 void enable_host_checks(host *);
00679 void disable_host_checks(host *);
00680 void start_obsessing_over_service_checks(void);
00681 void stop_obsessing_over_service_checks(void);
00682 void start_obsessing_over_host_checks(void);
00683 void stop_obsessing_over_host_checks(void);
00684 void enable_service_freshness_checks(void);
00685 void disable_service_freshness_checks(void);
00686 void enable_host_freshness_checks(void);
00687 void disable_host_freshness_checks(void);
00688 void process_passive_checks(void);
00689 void enable_all_failure_prediction(void);
00690 void disable_all_failure_prediction(void);
00691 void enable_performance_data(void);
00692 void disable_performance_data(void);
00693 void start_executing_host_checks(void);
00694 void stop_executing_host_checks(void);
00695 void start_accepting_passive_host_checks(void);
00696 void stop_accepting_passive_host_checks(void);
00697 void enable_passive_host_checks(host *);
00698 void disable_passive_host_checks(host *);
00699 void start_obsessing_over_service(service *);
00700 void stop_obsessing_over_service(service *);
00701 void start_obsessing_over_host(host *);
00702 void stop_obsessing_over_host(host *);
00703 void set_host_notification_number(host *,int);
00704 void set_service_notification_number(service *,int);
00705 void enable_contact_host_notifications(contact *);
00706 void disable_contact_host_notifications(contact *);
00707 void enable_contact_service_notifications(contact *);
00708 void disable_contact_service_notifications(contact *);
00709 void display_schedule(void);
00710
00711 int init_check_result_worker_thread(void);
00712 int shutdown_check_result_worker_thread(void);
00713 void * check_result_worker_thread(void *);
00714 void cleanup_check_result_worker_thread(void *);
00715
00716 int init_command_file_worker_thread(void);
00717 int shutdown_command_file_worker_thread(void);
00718 void * command_file_worker_thread(void *);
00719 void cleanup_command_file_worker_thread(void *);
00720
00721 int submit_external_command(char *,int *);
00722 int submit_raw_external_command(char *,time_t *,int *);
00723
00724 char *get_program_version(void);
00725 char *get_program_modification_date(void);
00726 int has_shell_metachars(const char *);
00727
00728
00729 #ifdef __cplusplus
00730 }
00731 #endif
00732 #endif
00733