Search code examples
amazon-web-servicesamazon-elastic-beanstalkaws-xray

Where to find X-Ray daemon initialisation messages in Elasticbeanstalk logs


Trying to monitor if the X-Ray daemon has successfully started.

There are no X-Ray daemon messages in the container logs in eb-docker/containers/eb-current-app/x.log

Is there another log that would contain it?


Solution

  • The docs below describe where the X-Ray logs will be - mostly in stdout

    https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.cloudwatchlogs.html

    However if you go through the EB console and download the full logs, you end up with a zip that is shaped like this (NodeJS application)

    └── log
       ├── cfn-hup.log
       ├── cfn-init-cmd.log
       ├── cfn-init.log
       ├── cfn-wire.log
       ├── cloud-init-output.log
       ├── cloud-init.log
       ├── cron
       ├── docker
       ├── docker-events.log
       ├── eb-cfn-init-call.log
       ├── eb-cfn-init.log
       ├── eb-docker
       |  └── containers
       |     └── eb-current-app
       |        └── eb-00000-stdouterr.log
       ├── eb-docker-process.log
       ├── eb-engine.log
       ├── eb-publish.log
       ├── eb-tools.log
       ├── healthd
       |  └── daemon.log
       ├── messages
       ├── nginx
       |  ├── access.log
       |  ├── error.log
       |  └── rotated
       └── yum.log
    

    From the docs one would expect /logs/eb-docker/containers/eb-current-app/ to also contain an stdout log.

    From the above tree view that is missing.

    However we can find some x-ray service logs inside log/eb-engine.log. This can help to highlight if the X-Ray service is running or not.

    The actual X-Ray daemon logs are posted in /log/nessages and can confirm if the daemon has started or now.

    {date} {ip} systemd: Starting AWS X-Ray Daemon...
    {date} {ip} systemd: Started AWS X-Ray Daemon.