Skip to content

collectd integration fails on RHEL 8 #29

@kcresanti

Description

@kcresanti

Hi there,

collectd-CloudWatch integration appears to be failing on RHEL 8 due to a ModuleNotFoundError. The plugin cloudwatch_writer.py doesn't seem to be compatible with python3, which comes native with RHEL 8 EC2 instances.

When I run the cloudwatch-agent playbook, I get the following error message:

fatal: FAILED! => {"changed": false, "msg": "Unable to start service collectd: Job for collectd.service failed because the control process exited with error code.\nSee \"systemctl status collectd.service\" and \"journalctl -xe\" for details.\n"}

systemctl status collectd.service returns the following:

collectd.service - Collectd statistics daemon
   Loaded: loaded (/usr/lib/systemd/system/collectd.service; enabled; vendor pr>
   Active: failed (Result: exit-code) since Fri 2020-07-31 21:19:58 UTC; 7min a>
     Docs: man:collectd(1)
           man:collectd.conf(5)
  Process: 18456 ExecStart=/usr/sbin/collectd (code=exited, status=1/FAILURE)
 Main PID: 18456 (code=exited, status=1/FAILURE)

From /var/log/collectd.log:

$ tail /var/log/collectd.log 
[2020-07-31 21:19:59] [info] plugin_load: plugin "tcpconns" successfully loaded.
[2020-07-31 21:19:59] [info] plugin_load: plugin "python" successfully loaded.
[2020-07-31 21:19:59] [error] python plugin: Error importing module "cloudwatch_writer".
[2020-07-31 21:19:59] [error] Unhandled python exception in importing module: ModuleNotFoundError: No module named 'configreader'
[2020-07-31 21:19:59] [error] Traceback (most recent call last):
[2020-07-31 21:19:59] [error]   File "/opt/collectd-plugins/cloudwatch_writer.py", line 12, in <module>
    from cloudwatch.modules.configuration.confighelper import ConfigHelper
[2020-07-31 21:19:59] [error]   File "/opt/collectd-plugins/cloudwatch/modules/configuration/confighelper.py", line 3, in <module>
    from configreader import ConfigReader
[2020-07-31 21:19:59] [error] ModuleNotFoundError: No module named 'configreader'

I managed to resolve the issue by pulling down this PR: awslabs/collectd-cloudwatch#91.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions