Global variables
General
Global variables is a special named variables you can assign any value. In properties of checks and alerts you can refer variable value by its name.
The way it works
Suppose you need to specify a group of administrators receiving e-mail notifications about problems.
- Open the options window (the Tools/Options... menu item)
- Select General/Variables in the list. Load Variables From File option can be used to specify the file to save the values you entered here. If there is no such a file on the disk, it will
be created.
- Click the Add button and specify Administrators as the variable name in the Add new variable window.
- Specify administrators e-mail addresses, separated by comma, as the value of the variable.
- Close the options window.
Global variable Administrators is created.
Using this variable:
- Create new check.
- Select Alerts page.
- Add new Send e-mail alert.
- Click View Environment button. New window with all available variables will be opened.
- Activate Global tab in the Alert's Environment window. In the list you can see the created Administrators variable and its value.
- Select Administrators variable and click the Copy to Clipboard button in the upper-left corner.
- Select edit control To and press the key combination Ctrl+C. The text %Administrators% should be pasted from the clipboard.
The task is done.
Additional notes
Variables can be embedded; the maximum level of embedding is 5. Variable values can contain the names of check properties and Windows environment variables.
Check variables support topic for complete information on checks and alerts supporting this functinality.
See Also
Alert's Environment Window,
System Environment Variables,
Options: Variables,
Variables support