Summary:
Subscribes to alert notifications via e-mail.
Request specification:
Name |
Min/Max |
Type |
Description |
|
|
|
|
|
|
|
|
|
|
Server IDs. If omitted, subscribes to receive alert notifications for all known servers. |
|
|
|
|
The e-mail address to send the notifications to. |
|
|
|
The name of the e-mail template. The template is configured using the |
|
|
|
This section specifies the alert type. If the section is omitted, subscribes to QoS alerts by default. |
|
|
|
Get alerts on changing service status. |
|
|
|
|
|
|
|
Service name. |
|
|
|
|
|
|
|
|
|
|
|
|
Returns:
OK/Error.
Description:
To prevent alert (mail) flooding you can set mute_alert_period
configuration parameter in the alertm
section of Agent configuration. Negative value means that subscription stops after the first alert and you have to re-subscribe. Zero value turns off flooding control, i.e. all alerts will be delivered. Positive value means that subsequent alerts for the same servers will be delivered at once in case of period expiration or if alert level is greater than the one of the previous alert.
To set a default e-mail address, use the support_email
parameter in the alertm
section of Agent configuration.
To receive alert notifications directly (not through e-mail), use the system/subscribe
call together with resource_alert
event.
To unsubscribe from this service, use the unsubscribe_alert
call.
Example:
Input
<packet>
<target>alertm</target>
<data>
<alertm>
<subscribe_alert>
<eid_list
>
<eid>ccc794ad-cc5d-49f2-8d84-6631263c81be</eid>
</eid_list>
<email>johndoe@mail.com</email>
<services>
<service>crond</service>
</services>
</subscribe_alert>
</alertm>
</data>
</packet>
Output
<packet>
<origin>alertm</origin>
<data>
<alertm>
<ok/>
</alertm>
</data>
</packet>
Incoming email
From: support@tc6.com
To: johndoe@mail.com
Subject: Service crond is stopped on ccc794ad-cc5d-49f2-8d84-6631263c81be at 2006-05-06T19:04:01+0000
Service crond changed status to stopped on ccc794ad-cc5d-49f2-8d84-6631263c81be at 2006-05-06T19:04:01+0000