Data nodes and management servers regularly and on specific
occasions report on various log events that occur in the
cluster. These log events are written to the cluster log.
Optionally an MGM API client may listen to these events using
the method ndb_mgm_listen_event()
. Each log
event belongs to a category
ndb_mgm_event_category
) and has a severity
ndb_mgm_event_severity
associated with it.
Each log event also has a level (0-15) associated with it.
Which log events that come out is controlled with
ndb_mgm_listen_event()
,
ndb_mgm_set_clusterlog_loglevel()
, and
ndb_mgm_set_clusterlog_severity_filter()
.
This is an example showing how to listen to events related to backup:
int filter[] = { 15, NDB_MGM_EVENT_CATEGORY_BACKUP, 0 }; int fd = ndb_mgm_listen_event(handle, filter);