I have the following config that I generate as part of user data for my EC2 instance
{
"agent": {
"run_as_user": "root"
},
"logs": {
"logs_collected": {
"files": {
"collect_list": [
{
"file_path": "/var/log/hapee-2.0/lb-access*",
"log_group_name" : <insert-region-here>
"log_stream_name": "haproxy-{instance_id}"
}
]
}
}
},
"metrics": {
"metrics_collected": {
"net": {
"measurement": [
"net_packets_recv",
"net_packets_sent"
],
"metrics_collection_interval": 60
},
"mem": {
"measurement": [
"used_percent"
]
}
}
}
}
As the log_group_name
I want to be able to append the region
that the instance is running in. I understand that the region is part of the instance meta data but can I use it in the cloudwatch config?