Public Repository

Last pushed: 3 months ago
Short Description
Send data to CloudWatch using AWS CloudMonitoring Script Perl Optimized for CoreOS EC2
Full Description

This currently supports the mon-put-instance-data.pl
I don't recommend to use AWS credentials. You need to add in your EC2 instance role, a policy to be able to send data to CloudWatch this is the policy to be added in your policy list:

{
    "Action": "cloudwatch:PutMetricData",
    "Resource": "*",
    "Effect": "Allow"
}

Here's an example configuration in Kubernetes. This should run as a DaemonSet. So that for every instance it will be deployed.

apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: kube-utils-aws-mon
  namespace: kube-system
spec:
  template:
    metadata:
      labels:
        k8s-app: kube-aws-mon
    spec:
      dnsPolicy: Default
      containers:
      - name: kube-aws-mon
        image: billyteves/kube-utils-aws-mon:1.0.0
        imagePullPolicy: Always
        env:
        - name: MONPUTCRONTIME
          value: "* * * * *"
        - name: MONPUTPARAMS
          value: " --mem-util --mem-used --mem-used-incl-cache-buff --memory-units=megabytes --swap-util --swap-used "
      terminationGracePeriodSeconds: 30

The value of MONPUTCRONTIME and MONPUTPARAMS are dynamic, it uses confd for configuration. So when you try to create this daemon, and you modified the default values, it will automatically reflected inside the kube-utils-aws-mon container. :)

For more information on how to use mon-put-instance-data.pl visit this link: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mon-scripts.html

Docker Pull Command
Owner
billyteves

Comments (0)