> This page is for Postman Docs, version Latest (v12) (default).
> For other versions, use one of these documentation indexes:
> - Latest (v12) (default): https://learning.postman.com/latest-v-12/llms.txt
> - v11: https://learning.postman.com/v11/llms.txt

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

# Preview and edit environments in a monitor

> Preview and edit an environment from the monitor form, and see which variables a monitor can't use before you create it.

When you select an environment in the monitor form, the **Environment** tab in the preview panel shows its variables. Use it to check which values the monitor can use and to fix problems before you create the monitor, without leaving the form or opening the environment in a separate tab.

Monitors run in the Postman Cloud, so they can only use shared values. A variable that has a value only on your machine works when you send a request, but it can cause the monitor run to fail. The **Environment** tab shows a warning icon next to these variables so you can catch them before the first run.

You select an environment while you [configure a monitor](/docs/monitoring-your-api/setting-up-monitor/#configure-a-monitor). This page covers what you can do with that environment from the monitor form.

## Edit and save the environment

The **Environment** tab uses the same variables editor as the environment tab in the workbench. To learn more about environments, see [Create and use environments](/docs/use/send-requests/variables/managing-environments/) and [Set environment variables](/docs/use/send-requests/variables/environment-variables/). To edit the environment from the monitor form, do the following:

1. Select an **Environment** in the monitor form, then click the **Environment** tab. If you select ![Add icon](https://assets.postman.com/postman-docs/aether-icons/v12/icon-action-add-stroke.svg#icon) **Create new environment** from the dropdown list, Postman creates the environment, selects it, and shows it in the **Environment** tab instead of opening a new tab.

2. Add, edit, or reorder variables, or [set values as secure](/docs/use/send-requests/variables/define-variables/#secure-a-variable-value). While you have edits that aren't saved, the **Environment** tab shows an unsaved indicator and **Unsaved changes** appears at the bottom of the tab.

3. At the bottom of the **Environment** tab, save your changes in one of the following ways:

   * Click **Save** to update the environment. Postman asks you to confirm, because other collections, monitors, and services might use the environment. Click **Confirm** to save the changes to the environment.
   * Click **Save as new environment** to create a copy of the environment with your changes and select the copy for the monitor. Postman names the copy for you, and the original environment stays unchanged. This option is available when you create a monitor. When you edit a monitor, use **Save** to update the environment the monitor already uses.

> **Warning**
>
> **Save as new environment** shares every unshared value in the new environment, including sensitive values. Everyone in the workspace can see them. Values that you link to a vault secret keep their links and aren't shared as text.

Postman doesn't save environment edits when you click **Create Monitor** or **Update Monitor**. If you create the monitor or select a different environment before you save, Postman discards your edits. Postman doesn't warn you about unsaved edits or unshared values when you create or update the monitor.

## Share values for new variables

When you add a new variable in the **Environment** tab and enter a value, Postman sets the variable to [share that value](/docs/use/send-requests/variables/share-variables/), so the monitor can use it. The value isn't shared with your teammates until you click **Save** or **Save as new environment**, like any other edit. When you click **Save**, variables that are already in the environment keep their current sharing settings, and so does any shared value you set yourself. **Save as new environment** shares every unshared value in the copy, as the warning in the previous section describes.

## Fix variables a monitor can't use

In the **Environment** tab, Postman greys out each variable that the monitor can't use and shows a warning icon next to its name. You can still edit these variables. Hover over the warning icon to see why the variable can't be used and how to fix it:

| Warning           | What it means                                                                                                                                                                                            | How to fix it                                                                                                                                                                                                                                  |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Value not shared  | The variable's current value is local to you. Share the value so the monitor can use it.                                                                                                                 | [Share the value](/docs/use/send-requests/variables/share-variables/#share-a-variable-value), then click **Save**.                                                                                                                             |
| Local Vault value | The variable's value is a secret in your [Postman Local Vault](/docs/use/postman-vault/postman-vault-key#postman-local-vault), which only you can access. Monitors can't use values in your local vault. | Link a [Shared Vault secret](/docs/use/postman-vault/postman-vault-key/#postman-shared-vault) instead, and [share the secure variable](/docs/use/send-requests/variables/share-variables/#share-a-secure-variable-value), then click **Save**. |

A variable that references a Shared Vault secret shows a warning icon until you share it.

Monitors can't run on values that stay unshared or in a local vault. If you don't fix a variable that has a warning icon, the monitor can't use that variable's value.

## Edit environments in Local View

You can preview and edit environments in the monitor form in [Local View](/docs/use/native-git/overview/), with the same warnings. How Postman saves your changes depends on where the environment is stored:

* **Local environment** — Postman edits the environment from its file in your working directory. **Save** writes to the file and works offline. When you create or update the monitor, Postman pushes the changes to the environment's cloud copy. Learn more about [pushing local resources to the cloud](/docs/monitoring-your-api/setting-up-monitor/#push-local-resources-to-the-cloud).
* **Cloud-only environment** — Postman reads the environment from the cloud, using your cloud permissions. **Save** writes your changes directly to the cloud and needs an internet connection.
* **Save as new environment** — Postman creates a cloud environment named after the original with "Copy" added, shares every value, and selects it for the monitor.