How to collect logs in RHEV 3 and RHV 4

Solution Verified - Updated

Environment

  • Red Hat Enterprise Virtualization 3.x
  • Red Hat Virtualization 4.x

Issue

  • How do I run the log collector utility on Red Hat Virtualization 4?
  • I have a complex case, and I would like to receive quicker results on my case - what logs can I provide with my case?
  • I was asked by Red Hat Support to use the Red Hat Enterprise Virtualization Log Collector for RHEV 3. Where can I find this utility and how do I use it?

Resolution

There are two utilities that may be used to collect sosreports and related data from a RHV environment; ovirt-log-collector and sos-collector.

ovirt-log-collector is installed on the RHV-M during manager deployment. sos-collector is available from RHEL 7.6 and later.

With ovirt-log-collector, an archive of sosreports is generated on the RHV-M system (physical or Hosted-Engine VM). When using sos-collector, the utility can be used either on the RHV-M, on any of the hypervisors, or on a workstation that has network access to the environment. See How do I collect an sosreport from multiple nodes at the same time?
for complete information on how to use the sos-collector utility.

The Log Collector utility for RHEV 3.x is located in /usr/bin/rhevm-log-collector and is provided by the rhevm-log-collector package installed on the RHEV Manager system. In RHV 4, this utility has been renamed to ovirt-log-collector.

Note: It is recommended to gather alongside the log collector at least one host's sosreport. Usually this host will be the Storage Pool Manager (SPM) and potentially another host which is involved in the current problem that needs to be addressed. See below how to use the --hosts option to specify a host when using the Log Collector utility.

To gather data from RHVM, the current SPM and one host per cluster

  • (only available in 4.1.8+ and 3.6.12+).

      # ovirt-log-collector --hypervisor-per-cluster
    

To gather data from RHVM and one or more specific hosts

Provide a comma-separated list with no spaces of addresses or host names. The following example gathers data from all hosts ending in .11 and .15:

  • RHV 4:

      # ovirt-log-collector --hosts=*.11,*.15
      or
      # sos-collector --nodes=*.11,*.15
    
  • RHEV 3.3 and above:

      # engine-log-collector --hosts=*.11,*.15
    
  • RHEV 3.0/3.1/3.2:

      # rhevm-log-collector collect --hosts=*.11,*.15
    

To collect logs from RHVM and all Hosts

  • RHV 4:

      # ovirt-log-collector
      or
      # sos-collector
    
  • RHEV 3.3 and above:

      # engine-log-collector
    
  • RHEV 3.0/3.1/3.2:

      # rhevm-log-collector collect
    

To gather data based on Data Center name

Use the data-center option to gather data based on data center name. Here, information on all hosts with DNS names ending in .example.com are matched from any cluster beginning with the letter L:

  • RHV 4:

      # ovirt-log-collector --cluster=L* --hosts=*.example.com
      or
      # sos-collector -c rhv.cluster=L* --nodes=*.example.com
    
  • RHEV 3.3 and above:

      # engine-log-collector --cluster=L* --hosts=*.example.com
    
  • RHEV 3.0/3.1/3.2:

      # rhevm-log-collector collect --cluster=L* --hosts=*.example.com
    
  • RHV 4:

      # ovirt-log-collector --no-hypervisors
      or
      # sos-collector -c rhv.no-hypervisors
    
  • RHEV 3.3 to 3.6:

      # engine-log-collector --no-hypervisors
    
  • RHEV 3.0/3.1/3.2:

      # rhevm-log-collector collect --no-hypervisors
    

Appendix

For more information about the sos-collector utility, please see How do I collect an sosreport from multiple nodes at the same time? or the man page for the package:

  • RHV 4.0+/RHEL 7.6+: man sos-collector

For more information about the log collector utility please see the man pages or visit the tech brief:

  • RHEV 3.0/3.1/3.2: man rhevm-log-collector
  • RHEV 3.3 and above: man engine-log-collector

Additionally, a RHEV-M database dump can be collected separately if that is all that's needed.

NOTE: A Request for Feature Enhancement (RFE) has been filed to enable the log collector to prompt the user to attach it to a support case or upload it to Red Hat's FTP dropbox. This request is being tracked in a private This content is not included.Red Hat Bug #877575. For more information about this RFE, please contact Red Hat Support.

Components
Category

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.