1 Respuesta
- Más nuevo
- Más votos
- Más comentarios
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.
respondido hace 3 años
Contenido relevante
- ¿Cómo puedo solucionar una advertencia de estado amarillo o rojo en mi entorno de Elastic Beanstalk?OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace un año
- ¿Cómo puedo transferir variables de mi entorno de Elastic Beanstalk a instancias de Linux y Windows?OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace 24 días