amazon-cloudwatch-user-guide icon indicating copy to clipboard operation
amazon-cloudwatch-user-guide copied to clipboard

Error parsing /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.toml, open /usr/share/collectd/types.db: no such file or directory

Open aksharj opened this issue 6 years ago • 20 comments

Hi All,

I see this issue when i am trying to configure the AWS Cloud watch agent Version 1.246396.0.

2020/08/17 12:18:05 I! AmazonCloudWatchAgent Version 1.246396.0.
2020/08/17 12:18:05 E! Error parsing /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.toml, open /usr/share/collectd/types.db: no such file or directory

any help on where i can find a fix for this in the documentation will be really helpful. Many Thanks.

aksharj avatar Aug 17 '20 12:08 aksharj

I don't see the collectd folder. How were we supposed to get this installed? I don't see it in any of the tutorials and quickstarts?

TBomberman avatar Sep 04 '20 00:09 TBomberman

I found the answer, it's really garbage. The wizard assumes you have collectD installed. All I did was when the wizard is running, say no when it asks you a collectd question.

TBomberman avatar Sep 04 '20 00:09 TBomberman

I just got the same error.

@TBomberman is right. Alternatively, if you intended to use collected, you can create the missing folder and the types.db file in it.

mkdir -p /usr/share/collectd/
touch /usr/share/collectd/types.db

After that, the agent will start correctly.

kevinrambaud avatar Sep 06 '20 19:09 kevinrambaud

You should install collectD in your VM. On Ubuntu sudo apt install collectd

MTA1711 avatar Sep 22 '20 16:09 MTA1711

And the the wizard should check for existence of installed dependencies.

TBomberman avatar Sep 22 '20 18:09 TBomberman

install collectd

https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-custom-metrics-collectd.html

sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y collectd

jhaoheng avatar Nov 03 '20 05:11 jhaoheng

And the the wizard should check for existence of installed dependencies.

Agreed.

hwhitfield2 avatar Dec 30 '20 06:12 hwhitfield2

Why collectd is pulling xserver?

I don't want to have xserver on a server. xD

Thanks for the help! I could run the agent after installing collectd, but it pulled 1GB of dependencies.

mercuriete avatar Jan 20 '21 13:01 mercuriete

Another simpler method is to delete "collectd" section in your agent configuration json file, if you don't need collectd. collectd is only for advanced monitoring.

sy-github avatar Mar 14 '21 23:03 sy-github

@sy-github I want collectd but in my humble opinion collectd should not pull 1GB of dependencies. I mean... Xorg server it should not be installed on servers.

Anyways, I am not working on that project and we are evaluating migrating to EKS or another orchestration system. Thanks for your answer.

mercuriete avatar Mar 15 '21 09:03 mercuriete

@kevinrambaud

Try one :

mkdir -p /usr/share/collectd/
touch /usr/share/collectd/types.db

Not working .

Try two : Removed collectd related configuration from cloud-watch agent configuration . Not working as it's always expecting it and showing the collectd section is missing .

Try Three : RUN apt install collectd or RUN apt-get install collectd

Not worked , installation package not found .

Note : I am using : FROM python:3.7.0

asraful avatar Jul 01 '21 19:07 asraful

I found the answer, it's really garbage. The wizard assumes you have collectD installed. All I did was when the wizard is running, say no when it asks you a collectd question.

I agree @TBomberman it would be helpful if the wizard indicated that collectd must be installed before the agent will start.

stevebanik avatar Jul 14 '21 17:07 stevebanik

It would also be nice if the wizard tells that you need to import the config file with special parameters... I've searched for days in the docs and eventually found this: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/troubleshooting-CloudWatch-Agent.html#CloudWatch-Agent-troubleshooting-update-no-new-metrics

You need to import the configuration manually using:

sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -s -m ec2 -c file:configuration-file-path

This is never mentioned, also never mentioned in the install guide, nowhere.

SherinBloemendaal avatar Sep 07 '21 11:09 SherinBloemendaal

In our company we drop the usage of EC2 instances and we started to use EKS with EKS container insights. https://docs.aws.amazon.com/es_es/AmazonCloudWatch/latest/monitoring/Container-Insights-metrics-EKS.html

In the end the eks node groups are EC2 as well but the cloud watch agents are easy to install if you use a terraform module like this: https://github.com/Young-ook/terraform-aws-eks/tree/main/modules/container-insights

You will think everything is more complex but in reality everything is easier and easier to mantain.

Sorry for this out-topic post but I want to help people hitting this issue.

mercuriete avatar Sep 07 '21 12:09 mercuriete

@kevinrambaud Your comment really help me.

ashishamway avatar Nov 18 '21 08:11 ashishamway

I just got the same error.

@TBomberman is right. Alternatively, if you intended to use collected, you can create the missing folder and the types.db file in it.

mkdir -p /usr/share/collectd/
touch /usr/share/collectd/types.db

After that, the agent will start correctly.

Thanks @kevinrambaud

OneideLuizSchneider avatar Feb 22 '22 16:02 OneideLuizSchneider

mkdir -p /usr/share/collectd/ touch /usr/share/collectd/types.db

This worked for me. Thanks so much!

sumitNITS avatar May 12 '22 07:05 sumitNITS

when you downloaded SSM Agent package from S3, /collectd/types.db was not included sudo yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm Try this: sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm sudo yum install -y collectd

chiqn avatar Jun 07 '22 10:06 chiqn

This worked for me

mkdir -p /usr/share/collectd/ touch /usr/share/collectd/types.db

This worked for me. Thanks so much!

haazy avatar Oct 29 '22 05:10 haazy

Closing this issue or pull request in advance of archiving this repo. For more information about the decision to archive this repo (and others in the 'awsdocs' org), see the announcement on the AWS News Blog.

joshbean avatar Jun 15 '23 22:06 joshbean