From 23c5224535dd511168280c01e99d4da06fc4ab06 Mon Sep 17 00:00:00 2001 From: meyric Date: Tue, 26 Nov 2024 11:09:20 +0000 Subject: [PATCH] Update logging documentation --- README.md | 2 +- doc/logging.md | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bffe032d5..3c9cbe3a9 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,7 @@ documentation](/doc/hosting.md) on how to obtain this. - [Glossary of business terms](/doc/glossary.md) - [Hosting](/doc/hosting.md) - [Deployment](/doc/deployment-process.md) +- [Logging](/doc/logging.md) - [Environment variables](/doc/environment-variables.md) - [Sending email notifications](/doc/email-notifications.md) - [Use authentication](/doc/authentication.md) @@ -68,7 +69,6 @@ documentation](/doc/hosting.md) on how to obtain this. - [Identifying invalid activities](/doc/utilities.md) - [Background jobs](/doc/background-jobs.md) - [Console access](/doc/console-access.md) -- [Logging](/doc/logging.md) - [DNS](/doc/dns.md) - [Migrations](/doc/migrations.md) diff --git a/doc/logging.md b/doc/logging.md index b83680bdf..0d9248389 100644 --- a/doc/logging.md +++ b/doc/logging.md @@ -1,3 +1,38 @@ # Logging -Logs can be accessed in the AWS ECS ODA clusters, under the ODA services corresponding to the target environment. +Logging is handled by CloudWatch in the DSIT AWS, you will need +a `digital-paas-production-account`, see [hosting +documentation](/doc/hosting.md#getting-an-account) for instructions for obtaining this. + +Once you have access you can find the logs but following these steps: + +- sign in to AWS with your `digital-paas-production-account` account +- assume the role for the appropriate environment, see [hosting + documentation](/doc/hosting.md#assuming-roles) +- Locate _Elastic Container Service_ (ECS) in the services menu +- Click on the cluster +- Click on the service +- Switch to the _Logs_ tab +- Refine the view of the logs + +You can then switch to CloudWatch if desired: + +- Click the _View in CloudWatch_ drop down +- Select the container +- Refine the view of the logs + +## Via CloudWatch + +You can access the container logs directly via CloudWatch, with some additional +steps: + +- sign in to AWS with your `digital-paas-production-account` account +- assume the role for the appropriate environment, see [hosting + documentaiton](/doc/hosting.md#assuming-roles) +- Locate _CloudWatch_ in the services menu +- From the side bar open _Logs_ and click on _Log groups_ +- Locate either the application or worker container for that matches the + environment, e.g. `/ecs/ODA-prod` and `/ecs/ODA-prod-SideCar` for production +- Click on the container +- The logs are split into 'streams' choose a steam or click _Search all log + steams_ and refine