Git Product home page Git Product logo

hw-awstats's Introduction

chef_cookbook-awstats Build Status

Description

This cookbook installs awstats and provides an LWRP to setup awstats for a service of your choice.

Requirements

Currently only Debian 6+ (and probably Ubuntu) is supported.

Depends on

  • apache2
  • htpasswd

Attributes

LWRP

domain_statistics

Those are the attributes that can be configured with the LWRP. For more detailed explanations consult the awstats log file under templates/default or the official documentation.

Attribute Description Default Value
domain_name Name attribute:The domain name to be processed by awstats nil
log_location The directory containing the webserver's log files for the domain. /var/log/apache2/access.log
log_type Type of log. Possible values are web, stream, mail and ftp. web
log_format Type of log format. Possible values are combined, iis, webast, common and custom. combined
log_seperator Type of log seperator. [[WHITESPACE]]
dns_lookup Option to enable, disable or make DNS lookups static. Possible values are 0 (nope), 1 (YIP) and static (static YIP). 1
host_alias Aliases for the domain_name localhost 127.0.0.1
skipped_hosts Array of hosts to be skipped when generating the statistics [ "127.0.0.1", "localhost" ]
cron_minute The interval in minutes defining how often the cronjob for generating statistics gets executed */15 (every 15 minutes)
cron_hour The interval in hours defining how often the cronjob for generating statistics gets executed *
cron_day The interval in days defining how often the cronjob for generating statistics gets executed *
cron_month The interval in months defining how often the cronjob for generating statistics gets executed *
cron_weekday The interval in weekdays defining how often the cronjob for generating statistics gets executed *
cron_user The user in whose context the cronjob gets executed root
cron_contact The user that gets notified via E-Mail if the cronjob fails for some reason (it's presumed that SMTP is properly configured) root

Usage

recipe[awstats] makes sure to install the latest awstats package on your distribution. The LWRP can then be used to configure domain-specific statistics.

You then can enable awstats statistics and a proper htpasswd in your application-specific cookbook like this:

awstats_domain_statistics 'example.com' do
  log_location '/var/log/apache2/example.com-access.log'
end

htpasswd '/etc/apache2/htpasswd_awstats' do
  user 'fooforge'
  password 'egrofoof'
end

Development

Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make.

License and Author

Author:: Mike Adolphs

Copyright 2012, Mike Adolphs

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.