Answer
Notification Policies
Many of the solutions that work with Notification Server come with Notification Policies. These policies let the Notification Server perform a variety of actions when defined conditions occur. Notification Policies can be set on something as simple as a single process starting on a computer or on more complex scenarios, such as multiple processes across a wide range of computers. Automated responses include sending of e-mail, running corrective commands and scripts, automatically generating a report and e-mailing the URL of the report, or creating and editing Alert Manager work items.
With Notification Policies it is possible to specify a condition to monitor and, if required, take subsequent action after initiating the Notification Policy’s schedule. Each solution that defines a Notification Policy specifies its own criteria for the type of condition that leads to the action being initiated.
Example:
Item | Description |
Enable | Select to enable the Notification Policy. |
Name | Notification Policy name. |
Description | Notification Policy description. |
Source | Shows the source (Query or Report) for the policy. If Report, click hyperlink to select report. If Query, click Create Query, or if there is an existing query it can be edited by clicking on the Edit Query link. This opens Step 6 of the Query Builder Wizard to edit the SQL. Edit the parameters used in the query by clicking on the Edit Parameters link. |
Schedule | Drop-down list for specifying the schedule for this Notification Policy to run. |
Automated Actions | Lists any existing actions. |
Add Action Type | Drop-down list for specifying the type of Automated Action to be created. |
Add | Displays a dialog to create an automated action based on your selection in the Add action type list. |
Test Notification Policy | Test the Notification Policy. Changes are saved when this button is clicked. |
Apply | Click to save changes. |
Cancel | Click to discard changes. |
Automated Actions
An Automated Action specifies the action to take when a Notification Policy runs. Each Notification Policy can have multiple Automated Actions. The Notification Server provides three types of Automated Actions by default.
E-mail Automated Action Page
This page is for configuring the E-mail automated action. Specify the creation of an e-mail which can be sent to the default Notification Server e-mail account or a user-specified account. Various replacement strings can be specified in the e-mail message to report system environment variables as well as details about the condition monitored. The choice can be made to execute this action once for the entire report or once per each row in the report.
If the need is to send the e-mail to multiple recipients, separate the e-mail addresses with a ; (semi-colon) character. Each e-mail address needs to be a valid SMTP address. The message will be sent to the SMTP server that is defined in the Notification Server e-mail configuration settings.
To access this page
1. In the Altiris Console, select the Tasks tab.
2. In the left pane, click solution name > Notification Policies > policy name.
3. In the content pane, for Add action Type, select E-Mail Automated Action.
4. In the content pane, click Add.
Item | Description |
Name | Name of the action. |
Description | Description of the action. |
Enabled | Select one of the following:
|
To Address | The e-mail address to which Notification Server sends the link of the report every time the action is received. |
Subject | E-mail subject. |
Message | E-mail message. |
OK | Click to save changes. |
Cancel | Click to discard changes. |
Note: Action parameters can be inserted into the To Address, Subject, and Message text boxes of the Automated Action dialog. See Action Parameters.
Launch Automated Action Page
This page lets you specify a command to execute. You can choose to execute this action once for the entire report or once per each row in the report.
Any process can be started with various command-line arguments that are based upon the available fields for that solution. To execute multiple commands, put them in a batch file and run the batch file as the command to be launched.
To access this page
1. In the Altiris Console, select the Tasks tab.
2. In the left pane, click solution name > Notification Policies > policy name.
3. In the content pane, for Action Type, select Launch Automated Action.
4. In the content pane, click Add.
Item | Description |
Name | Name of the action. |
Description | Description of the action. |
Enabled | Select the checkbox to enable the action. |
Execute | Select one of the following: |
Application | Enter the name of the application you wish to execute. |
OK | Click to save changes. |
Cancel | Click to discard changes. |
Note: Action parameters can be inserted into the Application text box of the Automated Action dialog. See Action Parameters.
Report Automated Action Page
This page lets you specify the creation of a report. This Automated Action lets you do the following:
Item | Description |
Name | Name of the action. |
Description | Description of the action. |
Enabled | Select the checkbox to enable the action. |
Select a Report | Click the hyperlink and select the report you wish to be generated whenever an action is received. |
Substitute report’s parameter values with Policy’s parameter values | Select the checkbox to use the parameter values of the Notification Policy rather than the parameter values of the existing report. |
Enable e-mail sending | Name of the action. |
To address | The e-mail address to which Notification Server sends the link of the report every time the action is received. |
Subject | The subject line of the e-mail. |
OK | Click the save changes. |
Cancel | Click to discard changes |
Note: Action parameters can be inserted into the To Address and Subject text boxes of the Automated Action dialog. See Action Parameters.
Using an Existing Notification Policy
To use an existing notification policy
1. In the Altiris Console, click the Tasks tab.
2. In the left pane, click solution name > Notification Policies > policy name.
3. In the content pane, select the Enabled checkbox.
4. Select the checkboxes of the predefined Automated Actions you want to use.
If you need to edit an Automated Action, click on the pencil icon next to the relevant action and make the necessary changes.
Create new automated actions as needed. See Creating an Automated Action.
Creating a Notification Policy
To create a notification policy
1. In the Altiris Console, click the Tasks tab.
2. In the left pane, right-click solution name and select New Notification Policy.
3. Double-click on the New Notification Policy to configure.
4. In the content pane, enter a name and description for the new policy and select the Enabled checkbox.
5. Select the Source for the policy.
6. Select the Schedule for the policy.
7. Click Add.
8. Create new automated actions as needed.
Creating an Automated Action
An automated action specifies the action to take when a Notification Policy runs. For information see Automated Actions.
To create an Automated Action
1. In the Altiris Console, click the Tasks tab.
2. In the left pane under the desired solution, select the Notification Policy for which you want to create an Automated Action.
3. In the content pane, select the Action Type from the drop-down list under Actions. For information on action types, see Automated Actions.
4. Click Add.
5. Enter a name and description for the new action.
6. Depending on the type of action you are creating, the properties will be different. For details on each action type, see E-mail Automated Action Page, Launch Automated Action Page, and Report Automated Action Page.
Editing an Automated Action
To edit an Automated Action
1. In the Altiris Console, click the Tasks tab.
2. In the left pane under the desired solution, select the Notification Policy for which you want to edit an Automated Action.
3. In the content pane, edit the details of the Automated Action and click Apply.
4. Depending on the type of action you are editing, the properties will be different. For details on each action type, see E-mail Automated Action Page, Launch Automated Action Page, and Report Automated Action Page.
Note: When you edit an Automated Action the list of Predefined Action Parameters can be viewed in the Automated Action dialog. This list details the Name, Type, and Parameter Argument for each action parameter. See Action Parameters.
Action Parameters
Default Notification Policies have predefined action parameters, in XML format, in the policy action parameters section. To view the policy action parameters of any Notification Policy, right-click the required Notification Policy in the left pane and select View as XML in the right-click menu. Define your own parameters when you create a new Notification Policy.
Type | Description |
DataSet | DataSet field value. |
Environment | Environment variable value. |
Global | Well-known value (currently Date and Time). |
Registry | Registry value. |
MessageXml | Source message value (through an XPath query). |
ItemProperty | Target item property value (through reflection). |
To create or edit an Action Parameter in the XML file
1. In the Altiris Console, click the Tasks tab.
2. In the left pane under the desired solution, select the Notification Policy for which you want to create an Action Parameter.
3. Right-click the Notification Policy and select Export in the right-click menu.
4. Save the file in an appropriate location.
5. Edit and save the XML file as required.
6. In the left pane, right-click the folder location for the edited XML and select Import in the right-click menu.
7. Browse to your saved XML file and click Open.
To insert an Action Parameter into an Automated Action
1. In the Altiris Console, click the Tasks tab.
2. In the left pane under the desired solution, select the Notification Policy and Automated Action for which you want to insert an Action Parameter.
3. In the content pane, click the Edit icon of the required Automated Action.
4. Depending on the type of action you are editing, the properties will be different. For details on inserting Action Parameters directly into each action type, see E-mail Automated Action Page, Launch Automated Action Page, and Report Automated Action Page.
5. To enter the Action Parameter in the required location it must be in the following format: ‘%Parametername%’.
Sample Scenario for Action Parameters
In this sample the user has created a Notification Policy that notifies by e-mail and lists all Altiris solutions that are no longer under license. It will extract the data from the name column of the Notification Policy’s query result set.
To receive an e-mail notification that has the solution name in the Subject of the e-mail, the parameter required for the policy is the Solution name. After you create the policy and add the E-mail Automated Action you need to create the action parameter. Export the XML and edit as follows:
- <policyActionParameters>
<policyActionParameter name="Solution" sourceType="DataSet" sourceField="Name" />
</policyActionParameters>
Next, save the XML file and import it back into the required folder on the left pane. This predefined parameter will be listed in the Automated Action dialog when you edit the Automated Action for this Notification Policy.
Type “%Solution%” to insert this parameter in the Subject text box of the e-mail Automated Action. Now, when the e-mail is automatically sent with results of the query the solution name will appear as the subject of the e-mail.
Note: This information was obtained from the Notification Server 6.0 SP3 Help Documentation.