Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

awstats (1) Versions 0.2.2

Installs awstats and provides an LWRP for creating domain-specific statistics

Policyfile
Berkshelf
Knife
cookbook 'awstats', '~> 0.2.2', :supermarket
cookbook 'awstats', '~> 0.2.2'
knife supermarket install awstats
knife supermarket download awstats
README
Dependencies
Quality 17%

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.

<table>
<thead>
<tr>
<th>Attribute</th>
<th>Description</th>
<th>Default Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>domain_name</td>
<td>
<b>Name attribute:</b>The domain name to be processed by awstats
</td>
<td><code>nil</code></td>
</tr>
<tr>
<td>log_location</td>
<td>
The directory containing the webserver's log files for the domain.
</td>
<td><code>/var/log/apache2/access.log</code></td>
</tr>
<tr>
<td>log_type</td>
<td>
Type of log. Possible values are <strong>web</strong>, <strong>stream</strong>, <strong>mail</strong> and <strong>ftp</strong>.
</td>
<td>web</td>
</tr>
<tr>
<td>log_format</td>
<td>
Type of log format. Possible values are <strong>combined</strong>, <strong>iis</strong>, <strong>webast</strong>, <strong>common</strong> and <strong>custom</strong>.
</td>
<td>combined</td>
</tr>
<tr>
<td>log_seperator</td>
<td>
Type of log seperator.
</td>
<td><code>[[WHITESPACE]]</code></td>
</tr>
<tr>
<td>dns_lookup</td>
<td>
Option to enable, disable or make DNS lookups static. Possible values are <strong>0</strong> (nope), <strong>1</strong> (YIP) and <strong>static</strong> (static YIP).
</td>
<td><code>1</code></td>
</tr>
<tr>
<td>host_alias</td>
<td>
Aliases for the domain_name
</td>
<td><code>localhost 127.0.0.1</code></td>
</tr>
<tr>
<td>skipped_hosts</td>
<td>
Array of hosts to be skipped when generating the statistics
</td>
<td><code>[ "127.0.0.1", "localhost" ]</code></td>
</tr>
<tr>
<td>cron_minute</td>
<td>
The interval defining how often the cronjob for generating statistics gets executed
</td>
<td><code>15</code></td>
</tr>
<tr>
<td>cron_user</td>
<td>
The user in whose context the cronjob gets executed
</td>
<td>root</td>
</tr>
<tr>
<td>cron_contact</td>
<td>
The user that gets notified if the cronjob fails for some reason.
</td>
<td>root</td>
</tr>
</tbody>
</table>

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.

Collaborator Number Metric
            

0.2.2 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.2.2 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.2.2 failed this metric

FC043: Prefer new notification syntax: awstats/providers/domain_statistics.rb:51
FC043: Prefer new notification syntax: awstats/providers/domain_statistics.rb:62
FC064: Ensure issues_url is set in metadata: awstats/metadata.rb:1
FC065: Ensure source_url is set in metadata: awstats/metadata.rb:1
FC066: Ensure chef_version is set in metadata: awstats/metadata.rb:1
FC069: Ensure standardized license defined in metadata: awstats/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: awstats/resources/domain_statistics.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: awstats/providers/domain_statistics.rb:37
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.2.2 passed this metric

Testing File Metric
            

0.2.2 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.2.2 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number