How to unregister/delete a system from cloud.redhat.com inventory?

Solution Verified - Updated -

Environment

  • cloud.redhat.com
  • Red Hat Satellite
  • Insights-client

Issue

  • How to unregister/delete a system registered to cloud.redhat.com inventory?

Resolution

There are multiple ways to unregister/delete a system profile from the Inventory

Procedure 1: Using insights-client command itself

# insights-client --unregister

Procedure 2: From Red Hat Satellite 6 UI

  • Login to Satellite webui
  • Navigate to Insights -> Inventory
  • Select system profiles which need to be unregistered
  • Click on Actions -> Unregister

Procedure 3: Using cloud.redhat.com UI

  • Login to cloud.redhat.com
  • Click on Cloud Management Services or Red Hat Insights
  • Click on Inventory
  • Locate the host to be removed and click on the vertical ellipse to the end of the row then click on Delete.

Procedure 4: Using cloud.redhat.com API

Note: Use this option only when the actual system is destroyed/reinstalled. If we use delete API without unregistering the client, hosts will reappear next time when the client uploads data.

A) Get the list of system profiles from Inventory

# curl -k --user PORTALUSERNAME https://cloud.redhat.com/api/inventory/v1/hosts | json_pp > hosts.json

If json_pp command does not exist on the system then install the perl-JSON-PP package.

# yum install perl-JSON-PP

B) Get the ID of the system from hosts.json file and confirm system details
Eg: "id" : "f59716a6-5d64-4901-b65f-788b1aee25cc"

# curl -k --user PORTALUSERNAME https://cloud.redhat.com/api/inventory/v1/hosts/f59716a6-5d64-4901-b65f-788b1aee25cc

C) Delete the system profile using below command:
# curl -k --user PORTALUSERNAME -X "DELETE" https://cloud.redhat.com/api/inventory/v1/hosts/f59716a6-5d64-4901-b65f-788b1aee25cc

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

5 Comments

Hi, from new Insights portal available at cloud.redhat.com is not anymore possible to select a system and unregister it.

Hi Michele, it is "in the works" ... the Remove/Unregister option will be available in the web interface soon. :)

Regards,
Christian

Works perfectly ... I removed non-existing hosts which I had unregistered before Insights moved to cloud.redhat.com by using the API method.

Thank you for the validation and feedback!

You're welcome, Kathryn ! :)