

# 删除监测仪
<a name="nw-monitor-delete"></a>

在删除网络综合监测仪中的监测仪之前，无论监测仪**状态**如何，必须停用或删除与该监测仪关联的所有探测器。删除监测仪后，您不再需要为监测仪中探测器支付费用。请注意，已删除的监测仪无法恢复。

可以使用 Amazon CloudWatch 控制台或 AWS Command Line Interface 来管理监测仪和探测器。要以编程方式使用网络综合监测仪，请参阅《[Network Synthetic Monitor API Reference](https://docs.aws.amazon.com/networkmonitor/latest/APIReference/Welcome.html)》和《AWS Command Line Interface Command Reference》中的 [networkmonitor](https://docs.aws.amazon.com/cli/latest/reference/networkmonitor/)。

**使用控制台删除监测仪**

1. 点击 [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/) 打开 CloudWatch 控制台，然后在**网络监测**下选择**综合监测仪**。

1. 在**监测仪**部分，选择要删除的监测仪。

1. 选择**操作**，然后选择**删除**。

1. 如果您有任何处于活动状态的监测仪探针，则系统将提示您停用。选择**停用探测器**。
**注意**  
选择**停用探测器**后，您将无法取消或撤消此操作。但已停用的探测器不会从监测仪中删除。如果您愿意，则可以稍后将其重新激活。有关更多信息，请参阅 [激活或停用探测器](nw-monitor-probe-status.md)。

1. 在确认字段中，输入 **confirm**，然后选择**删除**。

或者，您以编程方式删除监测仪，例如，通过使用 AWS Command Line Interface。

**使用 CLI 删除监测仪**

1. 要删除监测仪，您需要知道监测仪名称。如果您不知道名称，则请运行 [list-monitors](https://docs.aws.amazon.com/cli/latest/reference/networkmonitor/list-monitors.html) 命令获取监测仪列表。记下要删除的监测仪的名称。

1. 验证该监测仪是否包含任何活动的探针。根据上一步的监测仪名称，使用 [get-monitor](https://docs.aws.amazon.com/cli/latest/reference/networkmonitor/get-monitor.html)。此操作将返回该监测仪的所有关联探测器的列表。

1. 如果监测仪包含活动的探针，则必须首先将这些探针设置为非活动状态或将其删除。
   + 要将探测器设置为非活动状态，请使用 [update-probe](https://docs.aws.amazon.com/cli/latest/reference/networkmonitor/update-probe.html)，并将状态设置为 `INACTIVE`。
   + 要删除探测器，请使用 [delete-probe](https://docs.aws.amazon.com/cli/latest/reference/networkmonitor/delete-probe.html)。

1. 将探针设置为 `INACTIVE` 或删除后，您可以通过运行 [delete-monitor](https://docs.aws.amazon.com/cli/latest/reference/networkmonitor/create-probe.html) 命令来删除监测仪。当您删除监测仪时，不会删除非活动探针。