Install and run the webalizer with Chef from Opscode
http://github.com/ehaselwanter/cookbooks/tree/COOK-195/webalizer
As DRY as possible ;-)
Simply put it derives the log file name from its name and takes a server name for where to access the output of webalizer.
The simplest use case is
webalizer "your.example.com" do server_name "stats.example.com" end
This looks for a access log file in
#{node[:apache][:log_dir]}/your.example.com-access.log
und puts the webalizer results (/etc/cron.daily/00-weablizer
must be run either manually or from cron
)
in
/var/www/usage/your.example.com
accessable through
http://stats.example.com/your.example.com
options are
webalizer "your.example.com" do server_name "stats.example.com" # custom server name conf_template "webalizer.conf.erb" # custom webalizer config site_template "webalizer.site.erb" #custom webalizer apache file cron_schedule :daily # node[:webalizer][:cron_base_prefix]}#{params[:cron_schedule].to_s must be a cron directory log_type :clf # :clf :ftp or :squid cookbook "webalizer" were the templates reside end
Interested in Cloud or Chef Trainings? Have a look at our Commandemy Trainings page. Need help migrating to the cloud? Check out Infralovers.
comments powered by Disqus