#include "../include/macros.h"#include "../include/config.h"#include "../include/common.h"#include "../include/objects.h"#include "../include/statusdata.h"#include "../include/comments.h"#include "../include/cgiutils.h"| #define add_macrox_name | ( | name | ) | macro_x_names[MACRO_##name] = strdup(#name) |
initializes the names of macros, using this nifty little macro which ensures we never add any typos to the list #name appends as astring, name makes sure that param is trated as string
| #define cp_macro | ( | name | ) | dest[MACRO_##name] = global_macros.x[MACRO_##name] |
copies non-volatile macros from global macro_x to **dest, which must be large enough to hold at least MACRO_X_COUNT entries. We use a shortlived macro to save up on typing
| char* clean_macro_chars | ( | char * | macro, | |
| int | options | |||
| ) |
cleans illegal characters in macros before output
| int clear_argv_macros | ( | void | ) |
| int clear_argv_macros_r | ( | icinga_macros * | mac | ) |
clear argv macros - used in commands
| int clear_contact_macros | ( | void | ) |
| int clear_contact_macros_r | ( | icinga_macros * | mac | ) |
clear contact macros the thread-safe version
| int clear_contactgroup_macros | ( | void | ) |
| int clear_contactgroup_macros_r | ( | icinga_macros * | mac | ) |
clear contactgroup macros the thread-safe version
| int clear_host_macros | ( | void | ) |
| int clear_host_macros_r | ( | icinga_macros * | mac | ) |
clear host macros the thread-safe version
| int clear_hostgroup_macros | ( | void | ) |
| int clear_hostgroup_macros_r | ( | icinga_macros * | mac | ) |
clear hostgroup macros the thread-safe version
| int clear_service_macros | ( | void | ) |
| int clear_service_macros_r | ( | icinga_macros * | mac | ) |
clear service macros the thread-safe version
| int clear_servicegroup_macros | ( | void | ) |
| int clear_servicegroup_macros_r | ( | icinga_macros * | mac | ) |
clear servicegroup macros the thread-safe version
| int clear_summary_macros | ( | void | ) |
| int clear_summary_macros_r | ( | icinga_macros * | mac | ) |
clear summary macros the thread-safe version
| int clear_volatile_macros | ( | void | ) |
| 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
| void copy_constant_macros | ( | char ** | dest | ) |
| int free_macrox_names | ( | void | ) |
free memory associated with the macrox names
| icinga_macros* get_global_macros | ( | void | ) |
| char* get_url_encoded_string | ( | char * | input | ) |
encodes a string in proper URL format
| int grab_contact_address_macro | ( | int | macro_num, | |
| contact * | temp_contact, | |||
| char ** | output | |||
| ) |
| int grab_contact_address_macro_r | ( | icinga_macros * | mac, | |
| int | macro_num, | |||
| contact * | temp_contact, | |||
| char ** | output | |||
| ) |
computes a contact address macro
| int grab_contact_macros | ( | contact * | cntct | ) |
| int grab_contact_macros_r | ( | icinga_macros * | mac, | |
| contact * | cntct | |||
| ) |
grab macros that are specific to a particular contact
| int grab_contactgroup_macros | ( | contactgroup * | cg | ) |
| int grab_contactgroup_macros_r | ( | icinga_macros * | mac, | |
| contactgroup * | cg | |||
| ) |
grab contactgroup macros
| int grab_custom_macro_value | ( | char * | macro_name, | |
| char * | arg1, | |||
| char * | arg2, | |||
| char ** | output | |||
| ) |
| 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
| int grab_custom_object_macro | ( | char * | macro_name, | |
| customvariablesmember * | vars, | |||
| char ** | output | |||
| ) |
| int grab_custom_object_macro_r | ( | icinga_macros * | mac, | |
| char * | macro_name, | |||
| customvariablesmember * | vars, | |||
| char ** | output | |||
| ) |
computes a custom object macro
| int grab_datetime_macro | ( | int | macro_type, | |
| char * | arg1, | |||
| char * | arg2, | |||
| char ** | output | |||
| ) |
| int grab_datetime_macro_r | ( | icinga_macros * | mac, | |
| int | macro_type, | |||
| char * | arg1, | |||
| char * | arg2, | |||
| char ** | output | |||
| ) |
calculates a date/time macro
| int grab_host_macros | ( | host * | hst | ) |
| int grab_host_macros_r | ( | icinga_macros * | mac, | |
| host * | hst | |||
| ) |
grab macros that are specific to a particular host
| int grab_hostgroup_macros | ( | hostgroup * | hg | ) |
| int grab_hostgroup_macros_r | ( | icinga_macros * | mac, | |
| hostgroup * | hg | |||
| ) |
grab hostgroup macros
| int grab_macro_value | ( | char * | macro_buffer, | |
| char ** | output, | |||
| int * | clean_options, | |||
| int * | free_macro | |||
| ) |
| int grab_macro_value_r | ( | icinga_macros * | mac, | |
| char * | macro_buffer, | |||
| char ** | output, | |||
| int * | clean_options, | |||
| int * | free_macro | |||
| ) |
this is the big one
| int grab_macrox_value | ( | int | macro_type, | |
| char * | arg1, | |||
| char * | arg2, | |||
| char ** | output, | |||
| int * | free_macro | |||
| ) |
| int grab_macrox_value_r | ( | icinga_macros * | mac, | |
| int | macro_type, | |||
| char * | arg1, | |||
| char * | arg2, | |||
| char ** | output, | |||
| int * | free_macro | |||
| ) |
grab macrox value
| int grab_service_macros | ( | service * | svc | ) |
| int grab_service_macros_r | ( | icinga_macros * | mac, | |
| service * | svc | |||
| ) |
grab macros that are specific to a particular service
| int grab_servicegroup_macros | ( | servicegroup * | sg | ) |
| int grab_servicegroup_macros_r | ( | icinga_macros * | mac, | |
| servicegroup * | sg | |||
| ) |
grab macros that are specific to a particular servicegroup
| int grab_standard_contact_macro | ( | int | macro_type, | |
| contact * | temp_contact, | |||
| char ** | output | |||
| ) |
| int grab_standard_contact_macro_r | ( | icinga_macros * | mac, | |
| int | macro_type, | |||
| contact * | temp_contact, | |||
| char ** | output | |||
| ) |
computes a contact macro
| int grab_standard_contactgroup_macro | ( | int | macro_type, | |
| contactgroup * | temp_contactgroup, | |||
| char ** | output | |||
| ) |
| int grab_standard_contactgroup_macro_r | ( | icinga_macros * | mac, | |
| int | macro_type, | |||
| contactgroup * | temp_contactgroup, | |||
| char ** | output | |||
| ) |
computes a contactgroup macro
| int grab_standard_host_macro | ( | int | macro_type, | |
| host * | temp_host, | |||
| char ** | output, | |||
| int * | free_macro | |||
| ) |
| int grab_standard_host_macro_r | ( | icinga_macros * | mac, | |
| int | macro_type, | |||
| host * | temp_host, | |||
| char ** | output, | |||
| int * | free_macro | |||
| ) |
calculates a host macro
| int grab_standard_hostgroup_macro | ( | int | macro_type, | |
| hostgroup * | temp_hostgroup, | |||
| char ** | output | |||
| ) |
| int grab_standard_hostgroup_macro_r | ( | icinga_macros * | mac, | |
| int | macro_type, | |||
| hostgroup * | temp_hostgroup, | |||
| char ** | output | |||
| ) |
computes a hostgroup macro
| int grab_standard_service_macro | ( | int | macro_type, | |
| service * | temp_service, | |||
| char ** | output, | |||
| int * | free_macro | |||
| ) |
| int grab_standard_service_macro_r | ( | icinga_macros * | mac, | |
| int | macro_type, | |||
| service * | temp_service, | |||
| char ** | output, | |||
| int * | free_macro | |||
| ) |
computes a service macro
| int grab_standard_servicegroup_macro | ( | int | macro_type, | |
| servicegroup * | temp_servicegroup, | |||
| char ** | output | |||
| ) |
| int grab_standard_servicegroup_macro_r | ( | icinga_macros * | mac, | |
| int | macro_type, | |||
| servicegroup * | temp_servicegroup, | |||
| char ** | output | |||
| ) |
computes a servicegroup macro
| int init_macros | ( | void | ) |
initializes global macros
| int init_macrox_names | ( | void | ) |
| int process_macros | ( | char * | input_buffer, | |
| char ** | output_buffer, | |||
| int | options | |||
| ) |
| 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
icinga_macros global_macros [static] |
scoped to this file to prevent (unintentional) mischief, but see base/notifications.c for how to use it
| char* illegal_output_chars |
| char* macro_user[MAX_USER_MACROS] |
| char** macro_x = NULL |
These point to their corresponding pointer arrays in global_macros AFTER macros have been initialized.
They really only exist so that eventbroker modules that reference them won't need to be re-compiled, although modules that rely on their values after having run a certain command will require an update
| char* macro_x_names[MACRO_X_COUNT] |
1.4.7