Skip to end of metadata
Go to start of metadata
The purpose of this wiki is to detail how to access DLP's logging solution, AWS CloudWatch.
First Method: AWS Console
AWS Console method is the simplest way to see the logs.
- Log into aws.emory.edu
- Enter netid and password
- Select your proper role for the account, click sign in button
- Go the services tab and type in CloudWatch
- Click on the Logs section on the left panel
- You will be shown the base CloudWatch Logs screen
- From here you will be able to click on logging "groups"
- The groups are organized for the type of logs and the "streams" that comprise a group are the instances in which the logs come from
- Not all groups will have a stream for every instance. For example the fedora_log group doesn't have a stream for curate.library.emory.edu, only for fedora-cor and fedora-cor-test.
- Click on a group then stream. For example, click on curate_production_log then curate.library.emory.edu
- This will show a live feed of curate's rails production log. You can search for terms in the search bar above the live feed and set a preferred time in the upper right corner.
- Scrolling down to the bottom of the feed will refresh the feed and display any new log entries.
Second Method: Awslogs
Awslogs is a python program that retrieve logs from CloudWatch and streams them to a terminal. I believe developers will find this method useful for quickly going through logs. I will briefly go through how to install and run awslogs, please read the full documentation at https://github.com/jorgebastida/awslogs
- Install awslogs via pip
- TKI needs a valid token and AWS_DEFAULT_PROFILE env variable need to be properly set
- Please review the TKI article in this wiki for knowledge about how to do this.
- See what groups are available:
- See what streams are available:
- awslogs streams messages
- This will show available streams for the messages log group. Note that if a stream has been inactive for a few days, it will not be shown here. Go to the AWS console if you want a full list of streams.
- Live feed stream the curate.library production log
- awslogs get curate_production_log curate.library.emory.edu --watch
- ctrl-C will break the feed. Note that you can watch both curate and curate-test if you use ALL in place of curate.library, ie awslogs get curate_production_log ALL --watch
- Get curate.library production logs from the last 2 hours
- awslogs get curate_production_log curate.l* -s2h
- Logs will be streamed to your terminal. the -s2h means 'start at -2 hours ago" it could also be 2 days, weeks or seconds.
- You can use wildcards when referencing streams