Skip to content

Commit

Permalink
added the relevant logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tajewole-moj committed Oct 11, 2023
1 parent 6f9d504 commit f45b9df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 2 additions & 6 deletions terraform/environments/apex/cloudwatch_agent_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,8 @@
"files": {
"collect_list": [
{
"file_path": "/u01/app/oracle/diag/rdbms/apex_a/APEX/trace/alert_APEX.log",
"log_group_name": "${local.application_name}-DB-alert-log"
},
{
"file_path": "/home/oracle/logs/pmon_status_alert.log",
"log_group_name": "${local.application_name}-pmon-status-alert-log"
"file_path": "/var/log/messages",
"log_group_name": "${local.application_name}-EC2"
}
]
}
Expand Down
4 changes: 0 additions & 4 deletions terraform/environments/apex/ec2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ echo "${aws_efs_file_system.efs.dns_name}:/ /backups nfs4 rsize=1048576,wsize=10
mount -a
# Setting up CloudWatch Agent
mkdir cloudwatch_agent
cd cloudwatch_agent
wget https://s3.amazonaws.com/amazoncloudwatch-agent/redhat/amd64/latest/amazon-cloudwatch-agent.rpm
rpm -U ./amazon-cloudwatch-agent.rpm
echo '${data.local_file.cloudwatch_agent.content}' > cloudwatch_agent_config.json
/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:cloudwatch_agent_config.json
EOF
Expand Down

0 comments on commit f45b9df

Please sign in to comment.