Skip to content

chroto/collectd_to_cloudwatch

 
 

Repository files navigation

collectd_to_cloudwatch

POC of collectd to cloudwatch

  • Usage

  • copy collectd_to_cloudwatch.py where you want (ex /var/lib/collectd/python)

  • copy collectd_to_cloudwatch.conf and collectd_to_cloudwatch.yaml to your collectd.conf includedir configuration (generally /etc/collectd.d/ or /etc/collectd/collectd.d/)

  • edit collectd_to_cloudwatch.conf, define the path to collectd_to_cloudwatch.py and to collectd_to_cloudwatch.yaml and change the region

  • restart collectd

  • Extra configuration

  • By default values will be writed in the namespace "AWS/EC2" you can change it, but it seems to be mandatory for EC2 AutoScaling metrics

  • You can define more plugin/type in collectd_to_cloudwatch.yaml, all defined plugin/type will be send to cloudwatch.

  • collectd_to_cloudwatch.yaml format :

plugin name:
   type name:
     unit: optional default is None. Cloudwatch unit for the plugin/type (must be one of the cloudwatch supported unit, currently : Seconds | Microseconds | Milliseconds | Bytes | Kilobytes | Megabytes | Gigabytes | Terabytes | Bits | Kilobits | Megabits | Gigabits | Terabits | Percent | Count | Bytes/Second | Kilobytes/Second | Megabytes/Second | Gigabytes/Second | Terabytes/Second | Bits/Second | Kilobits/Second | Megabits/Second | Gigabits/Second | Terabits/Second | Count/Second | None)
     # optional :
     type-instance:
        type-intance1-name: Cloudwatch unit for the plugin/type/type-instance
        type-intance2-name: Cloudwatch unit for the plugin/type/type-instance
  • Needed IAM policy on each EC2 instances
{
  "Statement":[{
    "Resource":"*",
    "Action":[
      "cloudwatch:Get*",
      "cloudwatch:Put*",
      "ec2:Describe*"
    ],
    "Effect":"Allow"
  }]
}

About

This collectd plugin allow to write into cloudwatch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%