MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / mon_st_callback

Function mon_st_callback

tools/crm_mon.c:2236–2252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2234}
2235
2236void mon_st_callback(stonith_t *st, stonith_event_t *e)
2237{
2238 char *desc = g_strdup_printf(
2239 "Operation %s requested by %s for peer %s: %s (ref=%s)",
2240 e->operation, e->origin, e->target, pcmk_strerror(e->result), e->id);
2241
2242 if (snmp_target) {
2243 send_snmp_trap(e->target, NULL, e->operation, pcmk_ok, e->result, 0, desc);
2244 }
2245 if (crm_mail_to) {
2246 send_smtp_trap(e->target, NULL, e->operation, pcmk_ok, e->result, 0, desc);
2247 }
2248 if (external_agent) {
2249 send_custom_trap(e->target, NULL, e->operation, pcmk_ok, e->result, 0, desc);
2250 }
2251 g_free(desc);
2252}
2253
2254/*
2255 * De-init ncurses, signoff from the CIB and deallocate memory.

Callers

nothing calls this directly

Calls 4

pcmk_strerrorFunction · 0.85
send_snmp_trapFunction · 0.85
send_smtp_trapFunction · 0.85
send_custom_trapFunction · 0.85

Tested by

no test coverage detected