Run a Program Dialog
Note: This feature is available only in Spotlight on SQL Server Enterprise.
Configure Spotlight to run a program when an alarm is raised.
To open this dialog
-
Click Configure | Alarms Actions to open the Alarm Action Editor (page 1).
- Click New to create a new rule. This opens the Alarm Action Dialog (page 1).
- Give a meaningful name to the rule.
- Select the conditions under which the rule will run.
- Under actions select Run a program.
The Run a program dialog
Enter the command to run the program at the Command line prompt.
Note: You can include variable values specific to the alarm in the command line. See Alarms - Message Variables (page 1) for more information. For example you can echo tag values as follows.
Output to file: |
echo {{TAG_VALUE #tagname}} >>c:\output.txt |
Output to monitor: |
MSG /SERVER:<computer name> * "{{TAG_VALUE #tagname}}" |
Caution:
The behavior of the invoked program depends on the nature of the program.
- It is recommended that you do not invoke a UI-based program in response to the alarm, as the program will run as a service on a remote host.
- If the program that runs in response to an alarm is still executing when the alarm fires again, subsequent commands to run the program are ignored until that execution finishes.
- If you attempt to stop the Spotlight on SQL Server whilst a program or command line action is still executing, the Spotlight on SQL Server will wait until that program or command line action has ended before stopping.
|
Related Topics
Alarm Action Editor (page 1)
Alarm Action Dialog (page 1)