Previous page

Next page

Locate page in Contents

Print this page

subscribe_alert

Summary:

Subscribes to alert notifications via e-mail.

Request specification:

Name

Min/Max

Type

Description

subscribe_alert

 

 

 

{

 

 

 

eid_list

0..1

eid_listType

Server IDs. If omitted, subscribes to receive alert notifications for all known servers.

email

1..1

string

The e-mail address to send the notifications to.

name

0..1

string

The name of the e-mail template. The template is configured using the mailer interface. If not specified, the default template for the specific alert type will be used.

[

0..1

 

This section specifies the alert type. If the section is omitted, subscribes to QoS alerts by default.

services

1..1

 

Get alerts on changing service status.

{

 

 

 

service

1..[]

string

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

Please send us your feedback on this help page