Bug 1788874
Summary: | [RFE] Please,add information regarding collectd plugins to the SOS report. | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Leonid Natapov <lnatapov> |
Component: | sos | Assignee: | Pavel Moravec <pmoravec> |
Status: | CLOSED ERRATA | QA Contact: | Maros Kopec <makopec> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 8.1 | CC: | agk, bmr, mhradile, mrunge, oblaut, pkilambi, plambri, sbradley |
Target Milestone: | rc | Keywords: | FutureFeature |
Target Release: | 8.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | sos-3.9.1-1.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-11-04 01:57:52 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Leonid Natapov
2020-01-08 09:41:27 UTC
collectd config is located in /etc/collectd.d/ and /etc/collectd.conf. Not sure if we need a plugin for this. We already have collectd plugin: https://github.com/sosreport/sos/blob/master/sos/plugins/collectd.py that should collect the config file and dir. Why it does not work in OpenStack? Could you try: sosreport -o collectd ? Further, what package (or file or kernel module) should trigger automatic enabling of the plugin? Currently the plugin is automatically enabled iff collectd package is present - is the package named differently on OSP? (In reply to Pavel Moravec from comment #2) > We already have collectd plugin: > > https://github.com/sosreport/sos/blob/master/sos/plugins/collectd.py > > that should collect the config file and dir. Why it does not work in > OpenStack? > > Could you try: > > sosreport -o collectd > > ? > > Further, what package (or file or kernel module) should trigger automatic > enabling of the plugin? Currently the plugin is automatically enabled iff > collectd package is present - is the package named differently on OSP? Hey Pavel, thanks for reply. Does it collect also collectd.log file? COllectd enabled by enabling specific template in overcloud deploy. The name of the template varies between different OSP versions. (In reply to Leonid Natapov from comment #3) > (In reply to Pavel Moravec from comment #2) > > We already have collectd plugin: > > > > https://github.com/sosreport/sos/blob/master/sos/plugins/collectd.py > > > > that should collect the config file and dir. Why it does not work in > > OpenStack? > > > > Could you try: > > > > sosreport -o collectd > > > > ? > > > > Further, what package (or file or kernel module) should trigger automatic > > enabling of the plugin? Currently the plugin is automatically enabled iff > > collectd package is present - is the package named differently on OSP? > > Hey Pavel, > thanks for reply. > Does it collect also collectd.log file? Hello, no, just config file and dir are collected, see https://github.com/sosreport/sos/blob/master/sos/plugins/collectd.py#L24-L27 > COllectd enabled by enabling specific template in overcloud deploy. The name > of the template varies between different OSP versions. So how can sosreport identify it should collect collectd-related data? By presence of some package? Or some file? Or some kernel module loaded? Or some service running? Or some path is an executable file? collectd container should be running. if collectd container is running there will be /var/log/containers/collectd/collectd.log on overcloud nodes. (In reply to Pavel Moravec from comment #4) > (In reply to Leonid Natapov from comment #3) > > (In reply to Pavel Moravec from comment #2) > > > We already have collectd plugin: > > > > > > https://github.com/sosreport/sos/blob/master/sos/plugins/collectd.py > > > > > > that should collect the config file and dir. Why it does not work in > > > OpenStack? > > > > > > Could you try: > > > > > > sosreport -o collectd > > > > > > ? > > > > > > Further, what package (or file or kernel module) should trigger automatic > > > enabling of the plugin? Currently the plugin is automatically enabled iff > > > collectd package is present - is the package named differently on OSP? > > > > Hey Pavel, > > thanks for reply. > > Does it collect also collectd.log file? > > Hello, > no, just config file and dir are collected, see > > https://github.com/sosreport/sos/blob/master/sos/plugins/collectd.py#L24-L27 > > > COllectd enabled by enabling specific template in overcloud deploy. The name > > of the template varies between different OSP versions. > > So how can sosreport identify it should collect collectd-related data? By > presence of some package? Or some file? Or some kernel module loaded? Or > some service running? Or some path is an executable file? collectd container should be running. if collectd container is running there will be /var/log/containers/collectd/collectd.log on overcloud nodes. OK, so when /var/log/containers/collectd/collectd.log file will be present (with this hardcoded path, or with a sysroot prefix as in container?), sosreport will enable collectd plugin that will collect configs and this logfile. Am I right? on the baremetal machine, logs are located in /var/log/containers/collectd, the config is under /var/lib/config-data/collectd (and then ./etc/collectd.conf and ./etc/collectd.d/*) That is true for all openstack nodes, if collectd is enabled. Ah I misunderstood something: collectd runs on a bare metal or VM, but not in a container (I thought the other way). And one can detect so by either presence of the log file, or that collectd container is running - something we can somehow check as well, but not in such a straightforward way. So does this change help? # diff -rup /usr/lib/python3.6/site-packages/sos/plugins/collectd.py.orig /usr/lib/python3.6/site-packages/sos/plugins/collectd.py --- /usr/lib/python3.6/site-packages/sos/plugins/collectd.py.orig 2020-01-13 17:53:59.221893418 +0100 +++ /usr/lib/python3.6/site-packages/sos/plugins/collectd.py 2020-01-13 17:55:01.391310765 +0100 @@ -19,11 +19,13 @@ class Collectd(Plugin, RedHatPlugin, Deb profiles = ('services', 'webserver') packages = ('collectd',) + files = ('/var/log/containers/collectd/collectd.log') def setup(self): self.add_copy_spec([ '/etc/collectd.conf', '/etc/collectd.d/*.conf', + '/var/log/containers/collectd/collectd.log' ]) p = re.compile('^LoadPlugin.*') # ? collectd runs inside a container, but you can access the files from outside, as described above. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (sos bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2020:4534 |