How to configure proxy for PMM Server?

We have a dockerized PMM3 installation in a partly locked infra: internet can be reached through proxy.

There’s a note about this here: Network and firewall requirements - Percona Monitoring and Management

configure appropriate proxy settings if PMM Server needs to access external services through a proxy

My questions:

  • how to configure that?
  • is proxy configuration is needed also for Watchtower? (how?)

Actual start command:

docker run --detach --restart always \
  --publish 443:8443 \
  --env PMM_PUBLIC_ADDRESS="${_pmm_public_address}" \
  --env PMM_WATCHTOWER_HOST=http://${_watchtower_container}:8080 \
  --env PMM_WATCHTOWER_TOKEN="${_watchtower_token}" \
  --env GF_SMTP_ENABLED=1 \
  --env GF_SMTP_HOST="${_pmm_gf_smtp_host}" \
  --env GF_SMTP_FROM_NAME="${_pmm_gf_smtp_from_name}" \
  --env GF_SMTP_FROM_ADDRESS="${_pmm_gf_smtp_from_address}" \
  --env GF_SMTP_SKIP_VERIFY=true \
  --volume ${_pmm_data_dir}:/srv \
  --volume ${_pmm_ldap_config}:/etc/grafana/ldap.toml \
  --network=${_pmm_network} \
  --name ${_pmm_server_container} \
  ${_pmm_container_image}

Hello @bentse,
The environment variables HTTP_PROXY and HTTPS_PROXY are quite standard in linux world. Try setting those when you launch the container.

That worked well. Formerly (before opening this thread) I tried, but I just came aware of our squid proxy settings today: it denied connections towards check.percona.com.

Now it’s fixed, upgrades are checked on the PMM Server page.

Other improvement is that the dashboards are loading faster now (I think PMM Server tries to connect to percona.com, but before the fix it ran into timeout → the client user had to wait this timeout before getting any data/graph…).

Final command:

docker run --detach --restart always \
  --publish 443:8443 \
  --env PMM_PUBLIC_ADDRESS="${_pmm_public_address}" \
  --env PMM_WATCHTOWER_HOST=http://${_watchtower_container}:8080 \
  --env PMM_WATCHTOWER_TOKEN="${_watchtower_token}" \
  --env GF_SMTP_ENABLED=1 \
  --env GF_SMTP_HOST="${_pmm_gf_smtp_host}" \
  --env GF_SMTP_FROM_NAME="${_pmm_gf_smtp_from_name}" \
  --env GF_SMTP_FROM_ADDRESS="${_pmm_gf_smtp_from_address}" \
  --env GF_SMTP_SKIP_VERIFY=true \
  --env HTTP_PROXY="${_http_proxy}" \
  --env HTTPS_PROXY="${_https_proxy}" \
  --volume ${_pmm_data_dir}:/srv \
  --volume ${_pmm_ldap_config}:/etc/grafana/ldap.toml \
  --network=${_pmm_network} \
  --name ${_pmm_server_container} \
  ${_pmm_container_image}

All-in-all adding these parameters to the documentation wouldn’t harm anything (underlined addition): Network and firewall requirements - Percona Monitoring and Management

configure appropriate proxy settings via HTTP_PROXY and HTTPS_PROXY variables if PMM Server needs to access external services through a proxy