#include "model.h"
#include "execphandler.h"
Defines | |
| #define | AWNOTIFY "awnotify.sh" |
| #define | JULIANS_PER_MIN (0.04166667 / 60.0) |
Functions | |
| int32_t | aw_model_alert_user_slist (aw_model_t *model, const aw_model_userhandle_t *handle, u_int32_t user_id, u_int32_t limit, aw_model_alert_slisting_t *alert_listing) |
| Init itertator to fill listing with data from alert table for alerts NOT acknowledged. Call user_slisting->iter.next() until <= 0 . | |
| int32_t | aw_model_escalate_alert (aw_model_t *model, const aw_model_userhandle_t *handle) |
| If an alert has not been acknowlege with specfied time period then alert next user in group. | |
| int32_t | aw_model_interface_alert (aw_model_t *model, const aw_model_userhandle_t *handle, u_int32_t interface_id, u_int32_t up, aw_timestamp_t tstamp) |
| Generate an alert for an ia event. | |
| int32_t | aw_model_message_alert (aw_model_t *model, const aw_model_userhandle_t *handle, const byte_t *nodename, const byte_t *msg, aw_timestamp_t tstamp) |
| Generate an alert for an nm event. | |
| int32_t | aw_model_service_alert (aw_model_t *model, const aw_model_userhandle_t *handle, u_int32_t service_id, u_int32_t up, aw_timestamp_t tstamp) |
| Generate an alert for an sa event. | |
|
|
Alerts are generated for specific users based on the association between nodes and user groups held in aw_node2group. For each insert in an event table, a check is done to see if the node associated with the event has any user groups related to it via aw_node2group, if so, the user with the lowest priorityorder is chosen and a row is inserted into the aw_alert table. If that user has a notifymode, then a message is sent via that mode. Should the alert NOT be acknowledged in a specific period of time, then the user with the next highest priorityorder in the associated group is chosen and another row is inserted into the aw_alert table. These are tied together by the aid, which is the id for the inital row inserted. |
|
|
|
|
||||||||||||||||||||||||
|
Init itertator to fill listing with data from alert table for alerts NOT acknowledged. Call user_slisting->iter.next() until <= 0 . aw_model_alert_user_slist
|
|
||||||||||||
|
If an alert has not been acknowlege with specfied time period then alert next user in group. aw_model_escalate_alert
|
|
||||||||||||||||||||||||
|
Generate an alert for an ia event. aw_model_interface_alert
|
|
||||||||||||||||||||||||
|
Generate an alert for an nm event. aw_model_message_alert
|
|
||||||||||||||||||||||||
|
Generate an alert for an sa event. aw_model_service_alert
|