Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 973539

Summary: [RFE] Give to user option selective collection logs via Log-Collector (SOS) tool
Product: [oVirt] ovirt-log-collector Reporter: vvyazmin <vvyazmin>
Component: RFEsAssignee: Lev Veyde <lveyde>
Status: CLOSED WONTFIX QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: low    
Version: 3.2.0CC: acathrow, bugs, didi, hateya, jkt, lpeer, lsvaty, lveyde, pdwyer, pstehlik, Rhev-m-bugs, sbonazzo, stirabos, ylavi
Target Milestone: ---Keywords: FutureFeature, Reopened
Target Release: ---Flags: ylavi: ovirt-future?
sherold: Triaged+
dnecpal: testing_plan_complete-
rule-engine: planning_ack?
ylavi: devel_ack?
ylavi: testing_ack?
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1304386 (view as bug list) Environment:
Last Closed: 2018-06-12 11:07:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1304386    
Bug Blocks: 971853    

Description vvyazmin@redhat.com 2013-06-12 07:59:57 UTC
Description of problem: 
Give to user option selective collection logs via Log-Collector (SOS) tool

Version-Release number of selected component (if applicable):
RHEVM 3.2 - SF17.1 environment: 

RHEVM: rhevm-3.2.0-11.28.el6ev.noarch 
VDSM: vdsm-4.10.2-21.0.el6ev.x86_64 
LIBVIRT: libvirt-0.10.2-18.el6_4.5.x86_64 
QEMU & KVM: qemu-kvm-rhev-0.12.1.2-2.355.el6_4.3.x86_64 
SANLOCK: sanlock-2.6-2.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. run rhevm-log-collector or sosreport tool

Example from real life:
I have RHEVM environment with 50 hosts installed there.
After I found some bug in my environment, and I had to collect logs and attached them to Bugzilla. 
I used with rhevm-log-collector tool for collect my logs
After 1.5 hour I got zipped file with 3.56 GB size.
  
Actual results:
1. Impossible attached this file to Bugzilla
2. Not all logs are relevant

Expected results:
For example: 
Give to user options collect from host only “vdsm.log” and “libvirtd.log” logs
Give to user options collect logs only last day or last 2 hours.

Impact on user:

Workaround:
Create your own script 

Additional info:

/var/log/ovirt-engine/engine.log

/var/log/vdsm/vdsm.log

Comment 1 Sandro Bonazzola 2013-08-14 11:28:07 UTC

*** This bug has been marked as a duplicate of bug 971853 ***

Comment 2 Yaniv Lavi 2016-01-13 10:55:52 UTC
Should we open a bug on SOS report to support this?

Comment 3 Sandro Bonazzola 2016-02-05 06:55:34 UTC
(In reply to Yaniv Dary from comment #2)
> Should we open a bug on SOS report to support this?

no.

sosreport -o libvirt,vdsm allows to collect only libvirt and vdsm related info.

Currently log-collector is collecting from the hosts the reports from the following plugins:
            "libvirt",
            "vdsm",
            "general",
            "networking",
            "hardware",
            "process",
            "yum",
            "filesys",
            "devicemapper",
            "selinux",
            "kernel",
            "memory",
            "rpm",
            "processor",
            "pci",
            "md",
            "block",
            "scsi",
            "multipath",
            "systemd",
            "sanlock",
            "lvm2",

what's asked here is to provide an additional command line option ( I suggest --only-plugins-hosts to make clear these plugins will be used on hosts) for overriding above list.

I'd suggest to add --log-size as well and forwarding it to hosts sosreport command if provided:
--log-size: Places a global limit on the size of any collected set of logs. The limit is applied separately for each set  of  logs  collected  by  any plugin.

I'd add also a big warning telling that with --log-size the report may not be useful at all and with --only-plugins-hosts collected info may not be enough to understand what happened on the hosts.

Comment 4 Yaniv Kaul 2017-06-07 21:38:37 UTC
I think the only two reasons that we have big logs are:
1. Core dumps. Perhaps we should have the ability to filter them.
2. Many many hypervisors - in this case just don't collect from all. (would be nice to have --spm-only for example)

Comment 6 Yaniv Lavi 2018-06-12 11:07:18 UTC
Closing old RFEs, please reopen if still needed.
Patches are always welcome.