Error parsing /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.toml, open /usr/share/collectd/types.db: no such file or directory
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.
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?
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 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.
You should install collectD in your VM. On Ubuntu sudo apt install collectd
And the the wizard should check for existence of installed dependencies.
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
And the the wizard should check for existence of installed dependencies.
Agreed.
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.
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 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.
@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
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.
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.
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.
@kevinrambaud Your comment really help me.
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.dbfile in it.mkdir -p /usr/share/collectd/ touch /usr/share/collectd/types.dbAfter that, the agent will start correctly.
Thanks @kevinrambaud
mkdir -p /usr/share/collectd/ touch /usr/share/collectd/types.db
This worked for me. Thanks so much!
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
This worked for me
mkdir -p /usr/share/collectd/ touch /usr/share/collectd/types.db
This worked for me. Thanks so much!
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.