Logging and Monitoring with GameLift
0
Hi!
I've read https://docs.aws.amazon.com/gamelift/latest/developerguide/monitoring-overview.html and have a couple of questions. Maybe I've missed something in the documentation (I am a quite newbie in AWS GameLift), so if there is an existing link for the solution - please share it with me :) I am mostly interested in GameLift-managed instances. I hope such things is possible to do with it instead of using custom EC2 + FleetIQ.
- According to the documentation, game session logs are available only after finishing the session. Is there any existing solution or workaround for getting game session logs in real-time? Via additional configuration of something like that.
- GameLift provides a set of existing metrics, which are available in CloudWatch. Can I provide anyhow my own custom metrics from my binaries? E.g. via Prometheus-compatible endpoint, which will be regularly pulled by something (or push like Prometheus Push Gateway). I didn't find much information in the documentation. Also configuring alerts based on the metrics is quite important.
I need to mention that I am quite new to CloudWatch and CloudTrail, so I can miss some basic patterns.
Thanks in advance!
P.S. @REDACTEDUSER
Topics
Tags
asked a year ago5 views
1 Answers
0
- Realtime logs (e.g. from GameLift instances directly to CloudWatch) is not officially supported by Amazon GameLift yet, though it is a highly requested feature and is tracked in our worklog. However, you can implement your own realtime logging solution, and the recommended approach is to use CloudWatch agent. GameLift Solutions Architect has already provided an example on how to set it up: https://github.com/aws-samples/aws-gamelift-and-serverless-backend-sample/blob/master/LinuxServerBuild/install.sh#L4. Essentially, on each instance startup, you can run a daemon that watches targeted log files and periodically pushes logs to your account's CloudWatch by providing the IAM role.
- You should be able achieve that with CloudWatch agent as well (https://aws.amazon.com/about-aws/whats-new/2018/09/amazon-cloudwatch-agent-adds-custom-metrics-support/), or you could potentially include the AWS SDK in your game server and call CloudWatch::putMetricData directly. NOTE: you'll need to pass your IAM role during fleet creation so the EC2 instances can assume your IAM role to put metrics into the CloudWatch on your account. See https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html
No problem! Glad to help
answered a year ago
Relevant questions
General questions regarding RDS SQL Server Read Replicas
Accepted Answerasked 2 years agoGamelift architecture design and prices
Accepted Answerasked 2 years agoLogging and Monitoring with GameLift
asked a year agoDifference and relationship between CloudWatch "monitoring type" and "metric resolution"
asked 3 months agoGameLift Plug-in for Unity now available
asked 10 months agoGamelift and game state management?
Accepted Answerasked 2 years agoGetting GameLift Client setup with Unreal for Flexmatch
asked 3 years agoDifferences between C++ and C# AWS GameLift Server SDK
asked a year agoGameLift adds SIX new regions and easier Fleets management with Multi-Region Fleets
asked a year agoRunning container-based games on GameLift
Accepted Answerasked 8 months ago