Delete a host from the index (v2)

Here is an example of how to use the New Relic REST API (v2) to remove a host from your Servers index in New Relic with a cURL command. You can also delete hosts with the API Explorer.

You are responsible for ensuring that the hosts and applications really should be removed if they are no longer reported. For example, maintenance and other scheduled down times may make the hosts appear to be down.

Remove a host

To remove a host that has stopped reporting, substitute the server ID and REST API key for your account in this command. This takes effect after the host has stopped reporting. If the SERVER_ID represents a host that is still reporting, the attempt will be ignored.

curl -X DELETE "https://api.newrelic.com/v2/servers/${SERVER_ID}.json" \
     -H "X-Api-Key:${API_KEY}" -i 

Disable downtime alerts (legacy)

If you have legacy downtime alerting active and you disable a host, you will still receive alerts. To avoid this, make sure the host is assigned to an alert policy with legacy downtime alerting disabled, or to an alert policy that is configured for no notification.

For more help

Discuss New Relic Servers in the New Relic Online Technical Community! Troubleshoot and ask questions, or discuss Servers for Linux or Servers for Windows in detail.

If you need additional help, get support at support.newrelic.com.