Troubleshooting monitors

Postman always syncs your monitors with your collections in the Postman app. As a result, you can debug in the app locally, while your monitors are updated on our servers, seamlessly.

Viewing failed monitors

The Postman console in the Monitors web view is the best way to debug monitors.

You can click the failed monitor and review the relevant logs under the Console Log tab.

failed monitors

For information about debugging in the console, see Debugging and logs.

When a monitor fails, a “Need help debugging?” popup displays in the Postman monitors web view. Whenever possible, these suggestions include debugging tips that are specifically related to the error.

For example, if the monitor failed because Postman was unable to contact the server, the debugging tip suggests you ensure the server’s IP address is correct, and that it’s publicly available. If the monitor failed because of a missing variable, then the debugging tip suggests verifying if the monitor is using the correct environment, and that the variable exists in the environment.

debugging monitors in the console

Debugging local run attempts

  • Run the failing monitor’s collection with its environment in the Postman app or Newman to see if it works correctly.
  • If a local run passes, ensure the sync is enabled in the toolbar header of the Postman app to persist any local changes.

    enable sync

  • You can also force a sync from the Sync tab within the SETTINGS modal.

    force sync

Debugging 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.

  • If your collection run depends on a saved global variable, change it to an environment variable. Saved global variables are not supported in monitors at this time.

Logging relevant information

  • Often, issues come from unexpected response bodies or header values. You can log these with the following:
console.log(JSON.stringify(responseBody, null, 2));
console.log(JSON.stringify(responseHeaders, null, 2));

Uncaught errors

  • Wrapping suspicious code in a try - catch block will also let the test and pre-request scripts in your collection run to completion, allowing you to see the entire picture.