An editor's note was added to this end article on September 23, 2019 with a technical update.
Since the announcement at Red Hat Summit 2019, Red Hat Insights is now included in Red Hat Enterprise Linux (RHEL) subscriptions. What many users don‘t know is that when one wants to remove a host from Insights, it has to be done via the command line interface by running the command sudo insights-client --unregister
. Removing it by using the Insights web interface on cloud.redhat.com is not sufficient.
But what do you do when a host doesn‘t exist anymore and is still listed there? Sometimes it‘s necessary to access the Red Hat Insights API, which is the case when a system has been deleted before having been unregistered from cloud.redhat.com. For this purpose, it is useful to have a container, since using one allows you to remove the non-existing host from cloud.redhat.com. This container can run on any other system; for example, on a CentOS server, a Fedora workstation, or on another Red Hat Enterprise Linux host.
Why a container? Well, a container is a dedicated process which runs isolated from the host system in a "sandbox." Why is this important and relevant? In order to access your account, you have to provide your credentials which are considered sensitive data. Running commands from within a container provides you with enhanced security, and this means that the credentials are not visible to other users outside of the container.
Now, how do you do this? You will need to install podman if it’s not already installed. It makes sense to install the accompanying Red Hat container tools buildah and skopeo as well. These additional tools are useful for specific tasks, such as building container images and managing container registries.
Run the following command on Fedora or on Red Hat Enterprise Linux 8 (for CentOS 7 or RHEL 7, dnf
has to be replaced with yum
):
$ sudo dnf install buildah podman skopeo
Once you have these tools installed, sign in to registry.redhat.io:
$ sudo podman login registry.redhat.io --username <username> --password <password>
Pull the Red Hat Enterprise Linux 8 Universal Base Image (UBI):
$ sudo podman pull registry.redhat.io/ubi8/ubi
Create and start the insights
container:
$ sudo podman run --name insights --privileged -it registry.redhat.io/ubi8/ubi /usr/bin/bash
Install perl-JSON-PP
and clean dnf
and the cache:
# dnf install perl-JSON-PP
# dnf clean all
# rm -r /var/cache/dnf
Get information about the registered hosts:
# curl -k --user <username> https://cloud.redhat.com/api/inventory/v1/hosts | json_pp > hosts.json
You are getting asked for your Red Hat Login password at this point.
Check for the host <id>
of the host you want to remove:
# cat hosts.json
Delete the "non-existing" operating system:
# curl -k --user <username> -X "DELETE" https://cloud.redhat.com/api/inventory/v1/hosts/<id>
You are getting asked for your Red Hat Login password at this point.
Now you're done and can leave the insights container:
# exit
Want to use the container again? Here you go:
$ sudo podman start insights
$ sudo podman attach insights
Summary
Using the method described in this article is currently the only way to remove a non-existing host from cloud.redhat.com when the system has been deleted before having been unregistered there by running the command sudo insights-client --unregister
.
Editor's note: With the latest cloud.redhat.com dashboard, there is an additional method for removing systems which are registered to Red Hat Insights and no longer in use. Click the Inventory
tab, then find and select the host. On the right side, find the collapsed menu (three dots) and select delete
. The method described in this blog will work, but this is an additional method that some may find easier.
[Want to try out Red Hat Enterprise Linux? Download it now for free.]
Sobre el autor
I am running the latest editions of CentOS, Fedora, and Red Hat Enterprise Linux server and workstation operating systems on physical and virtual machines (VM).
My dedicated capabilities and interests are backup solutions & disaster recovery, hardware drivers, infrastructure deployment, storage management, and virtualization.
Navegar por canal
Automatización
Las últimas novedades en la automatización de la TI para los equipos, la tecnología y los entornos
Inteligencia artificial
Descubra las actualizaciones en las plataformas que permiten a los clientes ejecutar cargas de trabajo de inteligecia artificial en cualquier lugar
Nube híbrida abierta
Vea como construimos un futuro flexible con la nube híbrida
Seguridad
Vea las últimas novedades sobre cómo reducimos los riesgos en entornos y tecnologías
Edge computing
Conozca las actualizaciones en las plataformas que simplifican las operaciones en el edge
Infraestructura
Vea las últimas novedades sobre la plataforma Linux empresarial líder en el mundo
Aplicaciones
Conozca nuestras soluciones para abordar los desafíos más complejos de las aplicaciones
Programas originales
Vea historias divertidas de creadores y líderes en tecnología empresarial
Productos
- Red Hat Enterprise Linux
- Red Hat OpenShift
- Red Hat Ansible Automation Platform
- Servicios de nube
- Ver todos los productos
Herramientas
- Training y Certificación
- Mi cuenta
- Soporte al cliente
- Recursos para desarrolladores
- Busque un partner
- Red Hat Ecosystem Catalog
- Calculador de valor Red Hat
- Documentación
Realice pruebas, compras y ventas
Comunicarse
- Comuníquese con la oficina de ventas
- Comuníquese con el servicio al cliente
- Comuníquese con Red Hat Training
- Redes sociales
Acerca de Red Hat
Somos el proveedor líder a nivel mundial de soluciones empresariales de código abierto, incluyendo Linux, cloud, contenedores y Kubernetes. Ofrecemos soluciones reforzadas, las cuales permiten que las empresas trabajen en distintas plataformas y entornos con facilidad, desde el centro de datos principal hasta el extremo de la red.
Seleccionar idioma
Red Hat legal and privacy links
- Acerca de Red Hat
- Oportunidades de empleo
- Eventos
- Sedes
- Póngase en contacto con Red Hat
- Blog de Red Hat
- Diversidad, igualdad e inclusión
- Cool Stuff Store
- Red Hat Summit