Icinga-core 1.4.0
next gen monitoring
include/macros.h File Reference
#include "config.h"
#include "common.h"
#include "objects.h"

Go to the source code of this file.

Data Structures

struct  icinga_macros
struct  nagios_macros

Defines

#define MAX_COMMAND_ARGUMENTS   32
#define MACRO_ENV_VAR_PREFIX   "ICINGA_"
#define MAX_USER_MACROS   256
#define MACRO_X_COUNT   154
#define MACRO_HOSTNAME   0
#define MACRO_HOSTALIAS   1
#define MACRO_HOSTADDRESS   2
#define MACRO_SERVICEDESC   3
#define MACRO_SERVICESTATE   4
#define MACRO_SERVICESTATEID   5
#define MACRO_SERVICEATTEMPT   6
#define MACRO_LONGDATETIME   7
#define MACRO_SHORTDATETIME   8
#define MACRO_DATE   9
#define MACRO_TIME   10
#define MACRO_TIMET   11
#define MACRO_LASTHOSTCHECK   12
#define MACRO_LASTSERVICECHECK   13
#define MACRO_LASTHOSTSTATECHANGE   14
#define MACRO_LASTSERVICESTATECHANGE   15
#define MACRO_HOSTOUTPUT   16
#define MACRO_SERVICEOUTPUT   17
#define MACRO_HOSTPERFDATA   18
#define MACRO_SERVICEPERFDATA   19
#define MACRO_CONTACTNAME   20
#define MACRO_CONTACTALIAS   21
#define MACRO_CONTACTEMAIL   22
#define MACRO_CONTACTPAGER   23
#define MACRO_ADMINEMAIL   24
#define MACRO_ADMINPAGER   25
#define MACRO_HOSTSTATE   26
#define MACRO_HOSTSTATEID   27
#define MACRO_HOSTATTEMPT   28
#define MACRO_NOTIFICATIONTYPE   29
#define MACRO_NOTIFICATIONNUMBER   30
#define MACRO_HOSTEXECUTIONTIME   31
#define MACRO_SERVICEEXECUTIONTIME   32
#define MACRO_HOSTLATENCY   33
#define MACRO_SERVICELATENCY   34
#define MACRO_HOSTDURATION   35
#define MACRO_SERVICEDURATION   36
#define MACRO_HOSTDURATIONSEC   37
#define MACRO_SERVICEDURATIONSEC   38
#define MACRO_HOSTDOWNTIME   39
#define MACRO_SERVICEDOWNTIME   40
#define MACRO_HOSTSTATETYPE   41
#define MACRO_SERVICESTATETYPE   42
#define MACRO_HOSTPERCENTCHANGE   43
#define MACRO_SERVICEPERCENTCHANGE   44
#define MACRO_HOSTGROUPNAME   45
#define MACRO_HOSTGROUPALIAS   46
#define MACRO_SERVICEGROUPNAME   47
#define MACRO_SERVICEGROUPALIAS   48
#define MACRO_HOSTACKAUTHOR   49
#define MACRO_HOSTACKCOMMENT   50
#define MACRO_SERVICEACKAUTHOR   51
#define MACRO_SERVICEACKCOMMENT   52
#define MACRO_LASTSERVICEOK   53
#define MACRO_LASTSERVICEWARNING   54
#define MACRO_LASTSERVICEUNKNOWN   55
#define MACRO_LASTSERVICECRITICAL   56
#define MACRO_LASTHOSTUP   57
#define MACRO_LASTHOSTDOWN   58
#define MACRO_LASTHOSTUNREACHABLE   59
#define MACRO_SERVICECHECKCOMMAND   60
#define MACRO_HOSTCHECKCOMMAND   61
#define MACRO_MAINCONFIGFILE   62
#define MACRO_STATUSDATAFILE   63
#define MACRO_HOSTDISPLAYNAME   64
#define MACRO_SERVICEDISPLAYNAME   65
#define MACRO_RETENTIONDATAFILE   66
#define MACRO_OBJECTCACHEFILE   67
#define MACRO_TEMPFILE   68
#define MACRO_LOGFILE   69
#define MACRO_RESOURCEFILE   70
#define MACRO_COMMANDFILE   71
#define MACRO_HOSTPERFDATAFILE   72
#define MACRO_SERVICEPERFDATAFILE   73
#define MACRO_HOSTACTIONURL   74
#define MACRO_HOSTNOTESURL   75
#define MACRO_HOSTNOTES   76
#define MACRO_SERVICEACTIONURL   77
#define MACRO_SERVICENOTESURL   78
#define MACRO_SERVICENOTES   79
#define MACRO_TOTALHOSTSUP   80
#define MACRO_TOTALHOSTSDOWN   81
#define MACRO_TOTALHOSTSUNREACHABLE   82
#define MACRO_TOTALHOSTSDOWNUNHANDLED   83
#define MACRO_TOTALHOSTSUNREACHABLEUNHANDLED   84
#define MACRO_TOTALHOSTPROBLEMS   85
#define MACRO_TOTALHOSTPROBLEMSUNHANDLED   86
#define MACRO_TOTALSERVICESOK   87
#define MACRO_TOTALSERVICESWARNING   88
#define MACRO_TOTALSERVICESCRITICAL   89
#define MACRO_TOTALSERVICESUNKNOWN   90
#define MACRO_TOTALSERVICESWARNINGUNHANDLED   91
#define MACRO_TOTALSERVICESCRITICALUNHANDLED   92
#define MACRO_TOTALSERVICESUNKNOWNUNHANDLED   93
#define MACRO_TOTALSERVICEPROBLEMS   94
#define MACRO_TOTALSERVICEPROBLEMSUNHANDLED   95
#define MACRO_PROCESSSTARTTIME   96
#define MACRO_HOSTCHECKTYPE   97
#define MACRO_SERVICECHECKTYPE   98
#define MACRO_LONGHOSTOUTPUT   99
#define MACRO_LONGSERVICEOUTPUT   100
#define MACRO_TEMPPATH   101
#define MACRO_HOSTNOTIFICATIONNUMBER   102
#define MACRO_SERVICENOTIFICATIONNUMBER   103
#define MACRO_HOSTNOTIFICATIONID   104
#define MACRO_SERVICENOTIFICATIONID   105
#define MACRO_HOSTEVENTID   106
#define MACRO_LASTHOSTEVENTID   107
#define MACRO_SERVICEEVENTID   108
#define MACRO_LASTSERVICEEVENTID   109
#define MACRO_HOSTGROUPNAMES   110
#define MACRO_SERVICEGROUPNAMES   111
#define MACRO_HOSTACKAUTHORNAME   112
#define MACRO_HOSTACKAUTHORALIAS   113
#define MACRO_SERVICEACKAUTHORNAME   114
#define MACRO_SERVICEACKAUTHORALIAS   115
#define MACRO_MAXHOSTATTEMPTS   116
#define MACRO_MAXSERVICEATTEMPTS   117
#define MACRO_SERVICEISVOLATILE   118
#define MACRO_TOTALHOSTSERVICES   119
#define MACRO_TOTALHOSTSERVICESOK   120
#define MACRO_TOTALHOSTSERVICESWARNING   121
#define MACRO_TOTALHOSTSERVICESUNKNOWN   122
#define MACRO_TOTALHOSTSERVICESCRITICAL   123
#define MACRO_HOSTGROUPNOTES   124
#define MACRO_HOSTGROUPNOTESURL   125
#define MACRO_HOSTGROUPACTIONURL   126
#define MACRO_SERVICEGROUPNOTES   127
#define MACRO_SERVICEGROUPNOTESURL   128
#define MACRO_SERVICEGROUPACTIONURL   129
#define MACRO_HOSTGROUPMEMBERS   130
#define MACRO_SERVICEGROUPMEMBERS   131
#define MACRO_CONTACTGROUPNAME   132
#define MACRO_CONTACTGROUPALIAS   133
#define MACRO_CONTACTGROUPMEMBERS   134
#define MACRO_CONTACTGROUPNAMES   135
#define MACRO_NOTIFICATIONRECIPIENTS   136
#define MACRO_NOTIFICATIONISESCALATED   137
#define MACRO_NOTIFICATIONAUTHOR   138
#define MACRO_NOTIFICATIONAUTHORNAME   139
#define MACRO_NOTIFICATIONAUTHORALIAS   140
#define MACRO_NOTIFICATIONCOMMENT   141
#define MACRO_EVENTSTARTTIME   142
#define MACRO_HOSTPROBLEMID   143
#define MACRO_LASTHOSTPROBLEMID   144
#define MACRO_SERVICEPROBLEMID   145
#define MACRO_LASTSERVICEPROBLEMID   146
#define MACRO_ISVALIDTIME   147
#define MACRO_NEXTVALIDTIME   148
#define MACRO_LASTHOSTSTATE   149
#define MACRO_LASTHOSTSTATEID   150
#define MACRO_LASTSERVICESTATE   151
#define MACRO_LASTSERVICESTATEID   152
#define MACRO_HOSTADDRESS6   153
#define STRIP_ILLEGAL_MACRO_CHARS   1
#define ESCAPE_MACRO_CHARS   2
#define URL_ENCODE_MACRO_CHARS   4

Typedefs

typedef struct icinga_macros icinga_macros
typedef struct nagios_macros nagios_macros

Functions

icinga_macrosget_global_macros (void)
int process_macros (char *, char **, int)
int process_macros_r (icinga_macros *mac, char *, char **, int)
char * clean_macro_chars (char *, int)
int grab_service_macros (service *)
int grab_host_macros (host *)
int grab_servicegroup_macros (servicegroup *)
int grab_hostgroup_macros (hostgroup *)
int grab_contact_macros (contact *)
int grab_contactgroup_macros (contactgroup *)
int grab_macro_value (char *, char **, int *, int *)
int grab_macrox_value (int, char *, char *, char **, int *)
int grab_custom_macro_value (char *, char *, char *, char **)
int grab_datetime_macro (int, char *, char *, char **)
int grab_standard_host_macro (int, host *, char **, int *)
int grab_standard_hostgroup_macro (int, hostgroup *, char **)
int grab_standard_service_macro (int, service *, char **, int *)
int grab_standard_servicegroup_macro (int, servicegroup *, char **)
int grab_standard_contact_macro (int, contact *, char **)
int grab_contact_address_macro (int, contact *, char **)
int grab_standard_contactgroup_macro (int, contactgroup *, char **)
int grab_custom_object_macro (char *, customvariablesmember *, char **)
int grab_service_macros_r (icinga_macros *mac, service *)
int grab_host_macros_r (icinga_macros *mac, host *)
int grab_servicegroup_macros_r (icinga_macros *mac, servicegroup *)
int grab_hostgroup_macros_r (icinga_macros *mac, hostgroup *)
int grab_contact_macros_r (icinga_macros *mac, contact *)
int grab_contactgroup_macros_r (icinga_macros *mac, contactgroup *)
int grab_macro_value_r (icinga_macros *mac, char *, char **, int *, int *)
int grab_macrox_value_r (icinga_macros *mac, int, char *, char *, char **, int *)
int grab_custom_macro_value_r (icinga_macros *mac, char *, char *, char *, char **)
int grab_datetime_macro_r (icinga_macros *mac, int, char *, char *, char **)
int grab_standard_host_macro_r (icinga_macros *mac, int, host *, char **, int *)
int grab_standard_hostgroup_macro_r (icinga_macros *mac, int, hostgroup *, char **)
int grab_standard_service_macro_r (icinga_macros *mac, int, service *, char **, int *)
int grab_standard_servicegroup_macro_r (icinga_macros *mac, int, servicegroup *, char **)
int grab_standard_contact_macro_r (icinga_macros *mac, int, contact *, char **)
int grab_contact_address_macro_r (icinga_macros *mac, int, contact *, char **)
int grab_standard_contactgroup_macro_r (icinga_macros *mac, int, contactgroup *, char **)
int grab_custom_object_macro_r (icinga_macros *mac, char *, customvariablesmember *, char **)
char * get_url_encoded_string (char *)
int init_macros (void)
int init_macrox_names (void)
int free_macrox_names (void)
void copy_constant_macros (char **dest)
int clear_argv_macros (void)
int clear_volatile_macros (void)
int clear_host_macros (void)
int clear_service_macros (void)
int clear_hostgroup_macros (void)
int clear_servicegroup_macros (void)
int clear_contact_macros (void)
int clear_contactgroup_macros (void)
int clear_summary_macros (void)
int clear_argv_macros_r (icinga_macros *mac)
int clear_volatile_macros_r (icinga_macros *mac)
int clear_host_macros_r (icinga_macros *mac)
int clear_service_macros_r (icinga_macros *mac)
int clear_hostgroup_macros_r (icinga_macros *mac)
int clear_servicegroup_macros_r (icinga_macros *mac)
int clear_contact_macros_r (icinga_macros *mac)
int clear_contactgroup_macros_r (icinga_macros *mac)
int clear_summary_macros_r (icinga_macros *mac)

Define Documentation

#define ESCAPE_MACRO_CHARS   2

Definition at line 241 of file macros.h.

#define MACRO_ADMINEMAIL   24

Definition at line 106 of file macros.h.

#define MACRO_ADMINPAGER   25

Definition at line 107 of file macros.h.

#define MACRO_COMMANDFILE   71

Definition at line 153 of file macros.h.

#define MACRO_CONTACTALIAS   21

Definition at line 103 of file macros.h.

#define MACRO_CONTACTEMAIL   22

Definition at line 104 of file macros.h.

#define MACRO_CONTACTGROUPALIAS   133

Definition at line 215 of file macros.h.

#define MACRO_CONTACTGROUPMEMBERS   134

Definition at line 216 of file macros.h.

#define MACRO_CONTACTGROUPNAME   132

Definition at line 214 of file macros.h.

#define MACRO_CONTACTGROUPNAMES   135

Definition at line 217 of file macros.h.

#define MACRO_CONTACTNAME   20

Definition at line 102 of file macros.h.

#define MACRO_CONTACTPAGER   23

Definition at line 105 of file macros.h.

#define MACRO_DATE   9

Definition at line 91 of file macros.h.

#define MACRO_ENV_VAR_PREFIX   "ICINGA_"

Definition at line 41 of file macros.h.

#define MACRO_EVENTSTARTTIME   142

Definition at line 224 of file macros.h.

#define MACRO_HOSTACKAUTHOR   49

Definition at line 131 of file macros.h.

#define MACRO_HOSTACKAUTHORALIAS   113

Definition at line 195 of file macros.h.

#define MACRO_HOSTACKAUTHORNAME   112

Definition at line 194 of file macros.h.

#define MACRO_HOSTACKCOMMENT   50

Definition at line 132 of file macros.h.

#define MACRO_HOSTACTIONURL   74

Definition at line 156 of file macros.h.

#define MACRO_HOSTADDRESS   2

Definition at line 84 of file macros.h.

#define MACRO_HOSTADDRESS6   153

Definition at line 235 of file macros.h.

#define MACRO_HOSTALIAS   1

Definition at line 83 of file macros.h.

#define MACRO_HOSTATTEMPT   28

Definition at line 110 of file macros.h.

#define MACRO_HOSTCHECKCOMMAND   61

Definition at line 143 of file macros.h.

#define MACRO_HOSTCHECKTYPE   97

Definition at line 179 of file macros.h.

#define MACRO_HOSTDISPLAYNAME   64

Definition at line 146 of file macros.h.

#define MACRO_HOSTDOWNTIME   39

Definition at line 121 of file macros.h.

#define MACRO_HOSTDURATION   35

Definition at line 117 of file macros.h.

#define MACRO_HOSTDURATIONSEC   37

Definition at line 119 of file macros.h.

#define MACRO_HOSTEVENTID   106

Definition at line 188 of file macros.h.

#define MACRO_HOSTEXECUTIONTIME   31

Definition at line 113 of file macros.h.

#define MACRO_HOSTGROUPACTIONURL   126

Definition at line 208 of file macros.h.

#define MACRO_HOSTGROUPALIAS   46

Definition at line 128 of file macros.h.

#define MACRO_HOSTGROUPMEMBERS   130

Definition at line 212 of file macros.h.

#define MACRO_HOSTGROUPNAME   45

Definition at line 127 of file macros.h.

#define MACRO_HOSTGROUPNAMES   110

Definition at line 192 of file macros.h.

#define MACRO_HOSTGROUPNOTES   124

Definition at line 206 of file macros.h.

#define MACRO_HOSTGROUPNOTESURL   125

Definition at line 207 of file macros.h.

#define MACRO_HOSTLATENCY   33

Definition at line 115 of file macros.h.

#define MACRO_HOSTNAME   0

Definition at line 82 of file macros.h.

#define MACRO_HOSTNOTES   76

Definition at line 158 of file macros.h.

#define MACRO_HOSTNOTESURL   75

Definition at line 157 of file macros.h.

#define MACRO_HOSTNOTIFICATIONID   104

Definition at line 186 of file macros.h.

#define MACRO_HOSTNOTIFICATIONNUMBER   102

Definition at line 184 of file macros.h.

#define MACRO_HOSTOUTPUT   16

Definition at line 98 of file macros.h.

#define MACRO_HOSTPERCENTCHANGE   43

Definition at line 125 of file macros.h.

#define MACRO_HOSTPERFDATA   18

Definition at line 100 of file macros.h.

#define MACRO_HOSTPERFDATAFILE   72

Definition at line 154 of file macros.h.

#define MACRO_HOSTPROBLEMID   143

Definition at line 225 of file macros.h.

#define MACRO_HOSTSTATE   26

Definition at line 108 of file macros.h.

#define MACRO_HOSTSTATEID   27

Definition at line 109 of file macros.h.

#define MACRO_HOSTSTATETYPE   41

Definition at line 123 of file macros.h.

#define MACRO_ISVALIDTIME   147

Definition at line 229 of file macros.h.

#define MACRO_LASTHOSTCHECK   12

Definition at line 94 of file macros.h.

#define MACRO_LASTHOSTDOWN   58

Definition at line 140 of file macros.h.

#define MACRO_LASTHOSTEVENTID   107

Definition at line 189 of file macros.h.

#define MACRO_LASTHOSTPROBLEMID   144

Definition at line 226 of file macros.h.

#define MACRO_LASTHOSTSTATE   149

Definition at line 231 of file macros.h.

#define MACRO_LASTHOSTSTATECHANGE   14

Definition at line 96 of file macros.h.

#define MACRO_LASTHOSTSTATEID   150

Definition at line 232 of file macros.h.

#define MACRO_LASTHOSTUNREACHABLE   59

Definition at line 141 of file macros.h.

#define MACRO_LASTHOSTUP   57

Definition at line 139 of file macros.h.

#define MACRO_LASTSERVICECHECK   13

Definition at line 95 of file macros.h.

#define MACRO_LASTSERVICECRITICAL   56

Definition at line 138 of file macros.h.

#define MACRO_LASTSERVICEEVENTID   109

Definition at line 191 of file macros.h.

#define MACRO_LASTSERVICEOK   53

Definition at line 135 of file macros.h.

#define MACRO_LASTSERVICEPROBLEMID   146

Definition at line 228 of file macros.h.

#define MACRO_LASTSERVICESTATE   151

Definition at line 233 of file macros.h.

#define MACRO_LASTSERVICESTATECHANGE   15

Definition at line 97 of file macros.h.

#define MACRO_LASTSERVICESTATEID   152

Definition at line 234 of file macros.h.

#define MACRO_LASTSERVICEUNKNOWN   55

Definition at line 137 of file macros.h.

#define MACRO_LASTSERVICEWARNING   54

Definition at line 136 of file macros.h.

#define MACRO_LOGFILE   69

Definition at line 151 of file macros.h.

#define MACRO_LONGDATETIME   7

Definition at line 89 of file macros.h.

#define MACRO_LONGHOSTOUTPUT   99

Definition at line 181 of file macros.h.

#define MACRO_LONGSERVICEOUTPUT   100

Definition at line 182 of file macros.h.

#define MACRO_MAINCONFIGFILE   62

Definition at line 144 of file macros.h.

#define MACRO_MAXHOSTATTEMPTS   116

Definition at line 198 of file macros.h.

#define MACRO_MAXSERVICEATTEMPTS   117

Definition at line 199 of file macros.h.

#define MACRO_NEXTVALIDTIME   148

Definition at line 230 of file macros.h.

#define MACRO_NOTIFICATIONAUTHOR   138

Definition at line 220 of file macros.h.

#define MACRO_NOTIFICATIONAUTHORALIAS   140

Definition at line 222 of file macros.h.

#define MACRO_NOTIFICATIONAUTHORNAME   139

Definition at line 221 of file macros.h.

#define MACRO_NOTIFICATIONCOMMENT   141

Definition at line 223 of file macros.h.

#define MACRO_NOTIFICATIONISESCALATED   137

Definition at line 219 of file macros.h.

#define MACRO_NOTIFICATIONNUMBER   30

Definition at line 112 of file macros.h.

#define MACRO_NOTIFICATIONRECIPIENTS   136

Definition at line 218 of file macros.h.

#define MACRO_NOTIFICATIONTYPE   29

Definition at line 111 of file macros.h.

#define MACRO_OBJECTCACHEFILE   67

Definition at line 149 of file macros.h.

#define MACRO_PROCESSSTARTTIME   96

Definition at line 178 of file macros.h.

#define MACRO_RESOURCEFILE   70

Definition at line 152 of file macros.h.

#define MACRO_RETENTIONDATAFILE   66

Definition at line 148 of file macros.h.

#define MACRO_SERVICEACKAUTHOR   51

Definition at line 133 of file macros.h.

#define MACRO_SERVICEACKAUTHORALIAS   115

Definition at line 197 of file macros.h.

#define MACRO_SERVICEACKAUTHORNAME   114

Definition at line 196 of file macros.h.

#define MACRO_SERVICEACKCOMMENT   52

Definition at line 134 of file macros.h.

#define MACRO_SERVICEACTIONURL   77

Definition at line 159 of file macros.h.

#define MACRO_SERVICEATTEMPT   6

Definition at line 88 of file macros.h.

#define MACRO_SERVICECHECKCOMMAND   60

Definition at line 142 of file macros.h.

#define MACRO_SERVICECHECKTYPE   98

Definition at line 180 of file macros.h.

#define MACRO_SERVICEDESC   3

Definition at line 85 of file macros.h.

#define MACRO_SERVICEDISPLAYNAME   65

Definition at line 147 of file macros.h.

#define MACRO_SERVICEDOWNTIME   40

Definition at line 122 of file macros.h.

#define MACRO_SERVICEDURATION   36

Definition at line 118 of file macros.h.

#define MACRO_SERVICEDURATIONSEC   38

Definition at line 120 of file macros.h.

#define MACRO_SERVICEEVENTID   108

Definition at line 190 of file macros.h.

#define MACRO_SERVICEEXECUTIONTIME   32

Definition at line 114 of file macros.h.

#define MACRO_SERVICEGROUPACTIONURL   129

Definition at line 211 of file macros.h.

#define MACRO_SERVICEGROUPALIAS   48

Definition at line 130 of file macros.h.

#define MACRO_SERVICEGROUPMEMBERS   131

Definition at line 213 of file macros.h.

#define MACRO_SERVICEGROUPNAME   47

Definition at line 129 of file macros.h.

#define MACRO_SERVICEGROUPNAMES   111

Definition at line 193 of file macros.h.

#define MACRO_SERVICEGROUPNOTES   127

Definition at line 209 of file macros.h.

#define MACRO_SERVICEGROUPNOTESURL   128

Definition at line 210 of file macros.h.

#define MACRO_SERVICEISVOLATILE   118

Definition at line 200 of file macros.h.

#define MACRO_SERVICELATENCY   34

Definition at line 116 of file macros.h.

#define MACRO_SERVICENOTES   79

Definition at line 161 of file macros.h.

#define MACRO_SERVICENOTESURL   78

Definition at line 160 of file macros.h.

#define MACRO_SERVICENOTIFICATIONID   105

Definition at line 187 of file macros.h.

#define MACRO_SERVICENOTIFICATIONNUMBER   103

Definition at line 185 of file macros.h.

#define MACRO_SERVICEOUTPUT   17

Definition at line 99 of file macros.h.

#define MACRO_SERVICEPERCENTCHANGE   44

Definition at line 126 of file macros.h.

#define MACRO_SERVICEPERFDATA   19

Definition at line 101 of file macros.h.

#define MACRO_SERVICEPERFDATAFILE   73

Definition at line 155 of file macros.h.

#define MACRO_SERVICEPROBLEMID   145

Definition at line 227 of file macros.h.

#define MACRO_SERVICESTATE   4

Definition at line 86 of file macros.h.

#define MACRO_SERVICESTATEID   5

Definition at line 87 of file macros.h.

#define MACRO_SERVICESTATETYPE   42

Definition at line 124 of file macros.h.

#define MACRO_SHORTDATETIME   8

Definition at line 90 of file macros.h.

#define MACRO_STATUSDATAFILE   63

Definition at line 145 of file macros.h.

#define MACRO_TEMPFILE   68

Definition at line 150 of file macros.h.

#define MACRO_TEMPPATH   101

Definition at line 183 of file macros.h.

#define MACRO_TIME   10

Definition at line 92 of file macros.h.

#define MACRO_TIMET   11

Definition at line 93 of file macros.h.

#define MACRO_TOTALHOSTPROBLEMS   85

Definition at line 167 of file macros.h.

#define MACRO_TOTALHOSTPROBLEMSUNHANDLED   86

Definition at line 168 of file macros.h.

#define MACRO_TOTALHOSTSDOWN   81

Definition at line 163 of file macros.h.

#define MACRO_TOTALHOSTSDOWNUNHANDLED   83

Definition at line 165 of file macros.h.

#define MACRO_TOTALHOSTSERVICES   119

Definition at line 201 of file macros.h.

#define MACRO_TOTALHOSTSERVICESCRITICAL   123

Definition at line 205 of file macros.h.

#define MACRO_TOTALHOSTSERVICESOK   120

Definition at line 202 of file macros.h.

#define MACRO_TOTALHOSTSERVICESUNKNOWN   122

Definition at line 204 of file macros.h.

#define MACRO_TOTALHOSTSERVICESWARNING   121

Definition at line 203 of file macros.h.

#define MACRO_TOTALHOSTSUNREACHABLE   82

Definition at line 164 of file macros.h.

#define MACRO_TOTALHOSTSUNREACHABLEUNHANDLED   84

Definition at line 166 of file macros.h.

#define MACRO_TOTALHOSTSUP   80

Definition at line 162 of file macros.h.

#define MACRO_TOTALSERVICEPROBLEMS   94

Definition at line 176 of file macros.h.

#define MACRO_TOTALSERVICEPROBLEMSUNHANDLED   95

Definition at line 177 of file macros.h.

#define MACRO_TOTALSERVICESCRITICAL   89

Definition at line 171 of file macros.h.

#define MACRO_TOTALSERVICESCRITICALUNHANDLED   92

Definition at line 174 of file macros.h.

#define MACRO_TOTALSERVICESOK   87

Definition at line 169 of file macros.h.

#define MACRO_TOTALSERVICESUNKNOWN   90

Definition at line 172 of file macros.h.

#define MACRO_TOTALSERVICESUNKNOWNUNHANDLED   93

Definition at line 175 of file macros.h.

#define MACRO_TOTALSERVICESWARNING   88

Definition at line 170 of file macros.h.

#define MACRO_TOTALSERVICESWARNINGUNHANDLED   91

Definition at line 173 of file macros.h.

#define MACRO_X_COUNT   154

Definition at line 45 of file macros.h.

#define MAX_COMMAND_ARGUMENTS   32

Definition at line 36 of file macros.h.

#define MAX_USER_MACROS   256

Definition at line 43 of file macros.h.

#define STRIP_ILLEGAL_MACRO_CHARS   1

Definition at line 240 of file macros.h.

#define URL_ENCODE_MACRO_CHARS   4

Definition at line 242 of file macros.h.


Typedef Documentation

typedef struct icinga_macros icinga_macros

Definition at line 62 of file macros.h.

typedef struct nagios_macros nagios_macros

Definition at line 80 of file macros.h.


Function Documentation

char* clean_macro_chars ( char *  macro,
int  options 
)

cleans illegal characters in macros before output

Definition at line 2506 of file macros.c.

int clear_argv_macros ( void  )

Definition at line 2844 of file macros.c.

int clear_argv_macros_r ( icinga_macros mac)

clear argv macros - used in commands

Definition at line 2834 of file macros.c.

int clear_contact_macros ( void  )

Definition at line 3224 of file macros.c.

int clear_contact_macros_r ( icinga_macros mac)

clear contact macros the thread-safe version

Definition at line 3186 of file macros.c.

int clear_contactgroup_macros ( void  )

Definition at line 3254 of file macros.c.

int clear_contactgroup_macros_r ( icinga_macros mac)

clear contactgroup macros the thread-safe version

Definition at line 3233 of file macros.c.

int clear_host_macros ( void  )

Definition at line 3111 of file macros.c.

int clear_host_macros_r ( icinga_macros mac)

clear host macros the thread-safe version

Definition at line 3040 of file macros.c.

int clear_hostgroup_macros ( void  )

Definition at line 3144 of file macros.c.

int clear_hostgroup_macros_r ( icinga_macros mac)

clear hostgroup macros the thread-safe version

Definition at line 3120 of file macros.c.

int clear_service_macros ( void  )

Definition at line 3031 of file macros.c.

int clear_service_macros_r ( icinga_macros mac)

clear service macros the thread-safe version

Definition at line 2966 of file macros.c.

int clear_servicegroup_macros ( void  )

Definition at line 3177 of file macros.c.

int clear_servicegroup_macros_r ( icinga_macros mac)

clear servicegroup macros the thread-safe version

Definition at line 3153 of file macros.c.

int clear_summary_macros ( void  )

Definition at line 3273 of file macros.c.

int clear_summary_macros_r ( icinga_macros mac)

clear summary macros the thread-safe version

Definition at line 3264 of file macros.c.

int clear_volatile_macros ( void  )

Definition at line 2957 of file macros.c.

int clear_volatile_macros_r ( icinga_macros mac)

clear all macros that are not "constant" (i.e. they change throughout the course of monitoring) the thread-safe version

Definition at line 2878 of file macros.c.

void copy_constant_macros ( char **  dest)

Definition at line 2855 of file macros.c.

int free_macrox_names ( void  )

free memory associated with the macrox names

Definition at line 2819 of file macros.c.

icinga_macros* get_global_macros ( void  )

Definition at line 77 of file macros.c.

char* get_url_encoded_string ( char *  input)

encodes a string in proper URL format

Definition at line 2564 of file macros.c.

int grab_contact_address_macro ( int  ,
contact ,
char **   
)

Definition at line 2417 of file macros.c.

int grab_contact_address_macro_r ( icinga_macros mac,
int  macro_num,
contact temp_contact,
char **  output 
)

computes a contact address macro

Definition at line 2402 of file macros.c.

int grab_contact_macros ( contact )

Definition at line 404 of file macros.c.

int grab_contact_macros_r ( icinga_macros mac,
contact cntct 
)

grab macros that are specific to a particular contact

Definition at line 382 of file macros.c.

int grab_contactgroup_macros ( contactgroup )

Definition at line 427 of file macros.c.

int grab_contactgroup_macros_r ( icinga_macros mac,
contactgroup cg 
)

grab contactgroup macros

Definition at line 413 of file macros.c.

int grab_custom_macro_value ( char *  ,
char *  ,
char *  ,
char **   
)

Definition at line 1508 of file macros.c.

int grab_custom_macro_value_r ( icinga_macros mac,
char *  macro_name,
char *  arg1,
char *  arg2,
char **  output 
)

calculates the value of a custom macro

Definition at line 1303 of file macros.c.

int grab_custom_object_macro ( char *  ,
customvariablesmember ,
char **   
)

Definition at line 2494 of file macros.c.

int grab_custom_object_macro_r ( icinga_macros mac,
char *  macro_name,
customvariablesmember vars,
char **  output 
)

computes a custom object macro

Definition at line 2470 of file macros.c.

int grab_datetime_macro ( int  ,
char *  ,
char *  ,
char **   
)

Definition at line 1607 of file macros.c.

int grab_datetime_macro_r ( icinga_macros mac,
int  macro_type,
char *  arg1,
char *  arg2,
char **  output 
)

calculates a date/time macro

Definition at line 1516 of file macros.c.

int grab_host_macros ( host )

Definition at line 298 of file macros.c.

int grab_host_macros_r ( icinga_macros mac,
host hst 
)

grab macros that are specific to a particular host

Definition at line 276 of file macros.c.

int grab_hostgroup_macros ( hostgroup )

Definition at line 320 of file macros.c.

int grab_hostgroup_macros_r ( icinga_macros mac,
hostgroup hg 
)

grab hostgroup macros

Definition at line 306 of file macros.c.

int grab_macro_value ( char *  ,
char **  ,
int *  ,
int *   
)

Definition at line 655 of file macros.c.

int grab_macro_value_r ( icinga_macros mac,
char *  macro_buffer,
char **  output,
int *  clean_options,
int *  free_macro 
)

this is the big one

Definition at line 439 of file macros.c.

int grab_macrox_value ( int  ,
char *  ,
char *  ,
char **  ,
int *   
)

Definition at line 1294 of file macros.c.

int grab_macrox_value_r ( icinga_macros mac,
int  macro_type,
char *  arg1,
char *  arg2,
char **  output,
int *  free_macro 
)

grab macrox value

Definition at line 663 of file macros.c.

int grab_service_macros ( service )

Definition at line 350 of file macros.c.

int grab_service_macros_r ( icinga_macros mac,
service svc 
)

grab macros that are specific to a particular service

Definition at line 328 of file macros.c.

int grab_servicegroup_macros ( servicegroup )

Definition at line 373 of file macros.c.

int grab_servicegroup_macros_r ( icinga_macros mac,
servicegroup sg 
)

grab macros that are specific to a particular servicegroup

Definition at line 359 of file macros.c.

int grab_standard_contact_macro ( int  ,
contact ,
char **   
)

Definition at line 2394 of file macros.c.

int grab_standard_contact_macro_r ( icinga_macros mac,
int  macro_type,
contact temp_contact,
char **  output 
)

computes a contact macro

Definition at line 2340 of file macros.c.

int grab_standard_contactgroup_macro ( int  ,
contactgroup ,
char **   
)

Definition at line 2461 of file macros.c.

int grab_standard_contactgroup_macro_r ( icinga_macros mac,
int  macro_type,
contactgroup temp_contactgroup,
char **  output 
)

computes a contactgroup macro

Definition at line 2425 of file macros.c.

int grab_standard_host_macro ( int  ,
host ,
char **  ,
int *   
)

Definition at line 1901 of file macros.c.

int grab_standard_host_macro_r ( icinga_macros mac,
int  macro_type,
host temp_host,
char **  output,
int *  free_macro 
)

calculates a host macro

Definition at line 1615 of file macros.c.

int grab_standard_hostgroup_macro ( int  ,
hostgroup ,
char **   
)

Definition at line 1996 of file macros.c.

int grab_standard_hostgroup_macro_r ( icinga_macros mac,
int  macro_type,
hostgroup temp_hostgroup,
char **  output 
)

computes a hostgroup macro

Definition at line 1909 of file macros.c.

int grab_standard_service_macro ( int  ,
service ,
char **  ,
int *   
)

Definition at line 2236 of file macros.c.

int grab_standard_service_macro_r ( icinga_macros mac,
int  macro_type,
service temp_service,
char **  output,
int *  free_macro 
)

computes a service macro

Definition at line 2004 of file macros.c.

int grab_standard_servicegroup_macro ( int  ,
servicegroup ,
char **   
)

Definition at line 2332 of file macros.c.

int grab_standard_servicegroup_macro_r ( icinga_macros mac,
int  macro_type,
servicegroup temp_servicegroup,
char **  output 
)

computes a servicegroup macro

Definition at line 2244 of file macros.c.

int init_macros ( void  )

initializes global macros

Definition at line 2618 of file macros.c.

int init_macrox_names ( void  )

Definition at line 2645 of file macros.c.

int process_macros ( char *  ,
char **  ,
int   
)

Definition at line 264 of file macros.c.

int process_macros_r ( icinga_macros mac,
char *  input_buffer,
char **  output_buffer,
int  options 
)

replace macros in notification commands with their values, the thread-safe version

Definition at line 90 of file macros.c.

 All Data Structures Files Functions Variables Typedefs Defines