pacemaker  3.0.0-d8340737c4
Scalable High-Availability cluster resource manager
Functions | Variables
alerts.c File Reference
#include <crm_internal.h>
#include <crm/crm.h>
#include <crm/lrmd.h>
#include <crm/common/xml.h>
#include <crm/common/alerts_internal.h>
#include <crm/common/cib_internal.h>
#include <crm/common/xml_internal.h>
Include dependency graph for alerts.c:

Go to the source code of this file.

Functions

pcmk__alert_tpcmk__alert_new (const char *id, const char *path)
 Create a new alert entry structure. More...
 
void pcmk__free_alert (pcmk__alert_t *entry)
 
pcmk__alert_tpcmk__dup_alert (const pcmk__alert_t *entry)
 
void pcmk__add_alert_key (GHashTable *table, enum pcmk__alert_keys_e name, const char *value)
 
void pcmk__add_alert_key_int (GHashTable *table, enum pcmk__alert_keys_e name, int value)
 

Variables

const char * pcmk__alert_keys [PCMK__ALERT_INTERNAL_KEY_MAX]
 

Function Documentation

◆ pcmk__add_alert_key()

void pcmk__add_alert_key ( GHashTable *  table,
enum pcmk__alert_keys_e  name,
const char *  value 
)

Definition at line 106 of file alerts.c.

◆ pcmk__add_alert_key_int()

void pcmk__add_alert_key_int ( GHashTable *  table,
enum pcmk__alert_keys_e  name,
int  value 
)

Definition at line 122 of file alerts.c.

◆ pcmk__alert_new()

pcmk__alert_t* pcmk__alert_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 pcmk__free_alert().

Definition at line 52 of file alerts.c.

◆ pcmk__dup_alert()

pcmk__alert_t* pcmk__dup_alert ( const pcmk__alert_t entry)

Definition at line 90 of file alerts.c.

◆ pcmk__free_alert()

void pcmk__free_alert ( pcmk__alert_t entry)

Definition at line 65 of file alerts.c.

Variable Documentation

◆ pcmk__alert_keys

const char* pcmk__alert_keys[PCMK__ALERT_INTERNAL_KEY_MAX]
Initial value:
= {
[PCMK__alert_key_recipient] = "CRM_alert_recipient",
[PCMK__alert_key_node] = "CRM_alert_node",
[PCMK__alert_key_nodeid] = "CRM_alert_nodeid",
[PCMK__alert_key_rsc] = "CRM_alert_rsc",
[PCMK__alert_key_task] = "CRM_alert_task",
[PCMK__alert_key_interval] = "CRM_alert_interval",
[PCMK__alert_key_desc] = "CRM_alert_desc",
[PCMK__alert_key_status] = "CRM_alert_status",
[PCMK__alert_key_target_rc] = "CRM_alert_target_rc",
[PCMK__alert_key_rc] = "CRM_alert_rc",
[PCMK__alert_key_kind] = "CRM_alert_kind",
[PCMK__alert_key_version] = "CRM_alert_version",
[PCMK__alert_key_timestamp] = "CRM_alert_timestamp",
[PCMK__alert_key_attribute_name] = "CRM_alert_attribute_name",
[PCMK__alert_key_attribute_value] = "CRM_alert_attribute_value",
[PCMK__alert_key_timestamp_epoch] = "CRM_alert_timestamp_epoch",
[PCMK__alert_key_timestamp_usec] = "CRM_alert_timestamp_usec",
[PCMK__alert_key_exec_time] = "CRM_alert_exec_time",
}
#define PCMK__ALERT_NODE_SEQUENCE

Definition at line 18 of file alerts.c.