# Synthetic screenshots: Information and troubleshooting

**URL:** <https://community.dynatrace.com/t/synthetic-screenshots-information-and-troubleshooting/41539>\
**Category:** Troubleshooting\
**Tags:** public-synthetic-locations, browser-monitors, synthetic-monitoring, private-synthetic-locations\
**Created:** [September 6, 2023, 3:15pm UTC](https://community.dynatrace.com/t/synthetic-screenshots-information-and-troubleshooting/41539 "2023-09-06T15:15:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dyna\_Patrick](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@Dyna\_Patrick](https://community.dynatrace.com/u/Dyna_Patrick)\
**Post date:** [September 6, 2023, 3:15pm UTC](https://community.dynatrace.com/t/synthetic-screenshots-information-and-troubleshooting/41539/1 "2023-09-06T15:15:40Z")

</div>

## Summary:&nbsp;

This article provides an overview of how Synthetic Monitoring screenshots are captured, stored, managed, and troubleshot across SaaS and Managed environments. It covers storage, proxy requirements, common upload errors, log locations, FAQs, and steps to take when screenshots are missing or inconsistent.

## **Synthetic Screenshots**

- Reference (expected/success) screenshots are taken when a monitor is created or updated, and then every 24 hours from a randomly selected monitoring location **for scheduled executions**. Therefore, if a monitor is executed in several locations, the success screenshot displayed for all locations will be the same screenshot taken from the selected location.

- Screenshot retention is based on execution retention. When they’re taken, screenshots are considered part of the execution data. The default retention period for screenshots is 35 days. However, this may be shorter in some managed environments, depending on their storage settings.

- If your Synthetic monitor has never been successful or has not been successful in the last 35 days, you’ll not have any “expected” screenshots.

- Screenshots are captured at the end of each script event, even those without timings.

- Success (expected) screenshots are only taken on a successful first execution, never on a retry. So if your monitor is always successful and has no screenshots, it is likely that all executions are Execution type: re-run

- You can verify the origin of a screenshot by following these steps:

 ![HannahM_0-1738256719884.png](https://global.discourse-cdn.com/dynatrace/original/2X/b/ba3660031535e8958918b8258aee06bfefaa568d.png)

## 

**Screenshot Storage**

- **SaaS:**  
Screenshots are stored in Amazon S3.
- **Managed:**  
Clusters installed&nbsp;after version 1.216 store screenshots on the cluster, in Cassandra.  
For clusters installed&nbsp;before this version, screenshots are stored in Amazon S3. To modify the storage setup to cluster-based, create a support ticket.  
If screenshots are stored on the cluster, the storage settings can’t be updated to store on S3.

### S3

For screenshots stored in Amazon S3, the following domains in the firewall configuration must be allowed:

- Screenshot storage:
  - Cluster version \< 330&nbsp;  
[ruxit-synth-screencap.s3-accelerate.amazonaws.com](http://ruxit-synth-screencap.s3-accelerate.amazonaws.com/). This should be allowed on the relevant ActiveGates.

  - Cluster version \>= 330 AND ActiveGate/ public location \>=333  
screenshots are uploaded to the cluster initially, and then to s3.  
No configuration changes should be needed for SaaS.  
For managed, ensure the screenshot endpoint on your Cluster ActiveGate

- [ruxit-synth-screencap.s3.amazonaws.com](http://ruxit-synth-screencap.s3.amazonaws.com/) for screenshot access and viewing. This should be allowed for any machines using the WebUI to view screenshots.
  - If you need a more restrictive rule, the folders are restricted to a specific tenant.  
It follows the format:  
[https://ruxit-synth-screencap.s3.amazonaws.com/\](https://ruxit-synth-screencap.s3.amazonaws.com/%5C)/\<tenantid\>/  
You can check this in the webUI. If you inspect an image it gives you the link.

### Cluster

For screenshots stored in Cassandra, on a Managed Cluster,&nbsp; make sure the endpoint below is allowed to receive data on your Cluster ActiveGate (only required if you’re using Public locations)

- /beacon/synthetic/screenshot/[uuid] - Where uuid is the Environment ID.
- You may also wish to allow public location IP addresses on any network devices that may prevent access to the Cluster ActiveGate endpoint or modify the data in any way.

## Proxy Scenarios

For general information and scenarios, see [Setting up a proxy for private synthetic](https://docs.dynatrace.com/docs/observe/digital-experience/synthetic-monitoring/private-synthetic-locations/setting-up-proxy-for-private-synthetic#set-up-a-proxy-for-private-synthetic-monitoring)

1. **Proxy needed for S3 and tested resources**  
Add the proxy connection details to the&nbsp;[synthetic]&nbsp;section of the ActiveGate&nbsp;custom.properties&nbsp;file (which is located in the [ActiveGate configuration directory](https://www.dynatrace.com/support/help/setup-and-configuration/dynatrace-activegate/configuration/where-can-i-find-activegate-files))  
Example:

2. **Proxy not needed&nbsp;for S3 and tested resources**  
If the proxy entered at a higher level, http.client or http.client.internal, is not needed for either S3 or tested resources, it will need to be disabled for Synthetic.

3. **Proxy only needed for either S3 or tested resources**  
If the proxy should be enabled for S3 but not Monitors, or vice versa, then&nbsp;you can selectively enable proxy for Monitors or S3.&nbsp;  
Set up the proxy settings in custom.properties as usual. Then, add the following settings to VUC user.properties (default path&nbsp;_/var/lib/dynatrace/synthetic/config/user.properties_

Restart the vuc.service/ Dynatrace Synthetic service after any changes to the proxy settings.

## **Troubleshooting**

- Confirm that the executions are not always re-runs. Go to the browser monitor, select “Analyze executions”, and in the execution time, select different timings and confirm the “Execution type” is standard (and not re-run) for some of the executions.

- For SaaS, or Managed environments that store screenshots on S3, make sure that the ActiveGate can access the Amazon S3 service.

- For Managed environments&nbsp;that store screenshots on the cluster, in Cassandra, ensure the Cluster ActiveGate URL is publicly available&nbsp;and that IPs from Public locations are allowed through any firewalls.

- Verify whether the monitor runs only on demand and check the date when the screenshot was taken. If it’s older than 24 hours, the **Take screenshots on successful execution** option is likely not enabled. Run an on-demand execution with **Take screenshots on successful execution** enabled.

- If only some successful screenshots are missing, check whether the monitor uses JavaScript events. These events can skip steps, so the execution that captured screenshots might not have run all steps as expected. Review the execution that captured the screenshots to confirm that all screenshots appear. If they do, this behavior is expected. To attempt capturing all steps, run an on-demand execution with **Take screenshots on successful execution** enabled.

### **Private Locations**

How to identify issues in the logs:

- In the browser\_#.log file (/var/tmp/dynatrace/synthetic or %PROGRAMDATA%\dynatrace\synthetic):

Look for any errors related to “ **SCREENSHOT** ” or “ **SCREENCAP** ”. These errors are related to taking and storing the screenshots locally on the Virtual User Controller (VUC).

- In the vuc-browser.log file. (/var/log/dynatrace/synthetic/ or \<LOG\>/synthetic/log or %PROGRAMDATA%\dynatrace\synthetic\log):

Check for “**[SCREENCAP]**” errors. These errors occur when uploading the images from the VUC to either S3 or the cluster.

### Upload Errors

#### Status Code: 403

These messages can be seen in&nbsp;the vuc-browser.log file.

```markup
AwsS3CloudFileManager: [SCREENCAP] Exception caught while uploading file /var/tmp/dynatrace/synthetic/screenshots/ AmazonS3Exception: Forbidden (Service: Amazon S3; Status Code: 403; Error Code: 403 Forbidden…)

```

```markup
AwsS3CloudFileManager: [SCREENCAP] Exception caught while uploading file /var/tmp/dynatrace/synthetic/screenshots/image.jpeg AmazonS3Exception: URLBlockedServers (Service: Amazon S3; Status Code: 403; Error Code: 403 URLBlockedServers)

```

Confirm what configuration is needed for the private location to reach S3 and update the proxy configuration. See the&nbsp;[Proxy scenarios section.](https://community.dynatrace.com/t5/tkb/workflowpage/tkb-id/troubleshooting/article-id/301#toc-hId-1770608767)

#### **Unable to find valid certification path to requested target**

These messages can be seen in&nbsp;the vuc-browser.log file.

```markup
AwsS3CloudFileManager: [SCREENCAP] Exception caught while uploading file /var/tmp/dynatrace/synthetic/screenshots/ SunCertPathBuilderException: unable to find valid certification path to requested target.

```

```markup
AwsS3CloudFileManager: [SCREENCAP] Client-side exception caught while uploading file ... to S3 bucket ruxit-synth-screencap:
software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

```

This usually means that there is a certificate issue when the ActiveGate is trying to connect to S3.

- Add the certificate to the truststore. [More information in the documentation for Trusted root certificates for ActiveGate](https://www.dynatrace.com/support/help/setup-and-configuration/dynatrace-activegate/configuration/configure-trusted-root-certificates-on-activegate)

- For Windows, you can update the Synthetic Module to use the Windows truststore instead

In some cases, the certificate needs to be added to the proxy.

#### **407 Proxy Authentication Required**

These messages can be seen in&nbsp;the vuc-browser.log file.

```markup
ERROR AwsS3CloudFileManager: [SCREENCAP] Exception caught while uploading file C:\\ProgramData\\dynatrace\\synthetic\\temp\\synthetic\\screenshots\\image.jpeg to S3 bucket... Proxy Authentication Required (Service: Amazon S3; Status Code: 407; Error Code: 407 Proxy Authentication Required; Request ID: null; S3 Extended Request ID: null; Proxy: <yourproxy>)

```

Proxy credentials are needed.

- Add the proxy username and password details to the section of the custom.properties file, in&nbsp;/var/lib/dynatrace/gateway/config or&nbsp;%PROGRAMDATA%\dynatrace\gateway\config, which contains the proxy connection information, most likely [synthetic].

- If the proxy credentials are already added, check that the password has not expired or been changed. Then update the proxy-password.

## Frequently Asked Questions

1. My site has different languages/ looks and feels in different locations, but all the success/ expected screenshots are showing the same images.
  1. Each monitor only has 1 set of success/ expected screenshots. These are taken once every 24 hours from a random location. These success screenshots are then shown for all executions. Separate monitors would be needed if the success images from each location are needed.  
Failed executions show the images from the execution that failed.

2. I changed my monitor and now some screenshots are missing
  1. New screenshots are taken after an update, if some events are no longer used then there won’t be a screenshot taken for them and they will appear blank.

3. I updated my application and want to compare screenshots from before and after but they just show the new pages
  1. Each monitor only has 1 set of success/ expected screenshots. These are taken once every 24 hours from a random location. These success screenshots are then shown for all executions, including executions from previous days.  
To compare before and after screenshots, either create a duplicate monitor and execute it for a period on the original application before disabling it. Then compare screenshots after the new application is launched. Or create a monitor with a last steps that checks something that doesn’t exist on the page, to force a failure. Run this monitor before and after the change to compare screenshots.

4. How can I force new ‘Expected’/ success screenshots to be taken
  1. New screenshots are taken after an update to the monitor. If you’re not updating the monitor, you can run an on-demand execution and select ‘Take screenshot on successful execution’.

## What’s Next?

If the screenshots are still missing or unexplained after following the troubleshooting, please create a Support ticket and provide the following:

1. Link to any monitors/ monitor executions that are missing screenshots
2. Support Archive for the ActiveGate machine, if access to the ActiveGate is not available to Support
3. Explanation of troubleshooting steps taken and the results

### **Related Reading:**

![HannahM_0-1769097109026.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/b/eb6d9d4379a236243b3b08861f33a5d309710d6d.png)  
[Set up a proxy for private synthetic monitoring](https://docs.dynatrace.com/docs/observe/digital-experience/synthetic-monitoring/private-synthetic-locations/setting-up-proxy-for-private-synthetic)

![HannahM_0-1769097109026.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/b/eb6d9d4379a236243b3b08861f33a5d309710d6d.png)  
[Synthetic details for browser monitors](https://docs.dynatrace.com/docs/observe/digital-experience/synthetic-monitoring/analysis-and-alerting/synthetic-details-for-browser-monitors#screenshots)

![HannahM_0-1769097109026.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/b/eb6d9d4379a236243b3b08861f33a5d309710d6d.png)  
[Useful Synthetic ActiveGate logs](https://community.dynatrace.com/topic/214478)

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [September 6, 2023, 5:49pm UTC](https://community.dynatrace.com/t/synthetic-screenshots-information-and-troubleshooting/41539/2 "2023-09-06T17:49:40Z")

</div>

Thank you for sharing this&nbsp;[@Dyna\_Patrick](https://community.dynatrace.com/user/51376)

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [November 4, 2023, 5:27pm UTC](https://community.dynatrace.com/t/synthetic-screenshots-information-and-troubleshooting/41539/3 "2023-11-04T17:27:47Z")

</div>

Thank you:grin:
