Install:
gem install logspray (gem build in progress)
currently:
git clone https://github.com:davidx/logspray.git
cd logspray && gem install bundler && bundle install
- Setup a rabbitmq or amqp compliant server on 'myamqploghost'
Gentoo:
emerge rabbitmq && rc-update add rabbitmq default && /etc/init.d/rabbitmq start
Ubuntu:
apt-get install rabbitmq-server && update-rc add rabbitmq-server && /etc/init.d/rabbitmq-server start
Log persistence example:
- Add this cronjob on your central log storage server:
* * * * * ruby /data/ops/current/logspray/bin/consume_logspray_queue.rb --host=myamqploghost --queue=apache_access_log --logfile=/var/log/logspray/apache_access_log/apache_access_log_`date +%Y%m%d`.log * * * * * ruby /data/ops/current/logspray/bin/consume_logspray_queue.rb --host=myamqploghost --queue=apache_error_log --logfile=/var/log/logspray/apache_error_log/apache_error_log_`date +%Y%m%d`.log