Icinga-core 1.4.0
next gen monitoring
module/idoutils/include/db.h File Reference
#include "../../../include/config.h"
#include "ido2db.h"

Go to the source code of this file.

Data Structures

struct  ido2db_dbconfig_struct

Defines

#define IDO2DB_DBTABLE_INSTANCES   0
#define IDO2DB_DBTABLE_CONNINFO   1
#define IDO2DB_DBTABLE_OBJECTS   2
#define IDO2DB_DBTABLE_OBJECTTYPES   3
#define IDO2DB_DBTABLE_LOGENTRIES   4
#define IDO2DB_DBTABLE_SYSTEMCOMMANDS   5
#define IDO2DB_DBTABLE_EVENTHANDLERS   6
#define IDO2DB_DBTABLE_SERVICECHECKS   7
#define IDO2DB_DBTABLE_HOSTCHECKS   8
#define IDO2DB_DBTABLE_PROGRAMSTATUS   9
#define IDO2DB_DBTABLE_EXTERNALCOMMANDS   10
#define IDO2DB_DBTABLE_SERVICESTATUS   11
#define IDO2DB_DBTABLE_HOSTSTATUS   12
#define IDO2DB_DBTABLE_PROCESSEVENTS   13
#define IDO2DB_DBTABLE_TIMEDEVENTS   14
#define IDO2DB_DBTABLE_TIMEDEVENTQUEUE   15
#define IDO2DB_DBTABLE_FLAPPINGHISTORY   16
#define IDO2DB_DBTABLE_COMMENTHISTORY   17
#define IDO2DB_DBTABLE_COMMENTS   18
#define IDO2DB_DBTABLE_NOTIFICATIONS   19
#define IDO2DB_DBTABLE_CONTACTNOTIFICATIONS   20
#define IDO2DB_DBTABLE_CONTACTNOTIFICATIONMETHODS   21
#define IDO2DB_DBTABLE_ACKNOWLEDGEMENTS   22
#define IDO2DB_DBTABLE_STATEHISTORY   23
#define IDO2DB_DBTABLE_DOWNTIMEHISTORY   24
#define IDO2DB_DBTABLE_SCHEDULEDDOWNTIME   25
#define IDO2DB_DBTABLE_CONFIGFILES   26
#define IDO2DB_DBTABLE_CONFIGFILEVARIABLES   27
#define IDO2DB_DBTABLE_RUNTIMEVARIABLES   28
#define IDO2DB_DBTABLE_CONTACTSTATUS   29
#define IDO2DB_DBTABLE_CUSTOMVARIABLESTATUS   30
#define IDO2DB_DBTABLE_RESERVED31   31
#define IDO2DB_DBTABLE_RESERVED32   32
#define IDO2DB_DBTABLE_RESERVED33   33
#define IDO2DB_DBTABLE_RESERVED34   34
#define IDO2DB_DBTABLE_RESERVED35   35
#define IDO2DB_DBTABLE_RESERVED36   36
#define IDO2DB_DBTABLE_RESERVED37   37
#define IDO2DB_DBTABLE_RESERVED38   38
#define IDO2DB_DBTABLE_RESERVED39   39
#define IDO2DB_DBTABLE_COMMANDS   40
#define IDO2DB_DBTABLE_TIMEPERIODS   41
#define IDO2DB_DBTABLE_TIMEPERIODTIMERANGES   42
#define IDO2DB_DBTABLE_CONTACTGROUPS   43
#define IDO2DB_DBTABLE_CONTACTGROUPMEMBERS   44
#define IDO2DB_DBTABLE_HOSTGROUPS   45
#define IDO2DB_DBTABLE_HOSTGROUPMEMBERS   46
#define IDO2DB_DBTABLE_SERVICEGROUPS   47
#define IDO2DB_DBTABLE_SERVICEGROUPMEMBERS   48
#define IDO2DB_DBTABLE_HOSTESCALATIONS   49
#define IDO2DB_DBTABLE_HOSTESCALATIONCONTACTS   50
#define IDO2DB_DBTABLE_SERVICEESCALATIONS   51
#define IDO2DB_DBTABLE_SERVICEESCALATIONCONTACTS   52
#define IDO2DB_DBTABLE_HOSTDEPENDENCIES   53
#define IDO2DB_DBTABLE_SERVICEDEPENDENCIES   54
#define IDO2DB_DBTABLE_CONTACTS   55
#define IDO2DB_DBTABLE_CONTACTADDRESSES   56
#define IDO2DB_DBTABLE_CONTACTNOTIFICATIONCOMMANDS   57
#define IDO2DB_DBTABLE_HOSTS   58
#define IDO2DB_DBTABLE_HOSTPARENTHOSTS   59
#define IDO2DB_DBTABLE_HOSTCONTACTS   60
#define IDO2DB_DBTABLE_SERVICES   61
#define IDO2DB_DBTABLE_SERVICECONTACTS   62
#define IDO2DB_DBTABLE_CUSTOMVARIABLES   63
#define IDO2DB_DBTABLE_HOSTCONTACTGROUPS   64
#define IDO2DB_DBTABLE_SERVICECONTACTGROUPS   65
#define IDO2DB_DBTABLE_HOSTESCALATIONCONTACTGROUPS   66
#define IDO2DB_DBTABLE_SERVICEESCALATIONCONTACTGROUPS   67
#define IDO2DB_DBTABLE_DBVERSION   68
#define IDO2DB_MAX_DBTABLES   69
#define IDO2DB_OBJECTTYPE_HOST   1
#define IDO2DB_OBJECTTYPE_SERVICE   2
#define IDO2DB_OBJECTTYPE_HOSTGROUP   3
#define IDO2DB_OBJECTTYPE_SERVICEGROUP   4
#define IDO2DB_OBJECTTYPE_HOSTESCALATION   5
#define IDO2DB_OBJECTTYPE_SERVICEESCALATION   6
#define IDO2DB_OBJECTTYPE_HOSTDEPENDENCY   7
#define IDO2DB_OBJECTTYPE_SERVICEDEPENDENCY   8
#define IDO2DB_OBJECTTYPE_TIMEPERIOD   9
#define IDO2DB_OBJECTTYPE_CONTACT   10
#define IDO2DB_OBJECTTYPE_CONTACTGROUP   11
#define IDO2DB_OBJECTTYPE_COMMAND   12

Typedefs

typedef struct
ido2db_dbconfig_struct 
ido2db_dbconfig

Functions

int ido2db_db_init (ido2db_idi *)
int ido2db_db_deinit (ido2db_idi *)
int ido2db_db_connect (ido2db_idi *)
int ido2db_db_is_connected (ido2db_idi *)
int ido2db_db_reconnect (ido2db_idi *)
int ido2db_db_disconnect (ido2db_idi *)
int ido2db_db_hello (ido2db_idi *)
int ido2db_thread_db_hello (ido2db_idi *)
int ido2db_db_goodbye (ido2db_idi *)
int ido2db_db_checkin (ido2db_idi *)
char * ido2db_db_escape_string (ido2db_idi *, char *)
char * ido2db_db_timet_to_sql (ido2db_idi *, time_t)
char * ido2db_db_sql_to_timet (ido2db_idi *, char *)
int ido2db_db_query (ido2db_idi *, char *)
int ido2db_db_free_query (ido2db_idi *)
int ido2db_handle_db_error (ido2db_idi *)
int ido2db_db_clear_table (ido2db_idi *, char *)
int ido2db_db_get_latest_data_time (ido2db_idi *, char *, char *, unsigned long *)
int ido2db_db_perform_maintenance (ido2db_idi *)
int ido2db_db_trim_data_table (ido2db_idi *, char *, char *, unsigned long)

Define Documentation

#define IDO2DB_DBTABLE_ACKNOWLEDGEMENTS   22

Definition at line 64 of file db.h.

#define IDO2DB_DBTABLE_COMMANDS   40

Definition at line 83 of file db.h.

#define IDO2DB_DBTABLE_COMMENTHISTORY   17

Definition at line 59 of file db.h.

#define IDO2DB_DBTABLE_COMMENTS   18

Definition at line 60 of file db.h.

#define IDO2DB_DBTABLE_CONFIGFILES   26

Definition at line 68 of file db.h.

#define IDO2DB_DBTABLE_CONFIGFILEVARIABLES   27

Definition at line 69 of file db.h.

#define IDO2DB_DBTABLE_CONNINFO   1

Definition at line 43 of file db.h.

#define IDO2DB_DBTABLE_CONTACTADDRESSES   56

Definition at line 99 of file db.h.

#define IDO2DB_DBTABLE_CONTACTGROUPMEMBERS   44

Definition at line 87 of file db.h.

#define IDO2DB_DBTABLE_CONTACTGROUPS   43

Definition at line 86 of file db.h.

#define IDO2DB_DBTABLE_CONTACTNOTIFICATIONCOMMANDS   57

Definition at line 100 of file db.h.

#define IDO2DB_DBTABLE_CONTACTNOTIFICATIONMETHODS   21

Definition at line 63 of file db.h.

#define IDO2DB_DBTABLE_CONTACTNOTIFICATIONS   20

Definition at line 62 of file db.h.

#define IDO2DB_DBTABLE_CONTACTS   55

Definition at line 98 of file db.h.

#define IDO2DB_DBTABLE_CONTACTSTATUS   29

Definition at line 71 of file db.h.

#define IDO2DB_DBTABLE_CUSTOMVARIABLES   63

Definition at line 106 of file db.h.

#define IDO2DB_DBTABLE_CUSTOMVARIABLESTATUS   30

Definition at line 72 of file db.h.

#define IDO2DB_DBTABLE_DBVERSION   68

Definition at line 111 of file db.h.

#define IDO2DB_DBTABLE_DOWNTIMEHISTORY   24

Definition at line 66 of file db.h.

#define IDO2DB_DBTABLE_EVENTHANDLERS   6

Definition at line 48 of file db.h.

#define IDO2DB_DBTABLE_EXTERNALCOMMANDS   10

Definition at line 52 of file db.h.

#define IDO2DB_DBTABLE_FLAPPINGHISTORY   16

Definition at line 58 of file db.h.

#define IDO2DB_DBTABLE_HOSTCHECKS   8

Definition at line 50 of file db.h.

#define IDO2DB_DBTABLE_HOSTCONTACTGROUPS   64

Definition at line 107 of file db.h.

#define IDO2DB_DBTABLE_HOSTCONTACTS   60

Definition at line 103 of file db.h.

#define IDO2DB_DBTABLE_HOSTDEPENDENCIES   53

Definition at line 96 of file db.h.

#define IDO2DB_DBTABLE_HOSTESCALATIONCONTACTGROUPS   66

Definition at line 109 of file db.h.

#define IDO2DB_DBTABLE_HOSTESCALATIONCONTACTS   50

Definition at line 93 of file db.h.

#define IDO2DB_DBTABLE_HOSTESCALATIONS   49

Definition at line 92 of file db.h.

#define IDO2DB_DBTABLE_HOSTGROUPMEMBERS   46

Definition at line 89 of file db.h.

#define IDO2DB_DBTABLE_HOSTGROUPS   45

Definition at line 88 of file db.h.

#define IDO2DB_DBTABLE_HOSTPARENTHOSTS   59

Definition at line 102 of file db.h.

#define IDO2DB_DBTABLE_HOSTS   58

Definition at line 101 of file db.h.

#define IDO2DB_DBTABLE_HOSTSTATUS   12

Definition at line 54 of file db.h.

#define IDO2DB_DBTABLE_INSTANCES   0

Definition at line 42 of file db.h.

#define IDO2DB_DBTABLE_LOGENTRIES   4

Definition at line 46 of file db.h.

#define IDO2DB_DBTABLE_NOTIFICATIONS   19

Definition at line 61 of file db.h.

#define IDO2DB_DBTABLE_OBJECTS   2

Definition at line 44 of file db.h.

#define IDO2DB_DBTABLE_OBJECTTYPES   3

Definition at line 45 of file db.h.

#define IDO2DB_DBTABLE_PROCESSEVENTS   13

Definition at line 55 of file db.h.

#define IDO2DB_DBTABLE_PROGRAMSTATUS   9

Definition at line 51 of file db.h.

#define IDO2DB_DBTABLE_RESERVED31   31

Definition at line 73 of file db.h.

#define IDO2DB_DBTABLE_RESERVED32   32

Definition at line 74 of file db.h.

#define IDO2DB_DBTABLE_RESERVED33   33

Definition at line 75 of file db.h.

#define IDO2DB_DBTABLE_RESERVED34   34

Definition at line 76 of file db.h.

#define IDO2DB_DBTABLE_RESERVED35   35

Definition at line 77 of file db.h.

#define IDO2DB_DBTABLE_RESERVED36   36

Definition at line 78 of file db.h.

#define IDO2DB_DBTABLE_RESERVED37   37

Definition at line 79 of file db.h.

#define IDO2DB_DBTABLE_RESERVED38   38

Definition at line 80 of file db.h.

#define IDO2DB_DBTABLE_RESERVED39   39

Definition at line 81 of file db.h.

#define IDO2DB_DBTABLE_RUNTIMEVARIABLES   28

Definition at line 70 of file db.h.

#define IDO2DB_DBTABLE_SCHEDULEDDOWNTIME   25

Definition at line 67 of file db.h.

#define IDO2DB_DBTABLE_SERVICECHECKS   7

Definition at line 49 of file db.h.

#define IDO2DB_DBTABLE_SERVICECONTACTGROUPS   65

Definition at line 108 of file db.h.

#define IDO2DB_DBTABLE_SERVICECONTACTS   62

Definition at line 105 of file db.h.

#define IDO2DB_DBTABLE_SERVICEDEPENDENCIES   54

Definition at line 97 of file db.h.

#define IDO2DB_DBTABLE_SERVICEESCALATIONCONTACTGROUPS   67

Definition at line 110 of file db.h.

#define IDO2DB_DBTABLE_SERVICEESCALATIONCONTACTS   52

Definition at line 95 of file db.h.

#define IDO2DB_DBTABLE_SERVICEESCALATIONS   51

Definition at line 94 of file db.h.

#define IDO2DB_DBTABLE_SERVICEGROUPMEMBERS   48

Definition at line 91 of file db.h.

#define IDO2DB_DBTABLE_SERVICEGROUPS   47

Definition at line 90 of file db.h.

#define IDO2DB_DBTABLE_SERVICES   61

Definition at line 104 of file db.h.

#define IDO2DB_DBTABLE_SERVICESTATUS   11

Definition at line 53 of file db.h.

#define IDO2DB_DBTABLE_STATEHISTORY   23

Definition at line 65 of file db.h.

#define IDO2DB_DBTABLE_SYSTEMCOMMANDS   5

Definition at line 47 of file db.h.

#define IDO2DB_DBTABLE_TIMEDEVENTQUEUE   15

Definition at line 57 of file db.h.

#define IDO2DB_DBTABLE_TIMEDEVENTS   14

Definition at line 56 of file db.h.

#define IDO2DB_DBTABLE_TIMEPERIODS   41

Definition at line 84 of file db.h.

#define IDO2DB_DBTABLE_TIMEPERIODTIMERANGES   42

Definition at line 85 of file db.h.

#define IDO2DB_MAX_DBTABLES   69

Definition at line 113 of file db.h.

#define IDO2DB_OBJECTTYPE_COMMAND   12

Definition at line 129 of file db.h.

#define IDO2DB_OBJECTTYPE_CONTACT   10

Definition at line 127 of file db.h.

#define IDO2DB_OBJECTTYPE_CONTACTGROUP   11

Definition at line 128 of file db.h.

#define IDO2DB_OBJECTTYPE_HOST   1

Definition at line 118 of file db.h.

#define IDO2DB_OBJECTTYPE_HOSTDEPENDENCY   7

Definition at line 124 of file db.h.

#define IDO2DB_OBJECTTYPE_HOSTESCALATION   5

Definition at line 122 of file db.h.

#define IDO2DB_OBJECTTYPE_HOSTGROUP   3

Definition at line 120 of file db.h.

#define IDO2DB_OBJECTTYPE_SERVICE   2

Definition at line 119 of file db.h.

#define IDO2DB_OBJECTTYPE_SERVICEDEPENDENCY   8

Definition at line 125 of file db.h.

#define IDO2DB_OBJECTTYPE_SERVICEESCALATION   6

Definition at line 123 of file db.h.

#define IDO2DB_OBJECTTYPE_SERVICEGROUP   4

Definition at line 121 of file db.h.

#define IDO2DB_OBJECTTYPE_TIMEPERIOD   9

Definition at line 126 of file db.h.


Typedef Documentation


Function Documentation

int ido2db_db_checkin ( ido2db_idi )

Definition at line 2162 of file db.c.

int ido2db_db_clear_table ( ido2db_idi ,
char *   
)

Definition at line 2568 of file db.c.

int ido2db_db_connect ( ido2db_idi )

Definition at line 404 of file db.c.

int ido2db_db_deinit ( ido2db_idi )

Definition at line 338 of file db.c.

int ido2db_db_disconnect ( ido2db_idi )

Definition at line 1082 of file db.c.

char* ido2db_db_escape_string ( ido2db_idi ,
char *   
)

Definition at line 2240 of file db.c.

int ido2db_db_free_query ( ido2db_idi )

Definition at line 2528 of file db.c.

int ido2db_db_get_latest_data_time ( ido2db_idi ,
char *  ,
char *  ,
unsigned long *   
)

Definition at line 2626 of file db.c.

int ido2db_db_goodbye ( ido2db_idi )

Definition at line 2083 of file db.c.

int ido2db_db_hello ( ido2db_idi )

Definition at line 1331 of file db.c.

int ido2db_db_init ( ido2db_idi )

Definition at line 214 of file db.c.

int ido2db_db_is_connected ( ido2db_idi )

Definition at line 364 of file db.c.

int ido2db_db_perform_maintenance ( ido2db_idi )

Definition at line 2776 of file db.c.

int ido2db_db_query ( ido2db_idi ,
char *   
)

Definition at line 2439 of file db.c.

int ido2db_db_reconnect ( ido2db_idi )

Definition at line 384 of file db.c.

char* ido2db_db_sql_to_timet ( ido2db_idi ,
char *   
)

Definition at line 2390 of file db.c.

char* ido2db_db_timet_to_sql ( ido2db_idi ,
time_t   
)

Definition at line 2340 of file db.c.

int ido2db_db_trim_data_table ( ido2db_idi ,
char *  ,
char *  ,
unsigned  long 
)

Definition at line 2707 of file db.c.

int ido2db_handle_db_error ( ido2db_idi )

Definition at line 2546 of file db.c.

int ido2db_thread_db_hello ( ido2db_idi )

Definition at line 1753 of file db.c.

 All Data Structures Files Functions Variables Typedefs Defines