1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
It turns out that even though the Elastic Beanstalk web console is showing my setup as having an nginx proxy, for multicontainer docker + docker compose, it doesn’t use an Elastic Beanstalk proxy, so I needed to have my own nginx container report this information.
There is helpful info in these:
- How to generally have container logs mounted properly: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker.container.console.html#docker-env-cfg.healthd-logging
- How to set up your own nginx to log in the right format: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-serverlogs.html#health-enhanced-serverlogs.configure
After all that I had my own nginx logging healthd info to NGINXDIR="/var/log/eb-docker/containers/nginx/healthd"
and an empty directory HEALTHDDIR="/var/log/nginx/healthd"
, so I created an .ebextensions script that:
- Does
mkdir -p "$NGINXDIR" && chmod 777 "$NGINXDIR"
(would love to hear advice on a tighter perms and/or user/group owners for that directory) - Sets up a symlinks in the HEALTHDDIR pointing to my NGINXDIR:
if [ -L "$HEALTHDDIR" ]; then
echo "is symlink: $HEALTHDDIR"
else
mv "$HEALTHDDIR" "$BACKUPDIR"
echo "moved $HEALTHDDIR to $BACKUPDIR"
ln -s "$NGINXDIR" "$HEALTHDDIR"
echo "linked $NGINXDIR to $HEALTHDDIR"
fi
Seems to be working now and I’m now seeing data in the “Nxx Responses” and “PNN Latency” columns, which are reading from the last 10 seconds and updating regularly.
répondu il y a 2 ans
Contenus pertinents
- Réponse acceptéedemandé il y a un an
- demandé il y a 6 mois
- demandé il y a un an
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 9 mois
- AWS OFFICIELA mis à jour il y a 8 mois
- AWS OFFICIELA mis à jour il y a un an