> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Troubleshoot monitors in Postman

If you encounter a problem with a monitor, the following troubleshooting steps may help you identify and resolve the issue.

## View failed monitors

The [Console Log](/docs/monitoring-your-api/viewing-monitor-results/#console-log) can help you debug issues you might encounter with your monitors.

1. Go to your workspace and click the <img alt="Services icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/descriptive-services-stroke.svg#icon" width="20px" /> **Services** tab and expand **Monitors** in the sidebar.
2. Select a monitor, and then click a failed monitor run in the performance graph.
3. Click **Console Log** to view monitor run details, along with any `console.log()` statements you included in your pre-request and post-response scripts.
4. (Optional) Click **Search console logs** and enter a search term like "error" or "failed". Matches are highlighted in the log. You can also click <img alt="Down Large icon" src="https://assets.postman.com/postman-docs/aether-icons/direction-down-large.svg#icon" width="16px" role="img" /> **Next match** and <img alt="Up Large icon" src="https://assets.postman.com/postman-docs/aether-icons/direction-up-large.svg#icon" width="16px" role="img" /> **Previous match** to cycle through them.

![Failed monitor run Console log](https://assets.postman.com/postman-docs/v11/monitor-console-log-failed-run-v11-75-2.png)

For more information on debugging with the Postman Console, see [Troubleshooting API requests](/docs/use/send-requests/response-data/troubleshooting-api-requests/).

## Debug local run attempts

* Run the failing monitor's collection with its environment in Postman or the [Postman CLI](/docs/postman-cli/postman-cli-overview/).
* If a local run passes, check that your changes are automatically [syncing](/docs/getting-started/basics/syncing/) to Postman Cloud.

## Debug variable issues

* Ensure that the same environment is used across local runs and monitor runs. To confirm, add `console.log(environment);` to your request scripts and compare the results across monitoring and local runs.
* Ensure that any collection or environment variables that your collection run depends on have been [shared](/docs/use/send-requests/variables/share-variables). Because they run in the Postman cloud, monitors can only use variables whose values have been shared. (Sharing syncs variable values to the Postman cloud.)
* If your collection run depends on a saved global variable, change it to an environment variable, and [share](/docs/use/send-requests/variables/share-variables) its value. Saved global variables aren't supported in monitors.

## Log relevant information

* Unexpected response bodies or header values can be a source of monitor issues. You can log these with the following code:

  ```js
  console.log(JSON.stringify(responseBody, null, 2));
  console.log(JSON.stringify(responseHeaders, null, 2));
  ```

## Uncaught errors

* Wrap suspicious code in a `try - catch` block to ensure test and pre-request scripts in your collection run to completion.