pacemaker  1.1.18-7fdfbbe
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
alerts.c File Reference
#include <crm_internal.h>
#include <crm/crm.h>
#include <crm/lrmd.h>
#include <crm/msg_xml.h>
#include <crm/common/alerts_internal.h>
#include <crm/cib/internal.h>
Include dependency graph for alerts.c:

Go to the source code of this file.

Macros

#define XPATH_PATCHSET1_DIFF   "//" F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED
 
#define XPATH_PATCHSET1_CRMCONFIG   XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_CRMCONFIG
 
#define XPATH_PATCHSET1_ALERTS   XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_ALERTS
 
#define XPATH_PATCHSET1_EITHER   XPATH_PATCHSET1_CRMCONFIG " | " XPATH_PATCHSET1_ALERTS
 
#define XPATH_CONFIG   "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION
 
#define XPATH_CRMCONFIG   XPATH_CONFIG "/" XML_CIB_TAG_CRMCONFIG "/"
 
#define XPATH_ALERTS   XPATH_CONFIG "/" XML_CIB_TAG_ALERTS
 

Functions

void crm_free_alert_envvar (crm_alert_envvar_t *entry)
 
crm_alert_entry_tcrm_alert_entry_new (const char *id, const char *path)
 Create a new alert entry structure. More...
 
void crm_free_alert_entry (crm_alert_entry_t *entry)
 
crm_alert_envvar_tcrm_dup_alert_envvar (crm_alert_envvar_t *src)
 
crm_alert_entry_tcrm_dup_alert_entry (crm_alert_entry_t *entry)
 
void crm_unset_alert_keys ()
 
void crm_insert_alert_key (GHashTable *table, enum crm_alert_keys_e name, const char *value)
 
void crm_insert_alert_key_int (GHashTable *table, enum crm_alert_keys_e name, int value)
 
void crm_set_envvar_list (crm_alert_entry_t *entry)
 
void crm_unset_envvar_list (crm_alert_entry_t *entry)
 
bool crm_patchset_contains_alert (xmlNode *msg, bool config)
 

Variables

const char * crm_alert_keys [CRM_ALERT_INTERNAL_KEY_MAX][3]
 

Macro Definition Documentation

#define XPATH_ALERTS   XPATH_CONFIG "/" XML_CIB_TAG_ALERTS

Definition at line 221 of file alerts.c.

#define XPATH_CONFIG   "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION

Definition at line 218 of file alerts.c.

#define XPATH_CRMCONFIG   XPATH_CONFIG "/" XML_CIB_TAG_CRMCONFIG "/"

Definition at line 220 of file alerts.c.

#define XPATH_PATCHSET1_ALERTS   XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_ALERTS

Definition at line 213 of file alerts.c.

#define XPATH_PATCHSET1_CRMCONFIG   XPATH_PATCHSET1_DIFF "//" XML_CIB_TAG_CRMCONFIG

Definition at line 212 of file alerts.c.

#define XPATH_PATCHSET1_DIFF   "//" F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED

Definition at line 210 of file alerts.c.

#define XPATH_PATCHSET1_EITHER   XPATH_PATCHSET1_CRMCONFIG " | " XPATH_PATCHSET1_ALERTS

Definition at line 215 of file alerts.c.

Function Documentation

crm_alert_entry_t* crm_alert_entry_new ( const char *  id,
const char *  path 
)

Create a new alert entry structure.

Parameters
[in]idID to use
[in]pathPath to alert agent executable
Returns
Pointer to newly allocated alert entry
Note
Non-string fields will be filled in with defaults. It is the caller's responsibility to free the result, using crm_free_alert_entry().

Definition at line 70 of file alerts.c.

crm_alert_entry_t* crm_dup_alert_entry ( crm_alert_entry_t entry)

Definition at line 119 of file alerts.c.

crm_alert_envvar_t* crm_dup_alert_envvar ( crm_alert_envvar_t src)

Definition at line 100 of file alerts.c.

void crm_free_alert_entry ( crm_alert_entry_t entry)

Definition at line 83 of file alerts.c.

void crm_free_alert_envvar ( crm_alert_envvar_t entry)

Definition at line 51 of file alerts.c.

void crm_insert_alert_key ( GHashTable *  table,
enum crm_alert_keys_e  name,
const char *  value 
)

Definition at line 153 of file alerts.c.

void crm_insert_alert_key_int ( GHashTable *  table,
enum crm_alert_keys_e  name,
int  value 
)

Definition at line 167 of file alerts.c.

bool crm_patchset_contains_alert ( xmlNode *  msg,
bool  config 
)

Definition at line 233 of file alerts.c.

void crm_set_envvar_list ( crm_alert_entry_t entry)

Definition at line 192 of file alerts.c.

void crm_unset_alert_keys ( void  )

Definition at line 139 of file alerts.c.

void crm_unset_envvar_list ( crm_alert_entry_t entry)

Definition at line 203 of file alerts.c.

Variable Documentation

const char* crm_alert_keys[CRM_ALERT_INTERNAL_KEY_MAX][3]
Initial value:
=
{
[CRM_alert_recipient] = {"CRM_notify_recipient", "CRM_alert_recipient", NULL},
[CRM_alert_node] = {"CRM_notify_node", "CRM_alert_node", NULL},
[CRM_alert_nodeid] = {"CRM_notify_nodeid", "CRM_alert_nodeid", NULL},
[CRM_alert_rsc] = {"CRM_notify_rsc", "CRM_alert_rsc", NULL},
[CRM_alert_task] = {"CRM_notify_task", "CRM_alert_task", NULL},
[CRM_alert_interval] = {"CRM_notify_interval", "CRM_alert_interval", NULL},
[CRM_alert_desc] = {"CRM_notify_desc", "CRM_alert_desc", NULL},
[CRM_alert_status] = {"CRM_notify_status", "CRM_alert_status", NULL},
[CRM_alert_target_rc] = {"CRM_notify_target_rc", "CRM_alert_target_rc", NULL},
[CRM_alert_rc] = {"CRM_notify_rc", "CRM_alert_rc", NULL},
[CRM_alert_kind] = {"CRM_notify_kind", "CRM_alert_kind", NULL},
[CRM_alert_version] = {"CRM_notify_version", "CRM_alert_version", NULL},
[CRM_alert_node_sequence] = {"CRM_notify_node_sequence", CRM_ALERT_NODE_SEQUENCE, NULL},
[CRM_alert_timestamp] = {"CRM_notify_timestamp", "CRM_alert_timestamp", NULL},
[CRM_alert_attribute_name] = {"CRM_notify_attribute_name", "CRM_alert_attribute_name", NULL},
[CRM_alert_attribute_value] = {"CRM_notify_attribute_value", "CRM_alert_attribute_value", NULL}
}
#define CRM_ALERT_NODE_SEQUENCE

Definition at line 30 of file alerts.c.