Last active
December 5, 2020 05:42
-
-
Save alsantos123/86f8d39c04ada4ea6283f82c589d87c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "agent": { | |
| "run_as_user": "cwagent", | |
| "metrics_collection_interval": 300 | |
| }, | |
| "metrics": { | |
| "metrics_collected": { | |
| "mem": { | |
| "measurement": ["mem_used_percent"] | |
| }, | |
| "swap": { | |
| "measurement": ["used_percent"] | |
| }, | |
| "disk": { | |
| "measurement": ["used_percent"], | |
| "resources": ["/"] | |
| }, | |
| "processes": { | |
| "measurement": ["total", "wait", "zombies"] | |
| } | |
| }, | |
| "append_dimensions": { | |
| "ImageId": "${aws:ImageId}", | |
| "InstanceId": "${aws:InstanceId}", | |
| "InstanceType": "${aws:InstanceType}", | |
| "AutoScalingGroupName": "${aws:AutoScalingGroupName}" | |
| } | |
| }, | |
| "logs": { | |
| "logs_collected": { | |
| "files": { | |
| "collect_list": [{ | |
| "file_path": "/var/log/syslog.log", | |
| "log_group_name": "ec2_syslog.log", | |
| "log_stream_name": "ec2_syslog" | |
| }, | |
| { | |
| "file_path": "/var/log/nginx/error.log", | |
| "log_group_name": "ec2_nginx_error.log", | |
| "log_stream_name": "ec2_nginx_error" | |
| } | |
| ] | |
| } | |
| }, | |
| "log_stream_name": "EC2" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment