- API >
- Public API Tutorials >
- Stop Monitoring a Process
Stop Monitoring a Process¶
This tutorial shows you how to stop monitoring a process. Once you stop monitoring a process, Cloud Manager stops displaying its status and tracking its metrics.
Understand the Objectives¶
Learn how to use the public API to:
- Find the host ID for the process.
- Stop monitoring the process that matches the host ID.
- Verify that Cloud Manager no longer monitors the process.
Complete the Prerequisites¶
Complete these prerequisites before you complete the tutorial.
- Configure your access to the public API.
- Get the permissions needed to change monitoring settings. You need one of the following roles:
- Terminate the backups for the process before you stop monitoring it.
Follow These Steps¶
Complete all the following steps to use the API to stop monitoring a process.
Find the host ID for the process.¶
Use the Get One Host by Hostname and Port
resource to find the process and retrieve the id
value.
Learn What This Step Does¶
The Get One Host by Hostname and Port resource uses the hostname and port you specify to find the process. Then, it returns information about this process. You can find the id needed for the next step in the response.
Issue This Command¶
Copy the following curl command. Paste it into your preferred terminal or console. Replace the displayed placeholders with these values:
Placeholder | Description |
---|---|
{PUBLIC-KEY} |
Public part of your API key. |
{PRIVATE-KEY} |
Private part of your API key. |
{PROJECT-ID} |
Unique identifier of the project that owns the host. |
{HOSTNAME} |
Primary hostname that Cloud Manager uses to connect to the instance. This may be a hostname, an FQDN, an IPv4 address, or an IPv6 address. |
{PORT} |
Port on which the process listens. |
Replace the placeholders in the command, then execute it.
Copy the Host’s ID¶
In the response body, copy the value returned in the id
field. You need the
value for the next step.
Example
Stop monitoring the process that matches the host ID.¶
Use the Stop Monitoring One Host resource to stop monitoring the host.
Learn What This Step Does¶
The Stop Monitoring One Host resource doesn’t actually delete the host. The resource deletes the host from the list of hosts that Cloud Manager monitors. This removes the process from monitoring.
Issue This Command¶
Copy the following curl command. Paste it into your preferred terminal or console. Replace the displayed placeholders with these values:
Placeholder | Description |
---|---|
{PUBLIC-KEY} |
Public part of your API key. |
{PRIVATE-KEY} |
Private part of your API key. |
{PROJECT-ID} |
Unique identifier of the project that owns the host. |
{HOST-ID} |
Unique identifier of the host for the process. Use the id from
step 1. |
Replace the placeholders in the command, then execute it.
Verify that Cloud Manager no longer monitors the process.¶
Use the Get One Host by Hostname and Port
resource again to attempt to find the process using its hostname and port. Then, verify
that details
returns No host with hostname
and port {HOSTNAME}:{PORT} exists in group {PROJECT-ID}
.
Learn What This Step Does¶
The Get One Host by Hostname and Port
resource uses the hostname and port you specify to find the process. Then, it
returns information about this process. You can tell that Cloud Manager doesn’t monitor
the process if the details
value in the response is No host with hostname
and port {HOSTNAME}:{PORT} exists in group {PROJECT-ID}
.
This means that Cloud Manager can’t find the host in the
list of processes that it monitors.
Issue This Command¶
Copy the following curl command. Paste it into your preferred terminal or console. Replace the displayed placeholders with these values:
Placeholder | Description |
---|---|
{PUBLIC-KEY} |
Public part of your API key. |
{PRIVATE-KEY} |
Private part of your API key. |
{PROJECT-ID} |
Unique identifier of the project that owns the host. |
{HOSTNAME} |
Primary hostname that Cloud Manager uses to connect to this instance. This may be a hostname, an FQDN, an IPv4 address, or an IPv6 address. |
{PORT} |
Port on which the process listens. |
Replace the placeholders in the command, then execute it.
Check the Response Details¶
In the response body, check the value returned in the details
field. If
details
returns No host with hostname
and port {HOSTNAME}:{PORT} exists in group {PROJECT-ID}
, you succeeded. Cloud Manager no longer monitors the process.