# create configmap for cwagent config
apiVersion: v1
kind: ConfigMap
metadata:
  name: cwagentconfig
  namespace: amazon-cloudwatch
data:
  cwagentconfig.json: |
    {
      "metrics": {
        "metrics_collected": {
          "cpu": {
            "measurement": [
              "cpu_usage_idle"
            ],
            "metrics_collection_interval": 10,
            "resources": [
              "*"
            ],
            "totalcpu": true
          },
          "disk": {
            "measurement": [
              "used_percent"
            ],
            "metrics_collection_interval": 10,
            "resources": [
              "*"
            ]
          },
          "diskio": {
            "measurement": [
              "write_bytes",
              "read_bytes",
              "writes",
              "reads"
            ],
            "metrics_collection_interval": 10,
            "resources": [
              "*"
            ]
          },
          "mem": {
            "measurement": [
              "mem_used_percent"
            ],
            "metrics_collection_interval": 10
          },
          "net": {
            "measurement": [
              "bytes_sent",
              "bytes_recv",
              "packets_sent",
              "packets_recv"
            ],
            "metrics_collection_interval": 10,
            "resources": [
              "*"
            ]
          },
          "swap": {
            "measurement": [
              "swap_used_percent"
            ],
            "metrics_collection_interval": 10
          }
        }
      }    
    }
