If you have Configured Proxy Settings for All Apps, setting the HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment variables with cf set-running-environment-variable-group; trying to setup a monitor document with App Metrics, setting webhook_url atribute, can fail with error message:
{"error":"Unexpected error occurrence","exception":"Check App Metrics Logs for more information"}
NO_PROXY env var, but only HTTP_PROXY and HTTPS_PROXY. This will cause a failure when the /monitor-documents endpoint tests webhook_url since it will fail accessing it through the proxy.HTTP_PROXY and/or HTTPS_PROXY to an empty value by running
cf target -o system -s app-metrics-v2 cf set-env appmetrics HTTP_PROXY ''