uberAgent

Using uberAgent® With a Proxy

uberAgent uses libcurl to send data when using HTTP or HTTPS as protocol. libcurl ignores common per-system or per-user proxy settings. Customers who want to use uberAgent with a proxy, can choose between two options:

Configuring a Proxy via the Configuration

Starting with uberAgent 8.0, proxy usage can be configured within the uberAgent.conf file. You can define explicit destination-to-proxy mappings and store proxy authentication details, allowing uberAgent to authenticate with a proxy when required.

Adding Destination-To-Proxy Mappings

Under the [Proxy_List] stanza, customers can define network targets for which uberAgent should use a proxy. Targets are defined using URL_REGEX syntax that is matched against the destination hosts. To specify a proxy server, add an equals sign (=) followed by the proxy’s fully qualified domain name or IP address. Working with multiple proxy servers is supported. Explicit mappings in [Proxy_List] always override system variable-based proxy resolution. Please review the following example:

[Proxy_List]
api\.cloud\.com = proxy1.customer.com
api-us\.cloud\.com = proxy2.customer.com
backend\.customer\.com = proxy3.customer.com
<!--NeedCopy-->

Note:

If you want to route all of uberAgent’s outgoing HTTP communication through a proxy, use a URL_REGEX wildcard in the [Proxy_List] stanza, for example .* = proxy1.customer.com . uberAgent processes the entries in this list in order; the first matching definition is used for the configured destination. Therefore, place the wildcard definition at the end of the stanza so that specific definitions are matched first.

Proxy Authentication

If a proxy requires authentication, configure the credentials (e.g., user and password) under the [Proxy_Auth] stanza. uberAgent supports reading the credentials as plain text, obfuscated via uAEncrypt, and from the operating system’s credential store:

[Proxy_Auth]
proxy1.customer.com = user:password
proxy2.customer.com = %FwAlABAAJQBPABwABwBFABsADgAEACYANAA=
proxy3.customer.com = ###UA_CREDENTIAL_uAProxyAuthentication###
<!--NeedCopy-->

Note:

When a connection uses a proxy defined in [Proxy_List], uberAgent searches for credentials under [Proxy_Auth] for this host and uses them if present. When no credentials are configured, the proxy is used without authentication.

Configuring a Proxy via System Variables

To enable uberAgent to process proxy information that is stored in system variables, add the following to your uberAgent.conf. Please note that this value is set to disabled by default.

[Proxy]
HonorEnvironmentProxy = true
<!--NeedCopy-->

uberAgent can read the values of the following environment variables to retrieve the proxy configuration.

  • http_proxy
  • https_proxy

Customers who have a proxy configured but don’t want to route the traffic from uberAgent to e.g., Splunk through it, must set the environment variable no_proxy to the Splunk server name.

More information is available in the libcurl documentation. Note that this approach does not support proxy authentication.

Setting Proxy Variables Specifically for uberAgent

Windows

On Windows, you can configure the above mentioned environment variables specifically for the uberAgent service. This means that the variables are only used by uberAgent. To do so, proceed as follows.

  • Open regedit.exe and browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\uberAgentSvc.
  • Create a new multi-string-value (REG_MULTI_SZ) named Environment.
  • Enter the proxy variables with their corresponding values in the following format http_proxy=http://proxy.citrix.com:port. Use a line break, if you’re configuring multiple variables.
  • After adding the variables, restart the uberAgent service in order to apply the new settings.

macOS

On macOS, you can configure the environment variables specifically for uberAgent using the launch daemon. To do so, proceed as follows.

  • Edit the uberAgent launch daemon plist file at /Library/LaunchDaemons/com.vastlimits.uberagent.plist.
  • Add an EnvironmentVariables dictionary within the main dict element with the proxy variables as key-value pairs:
<key>EnvironmentVariables</key>
<dict>
    <key>http_proxy</key>
    <string>http://proxy.citrix.com:port</string>
    <key>https_proxy</key>
    <string>http://proxy.citrix.com:port</string>
</dict>
<!--NeedCopy-->
  • Save the file and reload the launch daemon by running sudo launchctl unload /Library/LaunchDaemons/com.vastlimits.uberagent.plist followed by sudo launchctl load /Library/LaunchDaemons/com.vastlimits.uberagent.plist.

Linux

On Linux, configure the proxy environment variables for uberAgent via a systemd service override. This ensures the variables are only used by the uberAgent service.

  • Create a systemd drop-in for the service by running sudo systemctl edit uberAgent.
  • Add the following to the editor and save:
[Service]
Environment="http_proxy=http://proxy.citrix.com:port"
Environment="https_proxy=http://proxy.citrix.com:port"
<!--NeedCopy-->
  • Save and exit the editor. This automatically applies the configuration. Then restart the service:
sudo systemctl restart uberAgent
<!--NeedCopy-->

Limitations

uberAgent can apply the proxy settings to all outbound HTTP traffic except when collecting the following metrics:

  • Citrix Site metrics (typically collected from a local Citrix Delivery Controller).
  • NetScaler metrics (typically collected from a local Citrix NetScaler).
  • Citrix License Server metrics (typically collected from a local Citrix License Server).
Using uberAgent® With a Proxy