README.md 1.34 KB
Newer Older
Alex Tayts's avatar
Alex Tayts committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
CloudWatch Module
=================

Installs Amazon CloudWatch Agent. Relies on the availability of the package in some 
available repo, does not download it from Amazon.

Configuration file is generated from hiera directly converting hiera YAML to 
configuration file's JSON. The default is to return the information only about memory.

The default configuration in hiera:

```yaml
cloudwatch::settings:
  agent:
    metrics_collection_interval: 60
    run_as_user: root
  metrics:
    append_dimensions:
      AutoScalingGroupName: '${aws:AutoScalingGroupName}'
      ImageId: '${aws:ImageId}'
      InstanceId: '${aws:InstanceId}'
      InstanceType: '${aws:InstanceType}'
    metrics_collected:
      mem:
        measurement:
          - 'mem_used_percent'
        metrics_collection_interval: 60
```

is converted to JSON in `/opt/aws/amazon-cloud-agent/bin/config.json`:

```json
{
  "agent": {
    "metrics_collection_interval": 60,
    "run_as_user": "root"
  },
  "metrics": {
    "append_dimensions": {
      "AutoScalingGroupName": "${aws:AutoScalingGroupName}",
      "ImageId": "${aws:ImageId}",
      "InstanceId": "${aws:InstanceId}",
      "InstanceType": "${aws:InstanceType}"
    },
    "metrics_collected": {
      "mem": {
        "measurement": [
          "mem_used_percent"
        ],
        "metrics_collection_interval": 60
      }
    }
  }
}
```