Note: Example Three extends the alert policy in Examples One and Two.
You want to send an email message to the manager of the data center when the severity of an alert changes, in addition to the buzzer that sounds when the alert is raised (which you configured in Example One). The following message is what you want the email to say; it identifies the alert and alert source in this situation:
object-class : object-name : Alert alert-id severity is now sev.
object-class : object-name : Alert alert-id severity is now sev.
where
object-class
is the value of the CLASS attribute from the alert event report.
object-name
is the value of the INSTANCE attribute from the alert event report.
alert-id
is the value of the ALERTID attribute from the alert event report.
sev
is the value of the SEV attribute from the alert event report.
To implement this change
Write a script that refers to the environment variables SP_CLASS, SP_INSTANCE, SP_ALERTID, and SP_SEV to substitute these attribute values into the message. The script also includes the command to start the email message and specifies the addressee. For an example script, see data-folder\alarm-scripts\Mail_Alert.vbs on an Operations Sentinel server.
Save the script in a file with read and execute permission.
Under the Alert Policies node, select the alert policy you created in Example One.
Add a command template to this alert policy.
Configure the Command property for the command template. You must specify the name of the script as the command. The command string you specified must include the full path to the script, unless you put the script into the data-folder\alarm-scripts folder on the Operations Sentinel server.
Add an action to the action list you created in Example One that refers to the new command template. In the new action, select Raise as the Action Event property value.
Save the updated alert policy.
Reactivate the updated alert policy.