Setting the Gateway Hostname as a Variable in Geneos
Problem Copied
In Geneos, users may need to reference the hostname of the Gateway server as a variable, typically for use in Sampler Toolkit scripts or conditional configuration logic. However, there is no built-in ${gatewayHostname} macros available like ${gatewayName}
Solution Copied
The Gateway hostname must be manually defined as a variable, as it isn’t available by default.
Example:
GSE > Environments > Geneos
Set the Env on your sampler where the toolkit is used:
Toolkit plugin setup:
Output:
In Rules: If you’ve defined a variable containing the hostname, you can access it when creating a rule. In the rule setup window, right-click in the blank area, select Variables, and you should see your defined variable listed for use in the expression.
Note: The variables can be defined in managed entities, managed entity groups, types, environments, and operating environment: https://docs.itrsgroup.com/docs/geneos/current/processing/gateway-administration/gateway_user_variables_and_environments/index.html#define-variables
Related article(s) Copied
- https://docs.itrsgroup.com/docs/geneos/current/collection/toolkit-plugin/index.html#Heading-overview
- docs.itrsgroup.com/docs/geneos/current/processing/gateway-administration/gateway_user_variables_and_environments/index.html#environments–environment–var–macro