<commit_before>snort Cookbook
==============

[![Cookbook Version](https://img.shields.io/cookbook/v/snort.svg)](https://supermarket.chef.io/cookbooks/snort)

Installs the SNORT IDS daemon. On Debian/Ubuntu systems, the packages
from apt are used. On RHEL and Fedora systems, the packages are
retrieved directly from the SNORT project site.

Requirements
------------
#### Platforms

* Ubuntu 10.04+
* RHEL/CentOS, 7.0 and higher only.
* Fedora 21+

May work on other platforms in the Debian and RHEL families with or
without modification.

#### Chef
* Chef 12+

#### Cookbooks
* compat_resource to bring custom_resource functionality to chef-client < 12.5

Attributes
----------

See `attributes/default.rb` for default values.

* `node['snort']['home_net']` - Address range to use for preseeding
  `HOME_NET`.
* `node['snort']['database']` - The database backend to use. Only
  applicable on Debian/Ubuntu systems. Default none. MySQL and
  PostgreSQL are usable. The default recipe will install the SNORT
  package for the appropriate database backend. You'll need to make
  sure that the database server is set up in some way such that SNORT
  can connect to it. This cookbook does not yet support automatic
  configuration.
* `node['snort']['rpm']['daq_version']` - The full version string of
  the daq package to install, e.g. "`2.0.0-1.fc17`".
* `node['snort']['rpm']['daq_checksum']` - The SHA256 checksum of the
  daq rpm.
* `node['snort']['rpm']['version']` - The full version string of the
  snort package to install, e.g., "`2.9.4-1.f17`".
* `node['snort']['rpm']['checksum']` - The SHA256 checksum of the
  snort rpm.

Resources
---------

###snort_service

#### Properties
- service_name: To override the platform based service_name used to start/enable the service pass a string here

#### Examples
```
snort_service 'snort' do
  action :start
end
```

```
snort_service 'snort' do
  action [:start, :enable]
end
```
<commit_msg>Document the recipes<commit_after>snort Cookbook
==============

[![Cookbook Version](https://img.shields.io/cookbook/v/snort.svg)](https://supermarket.chef.io/cookbooks/snort)

Installs the SNORT IDS daemon. On Debian/Ubuntu systems, the packages
from apt are used. On RHEL and Fedora systems, the packages are
retrieved directly from the SNORT project site.

Requirements
------------
#### Platforms

* Ubuntu 10.04+
* RHEL/CentOS, 7.0 and higher only.
* Fedora 21+

May work on other platforms in the Debian and RHEL families with or
without modification.

#### Chef
* Chef 12+

#### Cookbooks
* compat_resource to bring custom_resource functionality to chef-client < 12.5

Attributes
----------

See `attributes/default.rb` for default values.

* `node['snort']['home_net']` - Address range to use for preseeding
  `HOME_NET`.
* `node['snort']['database']` - The database backend to use. Only
  applicable on Debian/Ubuntu systems. Default none. MySQL and
  PostgreSQL are usable. The default recipe will install the SNORT
  package for the appropriate database backend. You'll need to make
  sure that the database server is set up in some way such that SNORT
  can connect to it. This cookbook does not yet support automatic
  configuration.
* `node['snort']['rpm']['daq_version']` - The full version string of
  the daq package to install, e.g. "`2.0.0-1.fc17`".
* `node['snort']['rpm']['daq_checksum']` - The SHA256 checksum of the
  daq rpm.
* `node['snort']['rpm']['version']` - The full version string of the
  snort package to install, e.g., "`2.9.4-1.f17`".
* `node['snort']['rpm']['checksum']` - The SHA256 checksum of the
  snort rpm.


Recipes
-------

####default.rb
Includes the _install.rb and _service.rb recipes

####_install.rb
Installs the snort package from apt on Debian based systems, or RPMs downloaded from the snort.org site on RHEL based systems

####_service.rb
Used the snort_service custom resource to start and enable the snort service


Resources
---------

###snort_service

#### Properties
- service_name: To override the platform based service_name used to start/enable the service pass a string here

#### Examples
```
snort_service 'snort' do
  action :start
end
```

```
snort_service 'snort' do
  action [:start, :enable]
end
```

{'fraction_non_alphanumeric': 0.13709677419354838, 'fraction_numerical': 0.014705882352941176, 'mean_word_length': 4.0322195704057275, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1581428', 'n_tokens_mistral': 1385, 'n_tokens_neox': 1272, 'n_words': 487}