Application Center installs several actions that can be associated with any monitors that you enable for the cluster or a cluster member. Figure 9.19 shows the default Actions in the console tree. The Actions view in the details pane displays the items that are associated with a selected action in the console tree; including the name of the monitor, its type, and the condition (threshold) that triggers the action. In the example illustrated in Figure 9.19, the action is Email Administrator, which is associated with several data collectors.
Figure 9.19 The monitors associated with the Email Administrator action
Table 9.4 describes the default actions that Application Center provides.
NOTE
All the default actions are scheduled as follows. Days to run actions: Every day, Times to run actions: All day.
Table 9.4 Application Center Default Actions
Name | Type of action | Description |
---|---|---|
Bring Server Online | Command Line | Uses the command-line tool with parameters to set the mem- ber back online when the monitors in the Offline/Online folder are good. |
Email Administrator | Sends an e-mail message to the administrator with the specified message. | |
Log to offline.log | Text Log | Logs a message to a text file each time the online and offline events are received. |
Log to websitefailures.log | Text Log | Logs HTTP monitor failures to a text log with all of the properties that are returned from the request. |
Take Server Offline | Command Line | Uses the command-line tool with parameters to set the member offline when a monitor in the Offline/ Online folder becomes Critical. |
You can modify any of the actions shown in Table 9.4 by opening the properties dialog box for the action (right-click the action name) and selecting the configuration information that you want to change.
Use the following procedure to create a new action:
Right-click the Actions node; on the pop-up menu, point to New; and then choose one of the following types of actions:
Command Line Action
E-mail Action
Text Log Action
Windows Event Log Action
Script Action
After you select the type of action that you want to use, the actionname Properties dialog box appears and you can configure the action.
Let's examine each of these action types, focusing on how the Details tab is configured for each action.
NOTE
The General and Schedule tabs are common to all actions and are configured as follows:
- General—Provide the action name and a descriptive comment.
- Schedule—Set to run all day, every day, by default. Change this by clearing the check box for specific days, specifying a period to include or a period to exclude. A good use for include/exclude is to specify different e-mail addresses to send alerts to during the week and on weekends.
Command Line Action Properties Dialog Box: Details Tab
You use this tab to specify the file name, path, command line, and parameters of the program that you want to run. The program runs when the threshold for the associated data collector is crossed.
Insertion strings
The following set of insertion strings is supported and available for the actions.
- Error Code (from WMI)
- Error Description (from WMI)
- # of Instances Collected
- Embedded Collected Instance
- GUID
- Instance Name
- Formatted Local Time
- Message
- Name
- Parent GUID
- State
- Status GUID
- System Name
- GMT Time
You can also reference a property from the data collector by using the Embedded Collected Instance insertion string to specify the property to display.
NOTE
The program will not be displayed in a Terminal Services window.
E-mail Action Properties Dialog Box: Details Tab
Use this tab to identify the SMTP server, e-mail recipients, and the e-mail message to send when the threshold for the associated data collector is crossed.
Health Monitor Alert on %EmbeddedStatusEvent.SystemName% at
%EmbeddedStatusEvent.LocalTimeFormatted%%EmbeddedStatusEvent.Message%
This message displays the server name, the time when the alert was fired, and the message property from the data collector or data group.
Text Log Action Properties Dialog Box: Details Tab
Use this tab to specify the text to write to the selected log file. The text is written to this log file when the associated data collector is crossed.
NOTE
Please note the following points regarding log files:
- A log file is created automatically by using the name you specify if the file doesn't already exist.
- By default, new information is appended to a log file.
- After the log file reaches its size limit, a new file is created automatically.
Windows Event Log Action Properties Dialog Box: Details Tab
Use this tab to specify a Windows event that will be generated and automatically written to the Windows Event Log when a data collector's threshold is crossed.
Event type—Identify the type of Windows event notification to generate. The following options are provided for identify event severity:
Script Action Properties Dialog Box: Details Tab
Use this tab to specify the name and path of the script that you want to run when a collector's threshold is crossed.
NOTE
You can edit the file you select by clicking the Edit button. This action opens the file in the default text editor, Microsoft Notepad.
Details Tab Configuration Examples
Table 9.5 uses the default actions to illustrate how different types of actions are configured.
Table 9.5 Examples of an actionname Properties Dialog Box Configuration for the Details Tab
Action | Configuration |
---|---|
Bring Server Online | Filename: Ac.exe Command line: ac.exe loadbalance /online/memberonly Process timeout: 120 seconds |
Email Administrator | SMTP server: Null From: HealthMonitor, To: Null Subject: %EmbeddedStatusEvent.Name% Alert on %EmbeddedStatusEvent.SystemName% Message: Health Monitor Alert on%EmbeddedStatusEvent.SystemName% at %EmbeddedStatusEvent.LocalTimeFormatted% %EmbeddedStatusEvent.Message% |
Log to offline.log | File: Offline.log Log Size: 1048576 (Bytes) Text: %EmbeddedStatusEvent.SystemName%%EmbeddedStatusEvent.LocalTimeFormatted% %EmbeddedStatusEvent.Message% Use ASCII text |