Problem in installing CloudwatchAgent

I am following the screen instruction to install the cloudwatch agent in a AWS linux instance. I got the following error. In one of the configuration step, it asked whether it should use StatsD. If "No" is selected, it proceeded with CollectD. I tried both but still failed. Anyone having this problem?

======== Error Log ========

2018/09/30 19:33:12 I! AmazonCloudWatchAgent Version 1.203420.0.

2018/09/30 19:33:12 E! Error parsing /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.toml, open /usr/share/collectd/types.db: no such file or directory

  • post-author-pic
    Adrian C

    Hi Ken - can you confirm a few things about the circumstances for this? what OS , assuming it was on EC2? or local?

  • post-author-pic
    Ken W

    It was on AWS EC2 instance - Amazon Linux 2 AMI (HVM), SSD Volume Type - ami-04681a1dbd79675a5

  • post-author-pic
    Alex S

    Iḿ facing with the same problem:  open /usr/share/collectd/types.db: no such file or directory  .  Iǘe just installed CloudWatchAgent over a rhel 7

  • post-author-pic
    John M

    And if you search for the error message it points to the aws documentation  which tells to look in logs directory which simply has the same error messages.  I suspect something recently changes in the cloudwatch logs agent.  The recorded video does not even show the questions for StatsD and CollectD.

  • post-author-pic
    Ken W

    FYI. Somehos I got it to work in the later lab by choosing No to StatsD and CollectD and it installed and work accordingly.

  • post-author-pic
    Sekhar R

    i face the same issue. Created mkdir /usr/share/collectd, cd  /usr/share/collectd and touch types.db, after that it's working fine

  • post-author-pic

    Thank you sekhareddy, this was my solution as well.

  • post-author-pic
    Vadim K

    hey Guys, 

    This issue happens because collecd doesn't exist. Some distributives don't have it installed from the box

    > i face the same issue. Created mkdir /usr/share/collectd, cd /usr/share/collectd and touch types.db, after that it's working fine

    The proper solution will be to install collectd daemon into the system:

    sudo apt-get update && sudo apt-get install collectd

  • post-author-pic
    Amazing H

    I faced the same issue on AMI Linux 2 thanks guys.

  • post-author-pic
    Alexandru D

    Hi guys,

    This happened for me too. The EC2 was the one provided by the LinuxAcadamy lab environment (Working with AWS CloudWatch Logs for Incident Response).

    [root@ip-10-0-1-122 bin]# cat /etc/os-release
    NAME="Amazon Linux AMI"
    ID_LIKE="rhel fedora"
    PRETTY_NAME="Amazon Linux AMI 2018.03"

    Solved by installing collectd
    yum update && yum install collectd

  • post-author-pic
    Abhijeet J

    thaks worke for me

    sudo yum install collectd

  • post-author-pic
    Mark R

    I've updated the EC2 configuration to include CollectD. Looks like AWS changed the dependencies of the CloudWatch Agent.

Looking For Team Training?

Learn More