Closed atackett closed 7 years ago
One thing to add for anyone looking to fix. If you're seeing 400 errors in /var/log/collectd.log try removing swap--percent-used from: /opt/collectd-plugins/cloudwatch/config/whitelist.conf
Then restart collectd. If you have SELinux in enforcing mode you may have some trouble restarting collectd. If you look in collectd.log you won't see it actually reload.
I don't know SELinux too well so someone may have a better fix here, but to check if this is the problem set SELinux to permissive in /etc/selinux/config and reboot. I had no luck with setenforce 0.
If anyone has an SELinux policy that will play nice with collectd I'm all ears. :)
Updated the title of the issue to include mentioning 400 errors so it might catch more people heading here for help. :)
When installing on a CentOS 7 AMI (behaves the same on RHEL 7.2) which has collectd 5.6 in the repos the setup.py defaults to option 3 on the last step which adds the 4 metrics to the whitelist.
If the machine does not have swap enabled the swap--percent-used causes 400 errors to the API because the plugin tries to send NaN values to CloudWatch.
setup.py should check if swap is even enabled before adding swap to whitelist.