
|
Global Variables
Initialisation/Setting of a Global Variable
There are various possibilities to initialize/set Global variables in the boom agent:
<boom_agent_install_dir>/conf/global.props
Add the global variable in the following format: <varname>=<value> e.g. globalvar=1
Command line tool "boomsetvar"
During runtime any external application can call this command to set or change a Global Variable e.g. ./boomsetvar globalvar=1 globalvar2=2
Agent Action [GUI -> View Actions -> BOOM_AGENTS]: "Set Agent's Global Variable" sets the global variable from the boom server (as remote action). Global variables can be removed with the action "Remove Agent's Global Variable".
Where to use a Global Variable
All Global Variables can be used in any policies in the following way:
As "usual variable" like pre-defined variables e.g. <$globalvar>. It can be used to modify the message text or to set indication attributes.
Auto-activate or Auto-deactivatepolicies on the fly. A "user" can specify that the policy should be activated/deactivated only if a Global Variable is defined and its value matches with a specified pattern.
Supported Variables and pre-process Functions
Supported Variables
| Variable | Monitor Policies | Indication Policies | Description |
| <$NAME> | Yes(1) | Yes | The Name of the Monitor or Indication Policy name. Can be used in a "Call" field and will be resolved during the initialization. (1) - Java Monitors receive their name automatically. |
| <$AGENT_IP> | Yes | Yes | IP address of a boom Agent |
| <$AGENT_ID> | Yes | Yes | UUID of a boom Agent |
| <$AGENT_HOST> | Yes | Yes | hostname of a boom Agent |
| <$HOST>, <$MSG_NODE_NAME>, <$MSG_NODE> | Yes | Yes | Submitted node name or hostname of a boom Agent. |
| <$OBJECT>, <$MSG_OBJECT> | Yes | Yes | Object |
| <$SEVERITY>, <$MSG_SEV> | Yes | Yes | Severity (string) |
| <$APPLICATION>, <$MSG_APPL> | Yes(2) | Yes | Application (2) Used value that is specified in a Monitor Policy. |
| <$GROUP>, <$MSG_GRP> | Yes(3) | Yes | Group (3) Used value that is specified in a Monitor Policy. |
| <$ORIG_TEXT>, <$MSG_ORIG_TEXT> | No | Yes | Original submitted text. |
| <$OPTIONS> | Yes | Yes | Prints all optional variables that are submitted by a Monitor or parsed by an Indication Policy in a form: varName=value ... |
| <$THRESHOLD> | Yes | No | Threshold value of the matched condition. |
| <$VALUE> | Yes | No | Monitor value |
| <$other_optional_variables> | Yes | Yes | Any other optional variables submitted with Monitor value or messages. Also variables parsed in the message text by pattern specified in Indication Policy. |
Where to use
Usually all supported variables can be used in the "Text"/"Set Text", "Indication Key", "Close Mask",
"Auto Action" and "Operator Action" fields of a Policy as well as in Custom Attributes.
<$NAME> can be also used in a "Call" field as a notification to an executable or a script about the expected Monitor name.
All submitted optional variables can be used in a form: <$varname>
Supported pre-process Functions
| Function | Monitor Policies | Indication Policies | Description |
| EXEC | JAVA | NAGIN | JAVA | |
| <$BOOMMON_ONINIT(...)> | Yes | Yes | Yes | Yes | Functions that call external executable or script during the initialization of a Policy. Multiple entries allowed |
| <$BOOMMON_ONSTART(...)> | Yes | No | Yes | No | Functions that calls an external executable or script before the scheduled run. Multiple entries allowed |
| <$BOOMMON_OBJECTS("list of objects")> | Yes | No | Yes | No | A comma separated list of values that are used for repeatable call and override "Object" field of an Indication. Multiple entries are NOT allowed |
| <$BOOMMON_NODES("list of nodes")> | Yes | No | Yes | No | A comma separated list of values that are used for the repeatable call and override "Host" field of an indication. Multiple entries are NOT allowed |
|
|