25 "CRM_notify_recipient",
"CRM_alert_recipient", NULL
28 "CRM_notify_node",
"CRM_alert_node", NULL
31 "CRM_notify_nodeid",
"CRM_alert_nodeid", NULL
34 "CRM_notify_rsc",
"CRM_alert_rsc", NULL
37 "CRM_notify_task",
"CRM_alert_task", NULL
40 "CRM_notify_interval",
"CRM_alert_interval", NULL
43 "CRM_notify_desc",
"CRM_alert_desc", NULL
46 "CRM_notify_status",
"CRM_alert_status", NULL
49 "CRM_notify_target_rc",
"CRM_alert_target_rc", NULL
52 "CRM_notify_rc",
"CRM_alert_rc", NULL
55 "CRM_notify_kind",
"CRM_alert_kind", NULL
58 "CRM_notify_version",
"CRM_alert_version", NULL
64 "CRM_notify_timestamp",
"CRM_alert_timestamp", NULL
67 "CRM_notify_attribute_name",
"CRM_alert_attribute_name", NULL
70 "CRM_notify_attribute_value",
"CRM_alert_attribute_value", NULL
73 "CRM_notify_timestamp_epoch",
"CRM_alert_timestamp_epoch", NULL
76 "CRM_notify_timestamp_usec",
"CRM_alert_timestamp_usec", NULL
79 "CRM_notify_exec_time",
"CRM_alert_exec_time", NULL
100 entry->
id = strdup(
id);
101 entry->
path = strdup(path);
118 g_hash_table_destroy(entry->
envvars);
157 crm_trace(
"Inserting alert key %s = '%s'", *key, value);
159 g_hash_table_insert(table, strdup(*key), strdup(value));
161 g_hash_table_remove(table, *key);
171 crm_trace(
"Inserting alert key %s = %d", *key, value);
172 g_hash_table_insert(table, strdup(*key), pcmk__itoa(value));
176 #define XPATH_PATCHSET1_DIFF "//" F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED
178 #define XPATH_PATCHSET1_CRMCONFIG XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_CRMCONFIG
179 #define XPATH_PATCHSET1_ALERTS XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_ALERTS
181 #define XPATH_PATCHSET1_EITHER \
182 XPATH_PATCHSET1_CRMCONFIG " | " XPATH_PATCHSET1_ALERTS
184 #define XPATH_CONFIG "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION
186 #define XPATH_CRMCONFIG XPATH_CONFIG "/" XML_CIB_TAG_CRMCONFIG "/"
187 #define XPATH_ALERTS XPATH_CONFIG "/" XML_CIB_TAG_ALERTS
204 xmlNode *change = NULL;
205 xmlXPathObject *xpathObj = NULL;
223 }
else if (format == 2) {
224 for (change = pcmk__xml_first_child(patchset); change != NULL;
225 change = pcmk__xml_next(change)) {
237 xmlNode *section = NULL;
238 const char *
name = NULL;
241 ((section = pcmk__xml_first_child(change)) == NULL) ||
242 ((name = crm_element_name(section)) == NULL) ||
254 crm_warn(
"Unknown patch format: %d", format);
void pcmk__add_alert_key_int(GHashTable *table, enum pcmk__alert_keys_e name, int value)
#define CRM_CHECK(expr, failure_action)
xmlNode * get_message_xml(xmlNode *msg, const char *field)
const char * pcmk_strerror(int rc)
#define PCMK__ALERT_INTERNAL_KEY_MAX
char ** select_attribute_name
pcmk__alert_t * pcmk__dup_alert(pcmk__alert_t *entry)
bool pcmk__alert_in_patchset(xmlNode *msg, bool config)
#define PCMK__ALERT_NODE_SEQUENCE
int crm_element_value_int(const xmlNode *data, const char *name, int *dest)
Retrieve the integer value of an XML attribute.
void pcmk__free_alert(pcmk__alert_t *entry)
const char * pcmk__alert_keys[PCMK__ALERT_INTERNAL_KEY_MAX][3]
#define XPATH_PATCHSET1_EITHER
#define crm_warn(fmt, args...)
#define XPATH_PATCHSET1_ALERTS
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
#define crm_trace(fmt, args...)
#define F_CIB_UPDATE_RESULT
xmlXPathObjectPtr xpath_search(xmlNode *xml_top, const char *path)
GHashTable * pcmk__str_table_dup(GHashTable *old_table)
pcmk__alert_t * pcmk__alert_new(const char *id, const char *path)
Create a new alert entry structure.
#define XML_CIB_TAG_ALERTS
void freeXpathObject(xmlXPathObjectPtr xpathObj)
#define PCMK__ALERT_DEFAULT_TIMEOUT_MS
void pcmk__add_alert_key(GHashTable *table, enum pcmk__alert_keys_e name, const char *value)