Set up a proxy for private synthetic monitoring

ActiveGate version 1.177

  • To set a proxy for communication with the tested resource, edit the custom.properties file and set properties in the [synthetic] section.
  • To set a proxy only for internal communication with Dynatrace server, see Setting up proxy for ActiveGate.
  • To set the same proxy for both a tested resource and Dynatrace server, set properties in the [http.client] section.

Proxy configuration properties

You can use the following properties when configuring a proxy for your synthetic-enabled ActiveGate.

Property Default value Description [synthetic] [http.client]
proxy-server unset Proxy server address yes yes
proxy-port unset Proxy port (numeric). Optional. If left empty, the default 8080 port is used yes yes
proxy-user unset Proxy user name (optional) yes yes
proxy-password unset Proxy password (optional).
The password provided in the proxy-password property
is obfuscated following ActiveGate restart and the obfuscated password
is stored in the proxy-password-encr property.
yes yes
proxy-off unset Disable proxy communication between ActiveGate and tested resource yes no
proxy-non-proxy-hosts unset Do not use proxy when communicating with these hosts. To include a number of hosts, separate them with the | characters. You can also use an asterisk * to replace any string. For example: proxy-non-proxy-hosts=*gdansk.dynatrace.com|my.corp.org yes no

Proxy connection scenarios

Have a look at the possible scenarios for your proxy configuration.

I only want to proxy communication to Dynatrace server

[http.client]
proxy-server=<proxy>
proxy-port=8080
proxy-user=username
proxy-password=password

[synthetic]
proxy-off=true

I want to proxy communication to both, Dynatrace server and the tested resource

[http.client]
proxy-server=<proxy>
proxy-port=8080
proxy-user=username
proxy-password=password

I want to use different proxies for Dynatrace server and the tested resources

To Dynatrace server:

[http.client]
proxy-server=<proxy>
proxy-port=8080
proxy-user=username
proxy-password=password

To the tested resource:

[synthetic]
proxy-server=<proxy between AG and tested resource>
proxy-port=9090
proxy-user=username_two
proxy-password=password_two

I want to proxy communication to the tested resource and/or to Amazon S3

The synthetic-enabled ActiveGate needs an access to the Amazon S3 service to upload and access private browser monitor screenshots.

[synthetic]
proxy-server=<proxy between AG and tested resource>
proxy-port=8080
proxy-user=username
proxy-password=password

See also Proxy Auto-Configuration (PAC) files

I only want to proxy communication for synthetic but connect directly to some other resources

[synthetic]
proxy-server=<proxy between AG and tested resource>
proxy-port=8080
proxy-user=username
proxy-password=password
proxy-non-proxy-hosts=my.corp.org|*.gdansk.dynatrace.com

Proxy Auto-Configuration (PAC) files

ActiveGate 1.183+
You can use Proxy Auto-Configuration (PAC) files to handle complex proxy configuration for private browser monitors.

What is a PAC file?

A Proxy Auto-Configuration (PAC) file is a JavaScript function that determines whether web browser requests (HTTP, HTTPS, and FTP) go directly to the destination or are forwarded to a web proxy server (from developer.mozilla.org).

How to provide a PAC file to your browser monitors

Use the script mode for single-URL browser monitors and browser clickpaths.

  • For new monitors, switch from Visual mode to Script mode.
  • For existing monitors, select Edit to open settings and select Recorded clickpath for clickpaths. Then switch to Script mode. For existing single-URL browser monitors, select Monitor script.

You’ll need to add the following in the configuration object of the JSON file:

"proxy": {
"pacUrl": "https://www.example.com/test.pac"
}

where pacUrl points to your hosted PAC file.

PAC file script definition

For more information on script mode, see Script mode for browser monitor configuration.

Important to know

  • PAC file configuration is only considered for private synthetic locations, not public locations.
  • PAC file configuration applies only to the monitor you configure.
  • If a PAC file is specified, it overrides the proxy settings specified at the ActiveGate level for communication with the tested resource, that is the properties in the [synthetic] section.
  • The PAC file must be served via HTTP/S.