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
    09-30-2018

    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
    10-02-2018

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

  • post-author-pic
    Alex S
    10-03-2018

    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
    10-06-2018

    And if you search for the error message it points to the aws documentation   https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/troubleshooting-CloudWatch-Agent.html  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
    10-08-2018

    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
    10-12-2018

    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
    devopstrek
    10-25-2018

    Thank you sekhareddy, this was my solution as well.

  • post-author-pic
    Vadim K
    11-08-2018

    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
    11-18-2018

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

  • post-author-pic
    Alexandru D
    11-24-2018

    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"
    VERSION="2018.03"
    ID="amzn"
    ID_LIKE="rhel fedora"
    VERSION_ID="2018.03"
    PRETTY_NAME="Amazon Linux AMI 2018.03"
    ANSI_COLOR="0;33"
    CPE_NAME="cpe:/o:amazon:linux:2018.03:ga"
    HOME_URL="http://aws.amazon.com/amazon-linux-ami/"

    Solved by installing collectd
    yum update && yum install collectd

  • post-author-pic
    Abhijeet J
    12-09-2018

    thaks worke for me

    sudo yum install collectd


  • post-author-pic
    Mark R
    01-18-2019

    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