Skip to content

Commit

Permalink
fixup! [u] Send GitLab host logs to CloudWatch (#3894)
Browse files Browse the repository at this point in the history
  • Loading branch information
achave11-ucsc committed May 24, 2023
1 parent eb41499 commit 051811d
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions terraform/gitlab/gitlab.tf.json.template.py
Original file line number Diff line number Diff line change
Expand Up @@ -1559,15 +1559,24 @@ def qq(*words):
'collect_list': [
{
'file_path': path,
'log_group_name': '/aws/cwagent/azul-gitlab',
'log_stream_name':
path
if not path.endswith('*.log')
else
path.replace('*', 'reconfigure')
'log_group_name': '${aws_cloudwatch_log_group.gitlab_cwagent.name}',
'log_stream_name': path.replace('*', '?')
}
for path in
[
f'/var/log/{file}'
for file in
[
'amazon/ssm/amazon-ssm-agent.log',
'audit/audit.log',
'cloud-init.log',
'cron',
'maillog',
'messages',
'secure'
]

] + [
f'/mnt/gitlab/logs/{file}.log'
for file in
[
Expand All @@ -1582,7 +1591,7 @@ def qq(*words):
# reconfigure logs (name based on UNIX timestamp of when
# reconfigure initiated). Only the most recent file, by
# modification time, matching the wildcard is collected.
'reconfigure/*.log'
'reconfigure/*'
]
] + [
f'/mnt/gitlab/logs/gitlab-rails/{file}.log'
Expand All @@ -1601,18 +1610,6 @@ def qq(*words):
'production',
'sidekiq_client'
]
] + [
f'/var/log/{file}'
for file in
[
'amazon/ssm/amazon-ssm-agent.log',
'audit/audit.log',
'cloud-init.log',
'cron',
'maillog',
'messages',
'secure'
]
]
]
}
Expand Down

0 comments on commit 051811d

Please sign in to comment.