(Click to open topic with navigation)
Mail triggers can be attached to nodes, jobs, reservations, and the scheduler. The recipient of the email depends on the object to which the trigger is attached. To select different recipient(s) and add flexibility to formatting, send email via a script using an exec trigger.
To use a trigger to send email
Object | Recipient |
---|---|
Node | The primary user (the first user listed in ADMINCFG[1], typically root) |
Job | The job's owner |
Reservation | The primary user |
Scheduler | The primary user |
Variable | Description |
---|---|
$OID | Name of the object to which the trigger is attached |
$OTYPE | The type of object to which the trigger is attached |
$TIME | Time the trigger launched |
$HOSTLIST | Host list of the trigger's object (jobs and reservations) |
$OWNER | Owner of the trigger's object (jobs and reservations) |
$USER | User (jobs and reservations) |
The variable is replaced with the information described above. For example, the following trigger is configured on all nodes:
NODECFG[DEFAULT] EType=fail,AType=mail,Action="node $OID failed at $TIME"
When, for example, node node03 fails, an email is sent to the primary user with a message with the subject line "node node03 started on Sat Aug 18 11:42:00".