Created
June 15, 2020 17:22
-
-
Save libert-xyz/2048cad21d438d4ede9f352fbf8ab5e6 to your computer and use it in GitHub Desktop.
CloudWatch Unified Agent to collect httpd logs and metrics
This file contains 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": { | |
"metrics_collection_interval": 60, | |
"run_as_user": "root" | |
}, | |
"logs": { | |
"logs_collected": { | |
"files": { | |
"collect_list": [ | |
{ | |
"file_path": "/var/log/httpd/access_log", | |
"log_group_name": "access_log", | |
"log_stream_name": "{instance_id}" | |
}, | |
{ | |
"file_path": "/var/log/httpd/error_log", | |
"log_group_name": "error_log", | |
"log_stream_name": "{instance_id}" | |
} | |
] | |
} | |
} | |
}, | |
"metrics": { | |
"append_dimensions": { | |
"AutoScalingGroupName": "${aws:AutoScalingGroupName}", | |
"ImageId": "${aws:ImageId}", | |
"InstanceId": "${aws:InstanceId}", | |
"InstanceType": "${aws:InstanceType}" | |
}, | |
"metrics_collected": { | |
"collectd": { | |
"metrics_aggregation_interval": 60 | |
}, | |
"disk": { | |
"measurement": [ | |
"used_percent" | |
], | |
"metrics_collection_interval": 60, | |
"resources": [ | |
"*" | |
] | |
}, | |
"mem": { | |
"measurement": [ | |
"mem_used_percent" | |
], | |
"metrics_collection_interval": 60 | |
}, | |
"statsd": { | |
"metrics_aggregation_interval": 60, | |
"metrics_collection_interval": 10, | |
"service_address": ":8125" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment