Where is my virt-who server that is reporting to Red Hat Satellite 6?

Solution Verified - Updated -

Environment

  • Red Hat Satellite 6

Issue

  • Where is my virt-who server that is reporting to Red Hat Satellite 6?
  • What virt-who server(s) are reporting to Satellite?
  • How to determine which IP address is the host of my virt-who server, from the perspective of my Satellite 6 server?

Resolution

  • Running a quick grep for cmd=virtwho.py through /var/log/httpd/foreman-ssl_access_ssl.log will provide the systems that have recently run virt-who on them.
# grep -i "cmd=virtwho.py" /var/log/httpd/foreman-ssl_access_ssl.log | less
10.9.8.7 - - [15/Jun/2016:18:13:02 -0400] "GET /rhsm/status/ HTTP/1.1" 200 242 "-" "RHSM/1.0 (cmd=virtwho.py)"
10.9.8.7 - - [15/Jun/2016:18:13:03 -0400] "GET /rhsm/status HTTP/1.1" 200 242 "-" "RHSM/1.0 (cmd=virtwho.py)"
10.9.8.7 - - [15/Jun/2016:18:13:03 -0400] "POST /rhsm/hypervisors?owner=RedHatOwner&env=Library HTTP/1.1" 200 22407 "-" "RHSM/1.0 (cmd=virtwho.py)"
10.11.12.13 - - [15/Jun/2016:18:28:02 -0400] "GET /rhsm/status/ HTTP/1.1" 200 242 "-" "RHSM/1.0 (cmd=virtwho.py)"
10.11.12.13 - - [15/Jun/2016:18:28:03 -0400] "GET /rhsm/status HTTP/1.1" 200 242 "-" "RHSM/1.0 (cmd=virtwho.py)"
10.11.12.13 - - [15/Jun/2016:18:28:03 -0400] "POST /rhsm/hypervisors?owner=RedHatOwner&env=Library HTTP/1.1" 200 22903 "-" "RHSM/1.0 (cmd=virtwho.py)"
  • In newer versions of virt-who or Satellite 6, this is shown slightly different, and we must adjust our search (The command at the bottom has been adjusted to account for this):
# grep -i "cmd=virt-who" /var/log/httpd/foreman-ssl_access_ssl.log | less
10.9.8.7 - - [21/Nov/2016:12:27:54 -0500] "GET /rhsm/status/ HTTP/1.1" 200 263 "-" "RHSM/1.0 (cmd=virt-who)"
10.9.8.7 - - [21/Nov/2016:12:27:54 -0500] "GET /rhsm/status HTTP/1.1" 200 263 "-" "RHSM/1.0 (cmd=virt-who)"
10.9.8.7 - - [21/Nov/2016:12:27:54 -0500] "POST /rhsm/hypervisors?owner=Default_Organization&env=Library HTTP/1.1" 200 4 "-" "RHSM/1.0 (cmd=virt-who)"
10.11.12.13 - - [21/Nov/2016:12:28:56 -0500] "GET /rhsm/status/ HTTP/1.1" 200 263 "-" "RHSM/1.0 (cmd=virt-who)"
10.11.12.13 - - [21/Nov/2016:12:28:57 -0500] "GET /rhsm/status HTTP/1.1" 200 263 "-" "RHSM/1.0 (cmd=virt-who)"
10.11.12.13 - - [21/Nov/2016:12:28:57 -0500] "POST /rhsm/hypervisors?owner=Default_Organization&env=Library HTTP/1.1" 200 4 "-" "RHSM/1.0 (cmd=virt-who)"

The IP Address on the left is the system(s) that is currently running virt-who. In this scenario, virt-who is running on both servers with IP Addresses of 10.9.8.7 and 10.11.12.13.

  • Here is a more concise command to get the data we care about most:
# grep POST /var/log/httpd/foreman-ssl_access_ssl.log | grep cmd=virt-who | awk '{print $1}' | sort | uniq -c
23 10.9.8.7
35 10.11.12.13
  • If virt-who is running behind Capsule server, the above commands will find Capsule's IP address. In such a case, run below commands on that Capsule to find IP address where the virt-who is running at:
# grep "virt-who" /var/log/httpd/katello-reverse-proxy_access_ssl.log | awk '{print $1}'

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.

Comments