Hello,
Problem:
A host displays the following in the web ui:
Properties
Status Error
Build Installed
Configuration Out of sync
Errata All errata applied
System Purpose Not Specified
Subscription Fully entitled
Traces Reboot required
Using the API, I would like to capture the ‘Traces’ ‘Reboot required’ state, but I cannot find it under api/v2/hosts/:
curl -s --user ${FOREMANUSR}:${FOREMANPW} -H “Content-Type:application/json” -H “Accept:application/text” -k ${FOREMANAPI}/hosts/${FQDN} -X GET | jq -r ‘’ | egrep -i ‘trace|reboot’
“os_patching::reboot_override”: “default”,
“os_patching::reboots::reboot_required”: “unknown”,
“puppet_settings::main::trace”: “false”,
“puppet_settings::main::puppet_trace”: “false”,
“puppet_settings::transaction::evaltrace”: “false”,
“reboot_required”: “false”,
“os_patching::reboots”: null,
I see the other status components:
curl -s --user ${FOREMANUSR}:${FOREMANPW} -H “Content-Type:application/json” -H “Accept:application/text” -k ${FOREMANAPI}/hosts/${FQDN} -X GET | jq -r ‘’ | egrep -i ‘global|configuration’
“global_status”: 2,
“global_status_label”: “Error”,
“configuration_status”: 1,
“configuration_status_label”: “Out of sync”,
“subscription_global_status”: 0,
I do see that the katello/api can retrieve traces (list of services requiring restart) but I just need the global status.
Expected outcome:
The API would display the ‘Traces’ host status.
Foreman and Proxy versions:
Katello 3.12/Foreman 1.22
Foreman and Proxy plugin versions:
foreman001.zyme.zone-qpid-broker-1.0-8.noarch
foreman-1.22.1-1.el7.noarch
foreman-cli-1.22.1-1.el7.noarch
foreman-debug-1.22.1-1.el7.noarch
foreman-ec2-1.22.1-1.el7.noarch
foreman-gce-1.22.1-1.el7.noarch
foreman-installer-1.22.1-1.el7.noarch
foreman-installer-katello-1.22.1-1.el7.noarch
foreman-libvirt-1.22.1-1.el7.noarch
foreman-openstack-1.22.1-1.el7.noarch
foreman-ovirt-1.22.1-1.el7.noarch
foreman-postgresql-1.22.1-1.el7.noarch
foreman-proxy-1.22.1-1.el7.noarch
foreman-rackspace-1.22.1-1.el7.noarch
foreman-release-1.22.1-1.el7.noarch
foreman-release-scl-7-2.el7.noarch
foreman-selinux-1.22.1-1.el7.noarch
foreman-vmware-1.22.1-1.el7.noarch
katello-3.12.3-1.el7.noarch
katello-certs-tools-2.5.3-1.el7.noarch
katello-client-bootstrap-1.7.2-2.el7.noarch
katello-common-3.12.3-1.el7.noarch
katello-debug-3.12.3-1.el7.noarch
katello-repos-3.12.3-1.el7.noarch
katello-selinux-3.1.1-1.el7.noarch
katello-service-3.12.3-1.el7.noarch
pulp-katello-1.0.2-1.el7.noarch
rubygem-foreman_maintain-0.4.2-1.el7.noarch
tfm-rubygem-foreman_default_hostgroup-5.0.0-3.fm1_22.el7.noarch
tfm-rubygem-foreman_discovery-15.0.1-1.fm1_22.el7.noarch
tfm-rubygem-foreman_docker-5.0.0-2.fm1_22.el7.noarch
tfm-rubygem-foreman_hooks-0.3.15-1.fm1_22.el7.noarch
tfm-rubygem-foreman_setup-6.0.0-3.fm1_22.el7.noarch
tfm-rubygem-foreman-tasks-0.15.9-1.fm1_22.el7.noarch
tfm-rubygem-foreman-tasks-core-0.3.2-1.fm1_22.el7.noarch
tfm-rubygem-foreman_templates-6.0.3-2.fm1_22.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.17.2-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-7.el7.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.4-4.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.13-1.fm1_22.el7.noarch
tfm-rubygem-hammer_cli_katello-0.18.2-1.el7.noarch
tfm-rubygem-katello-3.12.3-1.el7.noarch
Distribution and version:
EL 7.6