Icinga-core 1.4.0
next gen monitoring
module/idoutils/src/idomod.c File Reference
#include "../../../include/config.h"
#include "../include/common.h"
#include "../include/io.h"
#include "../include/utils.h"
#include "../include/protoapi.h"
#include "../include/idomod.h"
#include "../../../include/nebstructs.h"
#include "../../../include/nebmodules.h"
#include "../../../include/nebcallbacks.h"
#include "../../../include/broker.h"
#include "../../../include/common.h"
#include "../../../include/icinga.h"
#include "../../../include/downtime.h"
#include "../../../include/comments.h"
#include "../../../include/macros.h"

Go to the source code of this file.

Defines

#define DEBUG_IDO   1
#define OBJECTCONFIG_ES_ITEMS   16

Functions

int idomod_open_debug_log (void)
int idomod_close_debug_log (void)
int nebmodule_init (int flags, char *args, void *handle)
int nebmodule_deinit (int flags, int reason)
int idomod_check_icinga_object_version (void)
int idomod_init (void)
int idomod_deinit (void)
int idomod_process_module_args (char *args)
int idomod_process_config_file (char *filename)
int idomod_process_config_var (char *arg)
int idomod_write_to_logs (char *buf, int flags)
int idomod_open_sink (void)
int idomod_close_sink (void)
int idomod_hello_sink (int reconnect, int problem_disconnect)
int idomod_goodbye_sink (void)
int idomod_rotate_sink_file (void *args)
int idomod_write_to_sink (char *buf, int buffer_write, int flush_buffer)
int idomod_save_unprocessed_data (char *f)
int idomod_load_unprocessed_data (char *f)
int idomod_sink_buffer_init (idomod_sink_buffer *sbuf, unsigned long maxitems)
int idomod_sink_buffer_deinit (idomod_sink_buffer *sbuf)
int idomod_sink_buffer_push (idomod_sink_buffer *sbuf, char *buf)
char * idomod_sink_buffer_pop (idomod_sink_buffer *sbuf)
char * idomod_sink_buffer_peek (idomod_sink_buffer *sbuf)
int idomod_sink_buffer_items (idomod_sink_buffer *sbuf)
unsigned long idomod_sink_buffer_get_overflow (idomod_sink_buffer *sbuf)
int idomod_sink_buffer_set_overflow (idomod_sink_buffer *sbuf, unsigned long num)
int idomod_register_callbacks (void)
int idomod_deregister_callbacks (void)
int idomod_broker_data (int event_type, void *data)
int idomod_write_config (int config_type)
int idomod_write_object_config (int config_type)
int idomod_write_config_files (void)
int idomod_write_main_config_file (void)
int idomod_write_resource_config_files (void)
int idomod_write_resource_config_file (char *filename)
int idomod_write_runtime_variables (void)
int idomod_log_debug_info (int level, int verbosity, const char *fmt,...)

Variables

void * idomod_module_handle = NULL
char * idomod_instance_name = NULL
char * idomod_buffer_file = NULL
char * idomod_sink_name = NULL
int idomod_sink_type = IDO_SINK_UNIXSOCKET
int idomod_sink_tcp_port = IDO_DEFAULT_TCP_PORT
int idomod_sink_is_open = IDO_FALSE
int idomod_sink_previously_open = IDO_FALSE
int idomod_sink_fd = -1
time_t idomod_sink_last_reconnect_attempt = 0L
time_t idomod_sink_last_reconnect_warning = 0L
unsigned long idomod_sink_connect_attempt = 0L
unsigned long idomod_sink_reconnect_interval = 15
unsigned long idomod_sink_reconnect_warning_interval = 900
unsigned long idomod_sink_rotation_interval = 3600
char * idomod_sink_rotation_command = NULL
int idomod_sink_rotation_timeout = 60
int idomod_allow_sink_activity = IDO_TRUE
unsigned long idomod_process_options = IDOMOD_PROCESS_EVERYTHING
int idomod_config_output_options = IDOMOD_CONFIG_DUMP_ALL
unsigned long idomod_sink_buffer_slots = 5000
idomod_sink_buffer sinkbuf
char * idomod_debug_file = NULL
int idomod_debug_level = IDOMOD_DEBUGL_NONE
int idomod_debug_verbosity = IDOMOD_DEBUGV_BASIC
FILE * idomod_debug_file_fp = NULL
unsigned long idomod_max_debug_file_size = 0L
int errno
commandcommand_list
timeperiodtimeperiod_list
contactcontact_list
contactgroupcontactgroup_list
hosthost_list
hostgrouphostgroup_list
serviceservice_list
servicegroupservicegroup_list
hostescalationhostescalation_list
serviceescalationserviceescalation_list
hostdependencyhostdependency_list
servicedependencyservicedependency_list
char * config_file
sched_info scheduling_info
char * global_host_event_handler
char * global_service_event_handler
int __icinga_object_structure_version
int use_ssl

Define Documentation

#define DEBUG_IDO   1

Definition at line 93 of file idomod.c.

#define OBJECTCONFIG_ES_ITEMS   16

Definition at line 3189 of file idomod.c.


Function Documentation

int idomod_broker_data ( int  event_type,
void *  data 
)

Definition at line 1235 of file idomod.c.

int idomod_check_icinga_object_version ( void  )

Definition at line 156 of file idomod.c.

int idomod_close_debug_log ( void  )

Definition at line 4716 of file idomod.c.

int idomod_close_sink ( void  )

Definition at line 526 of file idomod.c.

int idomod_deinit ( void  )

Definition at line 229 of file idomod.c.

int idomod_deregister_callbacks ( void  )

Definition at line 1197 of file idomod.c.

int idomod_goodbye_sink ( void  )

Definition at line 604 of file idomod.c.

int idomod_hello_sink ( int  reconnect,
int  problem_disconnect 
)

Definition at line 550 of file idomod.c.

int idomod_init ( void  )

Definition at line 173 of file idomod.c.

int idomod_load_unprocessed_data ( char *  f)

Definition at line 927 of file idomod.c.

int idomod_log_debug_info ( int  level,
int  verbosity,
const char *  fmt,
  ... 
)

Definition at line 4728 of file idomod.c.

int idomod_open_debug_log ( void  )

Definition at line 4698 of file idomod.c.

int idomod_open_sink ( void  )

Definition at line 498 of file idomod.c.

int idomod_process_config_file ( char *  filename)

Definition at line 325 of file idomod.c.

int idomod_process_config_var ( char *  arg)

Definition at line 372 of file idomod.c.

int idomod_process_module_args ( char *  args)

Definition at line 261 of file idomod.c.

int idomod_register_callbacks ( void  )

Definition at line 1131 of file idomod.c.

int idomod_rotate_sink_file ( void *  args)

Definition at line 628 of file idomod.c.

int idomod_save_unprocessed_data ( char *  f)

Definition at line 882 of file idomod.c.

int idomod_sink_buffer_deinit ( idomod_sink_buffer sbuf)

Definition at line 993 of file idomod.c.

unsigned long idomod_sink_buffer_get_overflow ( idomod_sink_buffer sbuf)

Definition at line 1100 of file idomod.c.

int idomod_sink_buffer_init ( idomod_sink_buffer sbuf,
unsigned long  maxitems 
)

Definition at line 965 of file idomod.c.

int idomod_sink_buffer_items ( idomod_sink_buffer sbuf)

Definition at line 1087 of file idomod.c.

char* idomod_sink_buffer_peek ( idomod_sink_buffer sbuf)

Definition at line 1067 of file idomod.c.

char* idomod_sink_buffer_pop ( idomod_sink_buffer sbuf)

Definition at line 1040 of file idomod.c.

int idomod_sink_buffer_push ( idomod_sink_buffer sbuf,
char *  buf 
)

Definition at line 1015 of file idomod.c.

int idomod_sink_buffer_set_overflow ( idomod_sink_buffer sbuf,
unsigned long  num 
)

Definition at line 1112 of file idomod.c.

int idomod_write_config ( int  config_type)

Definition at line 3140 of file idomod.c.

int idomod_write_config_files ( void  )

Definition at line 4449 of file idomod.c.

int idomod_write_main_config_file ( void  )

Definition at line 4468 of file idomod.c.

int idomod_write_object_config ( int  config_type)

Definition at line 3192 of file idomod.c.

int idomod_write_resource_config_file ( char *  filename)

Definition at line 4565 of file idomod.c.

int idomod_write_resource_config_files ( void  )

Definition at line 4549 of file idomod.c.

int idomod_write_runtime_variables ( void  )

Definition at line 4581 of file idomod.c.

int idomod_write_to_logs ( char *  buf,
int  flags 
)

Definition at line 483 of file idomod.c.

int idomod_write_to_sink ( char *  buf,
int  buffer_write,
int  flush_buffer 
)

Definition at line 675 of file idomod.c.

int nebmodule_deinit ( int  flags,
int  reason 
)

Definition at line 135 of file idomod.c.

int nebmodule_init ( int  flags,
char *  args,
void *  handle 
)

Definition at line 98 of file idomod.c.


Variable Documentation

Definition at line 58 of file objects.c.

char* config_file

Definition at line 62 of file icinga.c.

Definition at line 54 of file objects.c.

Definition at line 55 of file objects.c.

int errno

Definition at line 75 of file icinga.c.

Definition at line 76 of file icinga.c.

Definition at line 52 of file objects.c.

Definition at line 62 of file objects.c.

Definition at line 63 of file objects.c.

Definition at line 56 of file objects.c.

Definition at line 53 of file idomod.c.

char* idomod_buffer_file = NULL

Definition at line 38 of file idomod.c.

int idomod_config_output_options = IDOMOD_CONFIG_DUMP_ALL

Definition at line 55 of file idomod.c.

char* idomod_debug_file = NULL

Definition at line 59 of file idomod.c.

FILE* idomod_debug_file_fp = NULL

Definition at line 62 of file idomod.c.

int idomod_debug_level = IDOMOD_DEBUGL_NONE

Definition at line 60 of file idomod.c.

int idomod_debug_verbosity = IDOMOD_DEBUGV_BASIC

Definition at line 61 of file idomod.c.

char* idomod_instance_name = NULL

Definition at line 37 of file idomod.c.

unsigned long idomod_max_debug_file_size = 0L

Definition at line 63 of file idomod.c.

void* idomod_module_handle = NULL

Definition at line 36 of file idomod.c.

unsigned long idomod_process_options = IDOMOD_PROCESS_EVERYTHING

Definition at line 54 of file idomod.c.

unsigned long idomod_sink_buffer_slots = 5000

Definition at line 56 of file idomod.c.

unsigned long idomod_sink_connect_attempt = 0L

Definition at line 47 of file idomod.c.

int idomod_sink_fd = -1

Definition at line 44 of file idomod.c.

int idomod_sink_is_open = IDO_FALSE

Definition at line 42 of file idomod.c.

Definition at line 45 of file idomod.c.

Definition at line 46 of file idomod.c.

char* idomod_sink_name = NULL

Definition at line 39 of file idomod.c.

int idomod_sink_previously_open = IDO_FALSE

Definition at line 43 of file idomod.c.

unsigned long idomod_sink_reconnect_interval = 15

Definition at line 48 of file idomod.c.

Definition at line 49 of file idomod.c.

Definition at line 51 of file idomod.c.

unsigned long idomod_sink_rotation_interval = 3600

Definition at line 50 of file idomod.c.

Definition at line 52 of file idomod.c.

int idomod_sink_tcp_port = IDO_DEFAULT_TCP_PORT

Definition at line 41 of file idomod.c.

int idomod_sink_type = IDO_SINK_UNIXSOCKET

Definition at line 40 of file idomod.c.

Definition at line 106 of file events.c.

Definition at line 53 of file objects.c.

Definition at line 61 of file objects.c.

Definition at line 60 of file objects.c.

Definition at line 57 of file objects.c.

Definition at line 57 of file idomod.c.

Definition at line 59 of file objects.c.

int use_ssl

Definition at line 20 of file io.c.

 All Data Structures Files Functions Variables Typedefs Defines