24 "CRM_notify_recipient",
"CRM_alert_recipient", NULL
27 "CRM_notify_node",
"CRM_alert_node", NULL
30 "CRM_notify_nodeid",
"CRM_alert_nodeid", NULL
33 "CRM_notify_rsc",
"CRM_alert_rsc", NULL
36 "CRM_notify_task",
"CRM_alert_task", NULL
39 "CRM_notify_interval",
"CRM_alert_interval", NULL
42 "CRM_notify_desc",
"CRM_alert_desc", NULL
45 "CRM_notify_status",
"CRM_alert_status", NULL
48 "CRM_notify_target_rc",
"CRM_alert_target_rc", NULL
51 "CRM_notify_rc",
"CRM_alert_rc", NULL
54 "CRM_notify_kind",
"CRM_alert_kind", NULL
57 "CRM_notify_version",
"CRM_alert_version", NULL
63 "CRM_notify_timestamp",
"CRM_alert_timestamp", NULL
66 "CRM_notify_attribute_name",
"CRM_alert_attribute_name", NULL
69 "CRM_notify_attribute_value",
"CRM_alert_attribute_value", NULL
72 "CRM_notify_timestamp_epoch",
"CRM_alert_timestamp_epoch", NULL
75 "CRM_notify_timestamp_usec",
"CRM_alert_timestamp_usec", NULL
78 "CRM_notify_exec_time",
"CRM_alert_exec_time", NULL
99 entry->
id = strdup(
id);
100 entry->
path = strdup(path);
117 g_hash_table_destroy(entry->
envvars);
156 crm_trace(
"Inserting alert key %s = '%s'", *key, value);
158 g_hash_table_insert(table, strdup(*key), strdup(value));
160 g_hash_table_remove(table, *key);
170 crm_trace(
"Inserting alert key %s = %d", *key, value);
171 g_hash_table_insert(table, strdup(*key), crm_itoa(value));
175 #define XPATH_PATCHSET1_DIFF "//" F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED
177 #define XPATH_PATCHSET1_CRMCONFIG XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_CRMCONFIG
178 #define XPATH_PATCHSET1_ALERTS XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_ALERTS
180 #define XPATH_PATCHSET1_EITHER \
181 XPATH_PATCHSET1_CRMCONFIG " | " XPATH_PATCHSET1_ALERTS
183 #define XPATH_CONFIG "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION
185 #define XPATH_CRMCONFIG XPATH_CONFIG "/" XML_CIB_TAG_CRMCONFIG "/"
186 #define XPATH_ALERTS XPATH_CONFIG "/" XML_CIB_TAG_ALERTS
203 xmlNode *change = NULL;
204 xmlXPathObject *xpathObj = NULL;
222 }
else if (format == 2) {
223 for (change = __xml_first_child(patchset); change != NULL; change = __xml_next(change)) {
235 xmlNode *section = NULL;
236 const char *
name = NULL;
239 ((section = __xml_first_child(change)) == NULL) ||
240 ((name = crm_element_name(section)) == NULL) ||
252 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 * crm_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)