Closed scott-wood-vgh closed 7 years ago
Hi Scott, We need to first rule out whether the problem is from the collection (collectd side of things) or publication.
Few things to try to narrow down the problem:
@scott-wood-vgh did you figure this out in the end? I'm also trying to send collectd metrics via the exec plugin to CloudWatch and I'm really struggling. Can't find enough info in the documentation
for those who found this page while troubleshooting issue with cloudwatch agent and collectd exec plugin. Don't use "echo" with "-n" parameter, it breaks cwagent data delivery for some reason. So the line should look like that:
echo "PUTVAL \"${HOSTNAME}/$SERVICE_NAME/gauge-tomcat_status\" interval=${INTERVAL} N:$ALARM_STATUS"
I've written a short Bash script (below) to get the status of the Tomcat7 service on a box, and return a 1 if it is running, or a 0 if it isn't (ALARM_STATUS). The script resides in /home/ubuntu/tomcat_status.sh and is owned by the ubuntu user:
Here is my whitelist.conf (processes, load and df-percent_bytes-used data is all sending successfully to CloudWatch):
and the relevant part of collectd.conf:
Am I doing something wrong? I don't see any errors in the logfile, but nor do I see the data I expect getting pushed to CloudWatch. I've been in contact with AWS Support, and so far, they too are mystified and able to reproduce my problem on their end. Does the CloudWatch plugin support pushing metrics via Exec plugin/PUTVAL statement?