This page describes:
- Home directory
- System logger: syslog
- Rotate your logs with logrotate
- Mongrel logs
- Environment log file
- Nginx logs
- Nginx configuration
- Monit log
- Monit configuration
- Passenger 3 log
- Unicorn log
- Chef recipe logs
Use the following substitutions for illustration:
Username: deploy
Application name: app_name
Environment: production
Home directory
A user home directory is created for you:
/home/deploy
If you look closely, this is actually a symlink to the persistent /data device. Therefore, you can safely store items in the home directory. You will see that your home directory symlinks to:
/data/homedirs/deploy
System logger: syslog
In the syslog
you find system messages, monit restart calls, cron job notifications and various other useful bits of information.
/var/log/syslog
Rotate your logs with logrotate
By default, all parts of the stack are under logrotate
to properly rotate and gzip old logs. The individual configuration files are found here:
/etc/logrotate.d/
Each configuration file can contain the following directives:
- daily/weekly/monthly/yearly: Frequency at which log files are rotated.
- rotate [n]: Log files are rotated n times before being removed or mailed to the address specified in a mail directive. If count is 0, old versions are removed rather than rotated.
- missingok: If the log file is missing, go on to the next one without issuing an error message.
Refer to Logrotate for more information.
Mongrel logs
If you have mongrels, your logs exist here:
/var/log/engineyard/mongrel/app_name/
Environment log file
If you need access to the production.log
you can find it here:
/data/app_name/shared/log/production.log
Nginx logs
We configure nginx to split access and error into two files:
/var/log/engineyard/nginx/app_name.access.log
/var/log/engineyard/nginx/app_name.error.log
Nginx configuration
Nginx configuration is symlinked from /data/nginx
to /etc/nginx
to ensure that it persists when the instance is shutdown.
/data/nginx
A configuration for your application is automatically generated and you will find it here:
/data/nginx/servers/app_name.conf
Monit log
Monit log information is sent to the system logger. See System logger: syslog above.
Monit configuration
Monit configuration files are located here:
/etc/monit.d/
If you are running a mongrel instance, you should see your monit and mongrel configurations here:
/etc/monit.d/mongrel.app_name.monitrc
When adding additional services under monit
, we recommend you create a new file ending in .monitrc
according to the same naming convention. For example:
sphinx.app_name.monitrc
dj.app_name.monitrc
If you’d like to edit the master monit configuration, you can do so here:
/etc/monitrc
Passenger log
Passenger 3 and 4 send log information to:
/var/log/nginx/passenger.log
Passenger 5 sends log information to:
/data/app_name/current/log/passenger.<port>.log
Unicorn log
Unicorn sends log information to three log files in the /data/app_name/current/log
directory:
/data/app_name/current/log/unicorn.log
/data/app_name/current/log/unicorn.stderr.log
/data/app_name/current/log/unicorn.stout.log
Chef recipe logs
See Log files from Chef recipes.
If you have feedback or questions about this page, add a comment below. If you need help, submit a ticket with Engine Yard Support.
Comments
Article is closed for comments.