Navigation: Working with EventSentry > Computer Groups > Variables |
Variables allow you to create more flexible configurations when objects such as actions share most but not all configuration values.
EventSentry supports runtime and custom variables. Runtime variables are determined during runtime (e.g. $HOSTNAME, $LOG, etc.) whereas custom variables are defined by you.
Variable names are case sensitive and always start with the dollar $ character.
Defining Custom Variables You define custom variables globally by right-clicking the "Groups" object and selecting "Define Variables". You will then be presented the Variables dialog:
Variables should be initialized with a default value which can then be overwritten on a per-group basis. Custom variables can be used in certain filter and action fields, please see "custom variables" for more information.
To change the default value of an already defined variable, double-click it. To remove already defined variables, select the variable and click "Delete".
Variable names will be referenced by prepending the dollar sign ($), as used in some programming languages. For example, to use the variable SMTPSERVER showed above in the SMTP Server field of a SMTP action, you will need to write $SMTPSERVER.
Overriding Default Values You can override the default values of variable on a per-group or on a per-computer basis. In the example above, you can easily specify different SMTP servers for different groups, without having to create multiple SMTP actions.
To override variables, right-click the group or computer for which you would like to override the variable and select "Set Variable(s)". You will be presented with a similar dialog, though slightly different:
As you can see, the Add and Delete buttons are not present anymore as you can only define variables when right-clicking the "Groups" object. In a particular group, you can only change (=override) the values.
In the screenshot above the default value for the SMTPSERVER variable has been changed to mail2.netikus.net. The COMPANY variable however has not been changed, as indicated by the X in the Inherited column.
To override a variable double-click the name and enter a new variable value. To reset overridden variables and reassign their default values to them again, simply specify an empty value for the variable as shown below:
|