cw_agent_config.json 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. {
  2. "agent": {
  3. "metrics_collection_interval": 60,
  4. "run_as_user": "root"
  5. },
  6. "logs": {
  7. "logs_collected": {
  8. "files": {
  9. "collect_list": [
  10. {
  11. "file_path": "/home/ec2-user/amazon-s3-migration-log/*",
  12. "log_group_name": "s3_migrate_group",
  13. "log_stream_name": "cluster-{instance_id}"
  14. },
  15. {
  16. "file_path": "/var/log/cloud-init-output.log",
  17. "log_group_name": "s3_migrate_group",
  18. "log_stream_name": "cloud-init-output-{instance_id}"
  19. }
  20. ]
  21. }
  22. }
  23. },
  24. "metrics": {
  25. "append_dimensions": {
  26. "AutoScalingGroupName": "${aws:AutoScalingGroupName}",
  27. "InstanceId":"${aws:InstanceId}"
  28. },
  29. "metrics_collected": {
  30. "disk": {
  31. "measurement": [
  32. "used_percent"
  33. ],
  34. "metrics_collection_interval": 60,
  35. "resources": [
  36. "*"
  37. ]
  38. },
  39. "mem": {
  40. "measurement": [
  41. "mem_used_percent"
  42. ],
  43. "metrics_collection_interval": 60
  44. },
  45. "netstat": {
  46. "measurement": [
  47. "tcp_established"
  48. ],
  49. "metrics_collection_interval": 60
  50. }
  51. }
  52. }
  53. }