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);
118 g_hash_table_destroy(entry->
envvars);
153 crm_trace(
"Inserting alert key %s = '%s'", *key, value);
155 g_hash_table_insert(table, strdup(*key), strdup(value));
157 g_hash_table_remove(table, *key);
167 crm_trace(
"Inserting alert key %s = %d", *key, value);
168 g_hash_table_insert(table, strdup(*key), pcmk__itoa(value));
172 #define XPATH_PATCHSET1_DIFF "//" F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED 174 #define XPATH_PATCHSET1_CRMCONFIG XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_CRMCONFIG 175 #define XPATH_PATCHSET1_ALERTS XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_ALERTS 177 #define XPATH_PATCHSET1_EITHER \ 178 XPATH_PATCHSET1_CRMCONFIG " | " XPATH_PATCHSET1_ALERTS 180 #define XPATH_CONFIG "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION 182 #define XPATH_CRMCONFIG XPATH_CONFIG "/" XML_CIB_TAG_CRMCONFIG "/" 183 #define XPATH_ALERTS XPATH_CONFIG "/" XML_CIB_TAG_ALERTS 200 xmlNode *change = NULL;
201 xmlXPathObject *xpathObj = NULL;
219 }
else if (format == 2) {
220 for (change = pcmk__xml_first_child(patchset); change != NULL;
221 change = pcmk__xml_next(change)) {
233 xmlNode *section = NULL;
234 const char *
name = NULL;
237 ((section = pcmk__xml_first_child(change)) == NULL) ||
238 ((
name = crm_element_name(section)) == NULL) ||
250 crm_warn(
"Unknown patch format: %d", format);
#define CRM_CHECK(expr, failure_action)
const char * pcmk__alert_keys[PCMK__ALERT_INTERNAL_KEY_MAX][3]
xmlNode * get_message_xml(xmlNode *msg, const char *field)
const char * pcmk_strerror(int rc)
void pcmk__free_alert(pcmk__alert_t *entry)
#define PCMK__ALERT_INTERNAL_KEY_MAX
char ** select_attribute_name
#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.
#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.
void pcmk__add_alert_key(GHashTable *table, enum pcmk__alert_keys_e name, const char *value)
#define crm_trace(fmt, args...)
#define F_CIB_UPDATE_RESULT
void pcmk__str_update(char **str, const char *value)
void pcmk__add_alert_key_int(GHashTable *table, enum pcmk__alert_keys_e name, int value)
pcmk__alert_t * pcmk__dup_alert(pcmk__alert_t *entry)
xmlXPathObjectPtr xpath_search(xmlNode *xml_top, const char *path)
GHashTable * pcmk__str_table_dup(GHashTable *old_table)
bool pcmk__alert_in_patchset(xmlNode *msg, bool config)
#define XML_CIB_TAG_ALERTS
void freeXpathObject(xmlXPathObjectPtr xpathObj)
pcmk__alert_t * pcmk__alert_new(const char *id, const char *path)
Create a new alert entry structure.
#define PCMK__ALERT_DEFAULT_TIMEOUT_MS