Version information
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x
- Puppet >= 6.1.0 < 8.0.0
- , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'ccin2p3-patterndb', '5.0.0'
Learn more about managing modules with a PuppetfileDocumentation
ccin2p3-patterndb
Table of Contents
Overview
This module handles patterndb configuration files for syslog-ng pattern parsers.
Module Description
This module will manage the pattern databases of syslog-ng by using existing files, or by generating them using key-value pairs in puppet manifests. No need to edit XML files anymore \o/. It is possible to painlessly migrate from an existing base of rulesets by using a combination of the latter. Knowledge of patterndb is required as the manifests closely match the hierarchical structure as described in detail in the syslog-ng documentation.
Setup
What patterndb affects
Depending on the top-level configuration variables $base_dir
and $temp_dir
, this module will manage and execute the following elements in order:
- (OPTIONAL) Manage package
syslog-ng
- Manage
$base_dir/etc/syslog-ng/patterndb.d
recursively - Manage the contents of the above directory using existing or generated patterndb ruleset files
- Merge the contents of the latter using
pdbtool
into a temporary file${temp_dir}/syslog-ng/patterndb/${parser}.xml
where$parser
is the name of the patterndb (you can have as many as you want, e.g. for staged parsing. - (OPTIONAL) Test the resulting patterndbs
- Deploy the temporary files into
${base_dir}/var/lib/syslog-ng/patterndb/${parser}.xml
Reloading of the syslog-ng daemon is not being taken care of, as the latter already does that on its own by polling the patterndb file for change.
Setup Requirements
This module requires the modules puppetlabs-stdlib and puppetlabs-concat. It supports RedHat and Debian osfamilies. Puppet versions from 3.x and onwards are supported up to 4.x
Terminology
Most of the concepts covered here are described in the syslog-ng documentation and reintroduced here for clarity. They follow the hierarchy of the patterndb parser model:
- A patterndb parser refers to a collection of rulesets and is materialized as an XML file. It is sometimes referred to as a patterndb or a parser. It is the top-level object that is being used by syslog-ng when defining a parser in a log statement:
parser my_parser { db_parser("/var/lib/syslog-ng/patterndb/my_parser.xml"); };
- A ruleset represents a collection of rules which are common to a certain set of programs e.g. sshd (PROGRAM macro in syslog-ng). A ruleset is usually materialized by a single XML file which can be merged with others into a full patterndb parser using the syslog-ng provided tool
pdbtool
. - A rule contains logic to identify, correlate and modify similar messages
- A pattern contains logic on how to match messages
- A pattern parser is a function that matches strings and optionally returns a key-value pair (macro in syslog-ng) where the value contains the matching string, and the key is user-specified. pattern parsers are enclosed in
@
, e.g.@ESTRING:mykey@
- An example is a sample message which should match one and only one rule. It contains the message itself, along with the values and tags the rule should extract.
- A correlation context or context refers to a collection of messages that have been matched to belong together
- An action is a new event or message that is being triggered by another message or context matching certain conditions. It contains the message itself, along with additional tags and values it should be associated with.
- A value is a key-value pair belonging to a message
- A tag is a label belonging to a message
These concepts are materialized by puppet objects by this module as follows:
- patterndb parser:
patterndb::parser
- ruleset:
patterndb::simple::ruleset
,patterndb::raw::ruleset
- rule:
patterndb::simple::rule
- example:
patternd::simple::example
- action:
patterndb::simple::action
- action message:
patterndb::simple::action::message
Usage
The workflow to create a new patterndb parser is:
1. load the class
Using defaults ...
class { "patterndb": }
... or overriding paths
class { "patterndb":
$base_dir => "/",
$temp_dir => "/tmp"
}
2. define one or more parsers
patterndb::parser { 'my_parser': }
3. define rulesets for each parser
patterndb::simple::ruleset { 'myservice':
parser => 'my_parser',
patterns => [ 'myservice-foo', 'myservice-bar' ],
rules => [
{
id => 'myservice-alert',
patterns => [ 'ALERT: foo = @NUMBER:foo@, bar = @FLOAT:bar@' ],
context_id => 'myservice-${foo}-${bar}'
}
]
}
patterndb::ruleset::raw { 'yourservice':
source => 'puppet:///path/to/your/export/xml.pdb'
}
4. define additional rules for each simple ruleset
patterndb::simple::rule { 'myservice-ok':
ruleset => 'myservice',
patterns => [ 'OK: foo = @NUMBER:foo@, bar = @FLOAT:bar@' ],
context_id => 'myservice-${foo}-${bar}',
context_timeout => '60'
}
5. define actions
patterndb::simple::action { 'timeout_on_not_ok':
rule => 'myservice-ok',
trigger => 'timeout',
message => {
values => {
'MESSAGE' => 'patterndb detected that myservice never recovered after 60 seconds'
}
}
}
This will create two new patterndb parsers in /var/lib/syslog-ng/patterndb/default.xml
and /var/lib/syslog-ng/patterndb/my_parser.xml
with one ruleset each. Note the absence of the explicit assignement of the 'default'
parser which gets instanciated automatically when defining a ruleset without parser ('yourservice'
in this case).
Reference
Class: patterndb
This class will manage the following resources:
Package[$package_name]
if$manage_package
is set totrue
.File[$temp_dir]
as a directory.File["${base_dir}/etc/syslog-ng/patterndb.d"]
recursively, purging unknown files.File["${base_dir}/var/lib/syslog-ng/patterndb/${parser}.xml"]
for each$parser
(defaults to'default'
)
Optional Parameters
$base_dir
Top level directory for storing resources. Defaults to'/'
$temp_dir
Temporary directory for various components. Defaults to'/tmp/syslog-ng'
$package_name
Name of thesyslog-ng
package. Defaults to the OS shipped$manage_package
Boolean to control the management of the package. Defaults totrue
$syslogng_modules
An array ofsyslog-ng
modules to use. This will be used for other resources e.g. update. Defaults to[]
$use_hiera
Boolean controlling inclusion of classpatterndb::hiera
$test_before_deploy
A boolean which controls wether to test the patterndbs before deploying (see update). Defaults totrue
Class: patterndb::hiera
This class will create parser
, ruleset
, rule
, and action
resources from hiera.
Optional Parameters
$prefix
The prefix of variable names in hiera. The default ispatterndb
which will createpatterndb::simple::rule
resources specified in hiera aspatterndb::rule
. If you usefoo
, it would pullfoo::rule
instead.
For the impatient
Here's a quick howto to generate a patterndb using yaml in puppet apply mode (don't run as root):
# get latest version
> git clone https://github.com/ccin2p3/puppet-patterndb
Cloning into 'puppet-patterndb'...
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 910 (delta 0), reused 5 (delta 0), pack-reused 903
Receiving objects: 100% (910/910), 136.28 KiB | 0 bytes/s, done.
Resolving deltas: 100% (510/510), done.
# build puppet module
> cd puppet-patterndb/
> puppet module build
Notice: Building /home/ccin2p3/puppet-patterndb for release
Module built: /home/ccin2p3/puppet-patterndb/pkg/ccin2p3-patterndb-3.0.0.tar.gz
# install module and its deps
> puppet module install pkg/ccin2p3-patterndb-3.0.0.tar.gz
Notice: Preparing to install into /home/ccin2p3/.puppetlabs/etc/code/modules ...
Notice: Created target directory /home/ccin2p3/.puppetlabs/etc/code/modules
Notice: Downloading from https://forgeapi.puppet.com ...
Notice: Installing -- do not interrupt ...
/home/ccin2p3/.puppetlabs/etc/code/modules
└─┬ ccin2p3-patterndb (v3.0.0)
├─┬ puppetlabs-concat (v5.3.0)
│ └── puppetlabs-translate (v1.2.0)
└── puppetlabs-stdlib (v5.2.0)
# configure hiera
> cat >~/.puppetlabs/etc/puppet/hiera.yaml
---
:merge_behavior: deeper
:backends:
- yaml
- eyaml
:hierarchy:
- "default"
:yaml:
:datadir: hieradata
:eyaml:
:extension: 'yaml'
# the smoke directory contains an example manifest and hiera file
> cd smoke
> ls OK_hiera.pp
OK_hiera.pp
> ls hieradata/
default.yaml
# generate the patterndb from smoke/hieradata/default.yaml
> puppet apply OK_hiera.pp
Notice: Compiled catalog for node42.example.com in environment production in 0.98 seconds
Notice: /Stage[main]/Patterndb/File[/tmp/syslog-ng]/ensure: created
Notice: /Stage[main]/Patterndb/File[/tmp//etc]/ensure: created
Notice: /Stage[main]/Patterndb/File[/tmp//var]/ensure: created
Notice: /Stage[main]/Patterndb/File[/tmp//var/lib]/ensure: created
Notice: /Stage[main]/Patterndb/File[/tmp//etc/syslog-ng]/ensure: created
Notice: /Stage[main]/Patterndb/File[/tmp//var/lib/syslog-ng]/ensure: created
Notice: /Stage[main]/Patterndb/File[/tmp//var/lib/syslog-ng/patterndb]/ensure: created
Notice: /Stage[main]/Patterndb/File[/tmp//etc/syslog-ng/patterndb.d]/ensure: created
Notice: /Stage[main]/Patterndb/File[/tmp/etc/syslog-ng/patterndb.d/README]/ensure: defined content as '{md5}453a118a8bc1a39e8386245314a599a5'
Notice: /Stage[main]/Main/Patterndb::Parser[default]/File[/tmp//etc/syslog-ng/patterndb.d/default]/ensure: created
Notice: /Stage[main]/Main/Patterndb::Parser[default]/File[/tmp/syslog-ng/patterndb]/ensure: created
Notice: /Stage[main]/Main/Patterndb::Parser[default]/File[patterndb::file::default]/ensure: created
Notice: /Stage[main]/Patterndb::Hiera/Patterndb::Simple::Ruleset[kernel]/Concat[patterndb_simple_ruleset-kernel]/File[/tmp//etc/syslog-ng/patterndb.d/default/kernel.pdb]/ensure: defined content as '{md5}93a8a1e73b3cd352a221eb8aa743c7e2'
Notice: /Stage[main]/Main/Patterndb::Parser[default]/Exec[patterndb::merge::default]: Triggered 'refresh' from 2 events
Notice: /Stage[main]/Main/Patterndb::Parser[default]/Exec[patterndb::test::default]/returns: Testing message: program='kernel' message='ixgbe 0000:81:00.0 em1: NIC Link is Up 1 Gbps, Flow Control: RX/TX'
Notice: /Stage[main]/Main/Patterndb::Parser[default]/Exec[patterndb::test::default]/returns: Testing message: program='kernel' message='tg3 0000:01:00.1: eth1: Link is down'
Notice: /Stage[main]/Main/Patterndb::Parser[default]/Exec[patterndb::test::default]/returns: Testing message: program='kernel' message='ixgbe 0000:81:00.0 em1: NIC Link is Down'
Notice: /Stage[main]/Main/Patterndb::Parser[default]/Exec[patterndb::test::default]/returns: Testing message: program='kernel' message='bnx2 0000:01:00.1: eth1: NIC Copper Link is Down'
Notice: /Stage[main]/Main/Patterndb::Parser[default]/Exec[patterndb::test::default]: Triggered 'refresh' from 1events
Notice: /Stage[main]/Main/Patterndb::Parser[default]/Exec[patterndb::deploy::default]: Triggered 'refresh' from1 events
Notice: Applied catalog in 1.33 seconds
# here's the individual rulesets
> find /tmp/etc/syslog-ng/
/tmp/etc/syslog-ng/
/tmp/etc/syslog-ng/patterndb.d
/tmp/etc/syslog-ng/patterndb.d/default
/tmp/etc/syslog-ng/patterndb.d/default/kernel.pdb
/tmp/etc/syslog-ng/patterndb.d/README
# here's the resulting merged patterndb
> find /tmp/syslog-ng/
/tmp/syslog-ng/
/tmp/syslog-ng/patterndb
/tmp/syslog-ng/patterndb/default.xml
Defined Type: patterndb::parser
If using the defaults, and only one pattern parser, you probably won't need to define this resource, as it will get automatically created for you when defining a ruleset. This resource represents a patterndb parser, which is eventually materialized by a File puppet resource:
File["${base_dir}/var/lib/syslog-ng/patterndb/${name}.xml"]
This File is generated by merging all defined ruleset resources, which come in two forms: raw and simple.
Merging is handled under the hood by using pdbtool merge
which creates a new patterndb parser in the ${temp_dir}
directory. Testing of the merged parser is optionally handled using pdbtool test
. If this is a success, the merged file is then being deployed into the definitive destination at ${base_dir}/var/lib/syslog-ng/patterndb/${name}.xml
.
Optional Parameters
$syslogng_modules
An array of syslog-ng modules to load. Controls the validation process of the merged patterndb parser file, e.g.syslogng_modules => [ "tfgeoip" ]
will trigger aExec["pdbtool test [...] --module tfgeoip"]
resource. This is necessary in case you are using non autoloading modules in syslog-ng, otherwise testing will fail and your patterndb parser will not be deployed. Defaults to the class value.$test_before_deploy Boolean
Controls wether merged patterndb file is tested before being deployed. Defaults to the class value. For reference, here's what happens under the hood (code is pretty self-explanatory):
if $test_before_deploy {
File['patterndb::file'] ~> Exec['patterndb::merge'] ~> Exec['patterndb::test'] ~> Exec['patterndb::deploy']
} else {
File['patterndb::file'] ~> Exec['patterndb::merge'] ~> Exec['patterndb::deploy']
}
There is intentionally no way to test individual rulesets, as this only makes sense after the merge.
Example
patterndb::parser { 'default':
syslogng_modules => [ "tfgeoip", "tfgetent" ],
test_before_deploy => true
}
Defined Type: patterndb::raw::ruleset
Describes a resultset using XML content. Use only if you have existing pdb files. The use of patterndb::simple::ruleset
is highly encouraged otherwise.
This type will define the following puppet resource:
File["${base_dir}/etc/syslog-ng/patterndb.d/${parser}/${name}.pdb"]
Parameters
All parameters are passed along to the File
resource:
Mandatory Parameters
$source
The source of the patterndb. This must contain valid patterndb ruleset XML content
Optional Parameters
$parser
Name of the targeted patterndb parser. Defaults to'default'
$ensure
Defaults to'present'
. Use'directory'
if we are to handle a bunch of pdb files.
Additional parameters if $ensure => 'directory'
:
$recurse
Defaults totrue
$purge
Defaults totrue
$sourceselect
Defaults to'all'
$ignore
Defaults to[ '.svn', '.git' ]
Examples
Single file
patterndb::raw::ruleset { 'raw':
source => 'puppet:///path/to/my/export/for/myraw.pdb'
}
Directory
patterndb::raw::ruleset { 'raws':
source => 'puppet:///path/to/my/exports/for/pdb',
ensure => 'directory',
purge => true,
}
Multiple patterndb parsers
patterndb::raw::ruleset { 'ruleset_for_pdb_1':
parser => 'pdb1',
source => 'puppet:///path/to/my/export/for/myraw_1.pdb'
}
patterndb::raw::ruleset { 'ruleset_for_pdb_2':
parser => 'pdb2',
source => 'puppet:///path/to/my/export/for/myraw_2.pdb'
}
Defined Type: patterndb::simple::ruleset
Describes a ruleset using puppet code.
Like its sibling patterndb::raw::ruleset
, this type will define the following puppet resource:
File["${base_dir}/etc/syslog-ng/patterndb.d/${parser}/${name}.pdb"]
Additional internal resources can be created, depending on the parameters:
## for each rule in rules:
Patterndb::Simple::Rule[rule[$id]]
## for each example in rule[$examples]
Patterndb::Simple::Example["rule[$id]-$i"]
## for each action in actions
Patterndb::Simple::Action["rule[$id]-$i"]
Patterndb::Simple::Action::Message["rule[$id]-$i"]
Mandatory Parameters
$id
A unique identifier for the ruleset. The use of uuid is strongly recommended$patterns
An array of strings representing the pattern matching the name of the PROGRAM macro in syslog messages, e.g.['sshd', 'login', 'lftpd']
. Can also be a string for convenience.$pubdate
The date the ruleset has been written in the formatYYYY-mm-dd
Optional Parameters
$parser
Name of the target merged patterndb. Defaults to'default'
$version
patterndb ruleset version. Defaults to4
$description
a short description for the ruleset. Defaults to"generated by puppet"
$url
an url pointing to some information on the ruleset. Defaults toundef
$rules
An array of hashes describing the rules. Can also be a string for convenience. If present, the module will create onePatterndb::Simple::Rule
resource using the$id
parameter as its namevar per element of the array$order
A string which will control the ruleset's order. This is currently EXPERIMENTAL as its behaviour is highly system dependant.
Examples
Minimal
patterndb::simple::ruleset { 'myruleset':
id => '9586b525-826e-4c2d-b74f-381039cf470c',
patterns => [ 'sshd' ],
pubdate => '2014-03-24',
rules => [
{
id => 'd69bd1ed-17ff-4667-8ea4-087170cbceeb',
patterns => ['Successful login for user @QSTRING:user:"@ using method @QSTRING:method:"@']
}
]
}
Full
patterndb::simple::ruleset { 'pam_unix':
parser => 'default',
id => 'd254ec8b-be96-49cb-9424-16fcb1164157',
patterns => [ 'sshd', 'crond', 'imap', 'login', 'pam', 'su', 'sudo' ],
pubdate => '1985-10-26',
version => '4',
description => 'This ruleset contains patterns for pam_unix log messages',
url => 'http://www.openpam.org/',
rules => [
{
id => 'b85dfb49-b5e5-4bca-b2ca-5dd28ab13d5e',
patterns => [
'pam_unix(@ESTRING:usracct.application::@@ESTRING:usracct.service:)@: session closed for user @ANYSTRING:usracct.username:@'
'pam_unix(@ESTRING:usracct.application::@@ESTRING:usracct.service:)@: session closed'
],
tags => [ 'usracct', 'secevt' ],
values => {
'usracct.type' => 'logout',
},
examples => [
{
program => 'sshd',
test_message => 'pam_unix(sshd:session): session closed for user mmcfly',
test_values => {
'usracct.application' => 'sshd',
'usracct.service' => 'session',
'usracct.username' => 'mmcfly',
}
}
],
},
],
}
Defined Type: patterndb::simple::rule
Describes a rule in a ruleset. Will get created automatically if rules are being embedded in a ruleset definition.
Mandatory Parameters
$ruleset
The name of the ruleset resource this rule applies to.$patterns
An array of patterns describing a log message e.g.['Failed @ESTRING:usracct.authmethod: @for invalid user @ESTRING:usracct.username: @from @ESTRING:usracct.device: @port @ESTRING:: @@ANYSTRING:usracct.service@']
. Can also be a string for convenience.
Optional Parameters
$id
A unique identifier for the rule. The use of uuid is strongly recommended. Defaults to the resource's$name
.$provider
The provider of the rule. This is used to distinguish between who supplied the rule. Defaults to'puppet'
$ruleclass
The class of the rule - syslog-ng assigns this class to the messages matching a pattern of this rule. Defaults to'system'
$values
A hash of key-value pairs that are assigned to messages matching the rule. Defaults to{}
$tags
A list of keywords or tags applied to messages matching the rule. Defaults to[]
$examples
An array of hashes containing sample log messages which should match any of$patterns
$context_scope
Specifies which messages belong to the same context. See the paragraph 13.5.3 of the syslog-ng online manual for this and the 2 other context options. Valid values are:process
,program
,host
, andglobal
$context_id
An identifier to group related log messages when using the pattern database to correlate events$context_timeout
The number of seconds the context is stored$actions
An array of actions to perform when matching this rule. If given, this will create as manyPatterndb::Simple::Action
resources as there are elements in the array. Their name will be generated automatically using the rule's name. Actions can also be defined on their own.$order
A string which will control the order in which the rule will appear in the final merged patterndb parser. This is sometimes necessary due to a bug in syslog-ng
Examples
patterndb::simple::rule { 'd5ebb93c-909c-45a9-8ca7-a8f13de465cd':
ruleset => 'myruleset',
patterns => 'the @ESTRING:subject: @is @ESTRING:object@'
values => {
'foo' => 'bar'
},
tags => [ 'baz' ]
}
Defined Type: patterndb::simple::example
Defined type describing sample messages in a rule. You should not define this resource outside of a patterndb::simple::rule
, as it will be created for you by the latter.
Mandatory Parameters
$program
ThePROGRAM
pattern of the test message, e.g.'sshd'
$test_message
A sample log message that should match the rule e.g.Failed password for invalid user deep_thought from 0.0.0.0 port -1 ssh42
Optional Parameters
$test_values
A hash of name-value pairs to test the results of the parsers used in the pattern, e.g.{'usracct.username' => 'deep_thought'}
Defined Type: patterndb::simple::action
Defined type describing an action in a rule.
See the paragraph 13.5.3 of the syslog-ng online manual for more details on the parameters:
Mandatory Parameters
$rule
A string containing the name of the rule this action should apply to$message
A hash describing the message to be sent when the action is executed. A resource of typePatterndb::Simple::Action::Message
will be created for you.
Optional Parameters
$trigger
Specifies when the action is executed. The trigger attribute has the following possible values:match
ortimeout
.$rate
Specifies maximum how many messages should be generated in the specified time period in the following format: messages/second, e.g.1/60
$condition
The action is performed only if the message matches the filter
Example
patterndb::simple::action { 'alert_ops':
rule => 'myservice-nok',
message => {
values => {
'MESSAGE' = 'You should really know about this',
'email_to' = 'ops@mysite.mytld'
},
tags => [ 'email_alert' ]
}
}
Defined Type: patterndb::simple::action::message
Defined type describing action message in an action. You should not define this resource outside of a patterndb::simple::ruleset
, as it will be created for you by the latter.
Optional Parameters
$values
A hash containing a list of key-values describing the message, e.g.{'MESSAGE' => 'generated by syslog-ng', 'PROGRAM' => 'syslog-ng'}
$tags
A list of tags for the generated message$inherit_properties
A boolean to toggle whether the generated message should inherit a copy of all values and tags from the triggering message. Defaults totrue
Limitations
- nested defined types model has maybe better solutions
- Needs more rspec and system tests
- rule ids are unique across parsers: probably saner anyway
Upgrading
From 1.0.0 or earlier
If you're one of the few who downloaded the previous version 1.0.0, you'll notice breaking changes, see the CHANGELOG File for more information. Basically, you only have to change your manifest code in case you were explicitly loading the patterndb::update
class. In that case, replace the following:
class { patterndb::update:
...
}
with:
patterndb::parser { 'default':
...
}
And you should be okay
From 2.0.0 to 2.1.0
There are no breaking changes but the fact that the module now requires puppetlabs-concat. This dependency was required for the separation of rules and rulesets.
Development
Testing
- Smoke tests: run
./smoke/test
from the root directory - For
puppet-rspec
tests usebundle install && bundle exec rake spec
Contributing
Send issues or PRs to http://github.com/ccin2p3/puppet-patterndb
Changelog
All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module.
v5.0.0 (2023-02-07)
Breaking changes:
- Add data types everywhere and do not allow values where arrays are expected #31 (smortex)
- Add support for patterndb v6 type-hints #30 (smortex)
- Drop support of CentOS 6 / RedHat 6 (EOL) #24 (smortex)
Implemented enhancements:
- Manage patterndb version in generated XML files #33 (faxm0dem)
- Add support for AlmaLinux #27 (smortex)
- Add support for Rocky #26 (smortex)
- Add support for Ubuntu #25 (smortex)
Fixed bugs:
Closed issues:
- Bring back smoke tests ! #22
Merged pull requests:
v4.0.1 (2022-02-23)
Fixed bugs:
v4.0.0 (2022-02-04)
Breaking changes:
Implemented enhancements:
- Allow up-to-date dependencies #16 (smortex)
- Add support for Puppet 6 & 7 #15 (smortex)
- Add support for Debian 11 #13 (smortex)
- Ensure syslog-ng-core is installed on Debian #6 (smortex)
Fixed bugs:
Closed issues:
- Module broken with Puppet 5.5.7 #7
v3.0.0 (2018-03-22)
- new major release
- drop support for puppet < 4.9.0
v2.3.0-beta1 (2017-06-07)
- add support for polling hiera
v2.2.2 (2015-08-26)
- fix bug in htmlentities that fracked up pdbs iunder ruby 2.1
v2.2.1 (2015-08-26)
- context_timeout now accepts Fixnum as well as String
- add parameter order for ruleset
- Drop support for puppet 2.x
- minor author fixes
v2.2.0 (2015-08-26)
UNRELEASED
v2.1.1 (2015-08-26)
UNRELEASED
- escape special chars in generated xml
- Allow empty patterns in rulesets
- context_timeout and version now accept Fixnum as well as String
v2.1.0 (2014-08-12)
Separate Rulesets, Rules and Actions
- rules accept the
order
parameter which controls the order of appearance in the merged parser file - rulesets, rules and actions can now be declared separately this pulls in the puppetlabs-concat dependancy
- allow rules and patterns to be strings that will be coerced to single-element arrays this will make it easier to use this module with puppetdb https://tickets.puppetlabs.com/browse/PDB-170
- treat action/message/inherit_properties as a real boolean
v2.0.0 (2014-06-16)
Support multiple merged patterndb files
- added support for multiple pattern databases
- class
patterndb::update
replaced by definepatterndb::parser
- moved parameters from
update
to base class
v1.0.0 (2014-06-10)
Initial release
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>= 4.5.0 < 9.0.0)
- puppetlabs/concat (>= 1.2.0 < 8.0.0)
CeCILL FREE SOFTWARE LICENSE AGREEMENT Version 2.1 dated 2013-06-21 Notice This Agreement is a Free Software license agreement that is the result of discussions between its authors in order to ensure compliance with the two main principles guiding its drafting: * firstly, compliance with the principles governing the distribution of Free Software: access to source code, broad rights granted to users, * secondly, the election of a governing law, French law, with which it is conformant, both as regards the law of torts and intellectual property law, and the protection that it offers to both authors and holders of the economic rights over software. The authors of the CeCILL (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre]) license are: Commissariat à l'énergie atomique et aux énergies alternatives - CEA, a public scientific, technical and industrial research establishment, having its principal place of business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France. Centre National de la Recherche Scientifique - CNRS, a public scientific and technological establishment, having its principal place of business at 3 rue Michel-Ange, 75794 Paris cedex 16, France. Institut National de Recherche en Informatique et en Automatique - Inria, a public scientific and technological establishment, having its principal place of business at Domaine de Voluceau, Rocquencourt, BP 105, 78153 Le Chesnay cedex, France. Preamble The purpose of this Free Software license agreement is to grant users the right to modify and redistribute the software governed by this license within the framework of an open source distribution model. The exercising of this right is conditional upon certain obligations for users so as to preserve this status for all subsequent redistributions. In consideration of access to the source code and the rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors only have limited liability. In this respect, the risks associated with loading, using, modifying and/or developing or reproducing the software by the user are brought to the user's attention, given its Free Software status, which may make it complicated to use, with the result that its use is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the suitability of the software as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions of security. This Agreement may be freely reproduced and published, provided it is not altered, and that no provisions are either added or removed herefrom. This Agreement may apply to any or all software for which the holder of the economic rights decides to submit the use thereof to its provisions. Frequently asked questions can be found on the official website of the CeCILL licenses family (http://www.cecill.info/index.en.html) for any necessary clarification. Article 1 - DEFINITIONS For the purpose of this Agreement, when the following expressions commence with a capital letter, they shall have the following meaning: Agreement: means this license agreement, and its possible subsequent versions and annexes. Software: means the software in its Object Code and/or Source Code form and, where applicable, its documentation, "as is" when the Licensee accepts the Agreement. Initial Software: means the Software in its Source Code and possibly its Object Code form and, where applicable, its documentation, "as is" when it is first distributed under the terms and conditions of the Agreement. Modified Software: means the Software modified by at least one Contribution. Source Code: means all the Software's instructions and program lines to which access is required so as to modify the Software. Object Code: means the binary files originating from the compilation of the Source Code. Holder: means the holder(s) of the economic rights over the Initial Software. Licensee: means the Software user(s) having accepted the Agreement. Contributor: means a Licensee having made at least one Contribution. Licensor: means the Holder, or any other individual or legal entity, who distributes the Software under the Agreement. Contribution: means any or all modifications, corrections, translations, adaptations and/or new functions integrated into the Software by any or all Contributors, as well as any or all Internal Modules. Module: means a set of sources files including their documentation that enables supplementary functions or services in addition to those offered by the Software. External Module: means any or all Modules, not derived from the Software, so that this Module and the Software run in separate address spaces, with one calling the other when they are run. Internal Module: means any or all Module, connected to the Software so that they both execute in the same address space. GNU GPL: means the GNU General Public License version 2 or any subsequent version, as published by the Free Software Foundation Inc. GNU Affero GPL: means the GNU Affero General Public License version 3 or any subsequent version, as published by the Free Software Foundation Inc. EUPL: means the European Union Public License version 1.1 or any subsequent version, as published by the European Commission. Parties: mean both the Licensee and the Licensor. These expressions may be used both in singular and plural form. Article 2 - PURPOSE The purpose of the Agreement is the grant by the Licensor to the Licensee of a non-exclusive, transferable and worldwide license for the Software as set forth in Article 5 <#scope> hereinafter for the whole term of the protection granted by the rights over said Software. Article 3 - ACCEPTANCE 3.1 The Licensee shall be deemed as having accepted the terms and conditions of this Agreement upon the occurrence of the first of the following events: * (i) loading the Software by any or all means, notably, by downloading from a remote server, or by loading from a physical medium; * (ii) the first time the Licensee exercises any of the rights granted hereunder. 3.2 One copy of the Agreement, containing a notice relating to the characteristics of the Software, to the limited warranty, and to the fact that its use is restricted to experienced users has been provided to the Licensee prior to its acceptance as set forth in Article 3.1 <#accepting> hereinabove, and the Licensee hereby acknowledges that it has read and understood it. Article 4 - EFFECTIVE DATE AND TERM 4.1 EFFECTIVE DATE The Agreement shall become effective on the date when it is accepted by the Licensee as set forth in Article 3.1 <#accepting>. 4.2 TERM The Agreement shall remain in force for the entire legal term of protection of the economic rights over the Software. Article 5 - SCOPE OF RIGHTS GRANTED The Licensor hereby grants to the Licensee, who accepts, the following rights over the Software for any or all use, and for the term of the Agreement, on the basis of the terms and conditions set forth hereinafter. Besides, if the Licensor owns or comes to own one or more patents protecting all or part of the functions of the Software or of its components, the Licensor undertakes not to enforce the rights granted by these patents against successive Licensees using, exploiting or modifying the Software. If these patents are transferred, the Licensor undertakes to have the transferees subscribe to the obligations set forth in this paragraph. 5.1 RIGHT OF USE The Licensee is authorized to use the Software, without any limitation as to its fields of application, with it being hereinafter specified that this comprises: 1. permanent or temporary reproduction of all or part of the Software by any or all means and in any or all form. 2. loading, displaying, running, or storing the Software on any or all medium. 3. entitlement to observe, study or test its operation so as to determine the ideas and principles behind any or all constituent elements of said Software. This shall apply when the Licensee carries out any or all loading, displaying, running, transmission or storage operation as regards the Software, that it is entitled to carry out hereunder. 5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS The right to make Contributions includes the right to translate, adapt, arrange, or make any or all modifications to the Software, and the right to reproduce the resulting software. The Licensee is authorized to make any or all Contributions to the Software provided that it includes an explicit notice that it is the author of said Contribution and indicates the date of the creation thereof. 5.3 RIGHT OF DISTRIBUTION In particular, the right of distribution includes the right to publish, transmit and communicate the Software to the general public on any or all medium, and by any or all means, and the right to market, either in consideration of a fee, or free of charge, one or more copies of the Software by any means. The Licensee is further authorized to distribute copies of the modified or unmodified Software to third parties according to the terms and conditions set forth hereinafter. 5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION The Licensee is authorized to distribute true copies of the Software in Source Code or Object Code form, provided that said distribution complies with all the provisions of the Agreement and is accompanied by: 1. a copy of the Agreement, 2. a notice relating to the limitation of both the Licensor's warranty and liability as set forth in Articles 8 and 9, and that, in the event that only the Object Code of the Software is redistributed, the Licensee allows effective access to the full Source Code of the Software for a period of at least three years from the distribution of the Software, it being understood that the additional acquisition cost of the Source Code shall not exceed the cost of the data transfer. 5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE When the Licensee makes a Contribution to the Software, the terms and conditions for the distribution of the resulting Modified Software become subject to all the provisions of this Agreement. The Licensee is authorized to distribute the Modified Software, in source code or object code form, provided that said distribution complies with all the provisions of the Agreement and is accompanied by: 1. a copy of the Agreement, 2. a notice relating to the limitation of both the Licensor's warranty and liability as set forth in Articles 8 and 9, and, in the event that only the object code of the Modified Software is redistributed, 3. a note stating the conditions of effective access to the full source code of the Modified Software for a period of at least three years from the distribution of the Modified Software, it being understood that the additional acquisition cost of the source code shall not exceed the cost of the data transfer. 5.3.3 DISTRIBUTION OF EXTERNAL MODULES When the Licensee has developed an External Module, the terms and conditions of this Agreement do not apply to said External Module, that may be distributed under a separate license agreement. 5.3.4 COMPATIBILITY WITH OTHER LICENSES The Licensee can include a code that is subject to the provisions of one of the versions of the GNU GPL, GNU Affero GPL and/or EUPL in the Modified or unmodified Software, and distribute that entire code under the terms of the same version of the GNU GPL, GNU Affero GPL and/or EUPL. The Licensee can include the Modified or unmodified Software in a code that is subject to the provisions of one of the versions of the GNU GPL, GNU Affero GPL and/or EUPL and distribute that entire code under the terms of the same version of the GNU GPL, GNU Affero GPL and/or EUPL. Article 6 - INTELLECTUAL PROPERTY 6.1 OVER THE INITIAL SOFTWARE The Holder owns the economic rights over the Initial Software. Any or all use of the Initial Software is subject to compliance with the terms and conditions under which the Holder has elected to distribute its work and no one shall be entitled to modify the terms and conditions for the distribution of said Initial Software. The Holder undertakes that the Initial Software will remain ruled at least by this Agreement, for the duration set forth in Article 4.2 <#term>. 6.2 OVER THE CONTRIBUTIONS The Licensee who develops a Contribution is the owner of the intellectual property rights over this Contribution as defined by applicable law. 6.3 OVER THE EXTERNAL MODULES The Licensee who develops an External Module is the owner of the intellectual property rights over this External Module as defined by applicable law and is free to choose the type of agreement that shall govern its distribution. 6.4 JOINT PROVISIONS The Licensee expressly undertakes: 1. not to remove, or modify, in any manner, the intellectual property notices attached to the Software; 2. to reproduce said notices, in an identical manner, in the copies of the Software modified or not. The Licensee undertakes not to directly or indirectly infringe the intellectual property rights on the Software of the Holder and/or Contributors, and to take, where applicable, vis-à-vis its staff, any and all measures required to ensure respect of said intellectual property rights of the Holder and/or Contributors. Article 7 - RELATED SERVICES 7.1 Under no circumstances shall the Agreement oblige the Licensor to provide technical assistance or maintenance services for the Software. However, the Licensor is entitled to offer this type of services. The terms and conditions of such technical assistance, and/or such maintenance, shall be set forth in a separate instrument. Only the Licensor offering said maintenance and/or technical assistance services shall incur liability therefor. 7.2 Similarly, any Licensor is entitled to offer to its licensees, under its sole responsibility, a warranty, that shall only be binding upon itself, for the redistribution of the Software and/or the Modified Software, under terms and conditions that it is free to decide. Said warranty, and the financial terms and conditions of its application, shall be subject of a separate instrument executed between the Licensor and the Licensee. Article 8 - LIABILITY 8.1 Subject to the provisions of Article 8.2, the Licensee shall be entitled to claim compensation for any direct loss it may have suffered from the Software as a result of a fault on the part of the relevant Licensor, subject to providing evidence thereof. 8.2 The Licensor's liability is limited to the commitments made under this Agreement and shall not be incurred as a result of in particular: (i) loss due the Licensee's total or partial failure to fulfill its obligations, (ii) direct or consequential loss that is suffered by the Licensee due to the use or performance of the Software, and (iii) more generally, any consequential loss. In particular the Parties expressly agree that any or all pecuniary or business loss (i.e. loss of data, loss of profits, operating loss, loss of customers or orders, opportunity cost, any disturbance to business activities) or any or all legal proceedings instituted against the Licensee by a third party, shall constitute consequential loss and shall not provide entitlement to any or all compensation from the Licensor. Article 9 - WARRANTY 9.1 The Licensee acknowledges that the scientific and technical state-of-the-art when the Software was distributed did not enable all possible uses to be tested and verified, nor for the presence of possible defects to be detected. In this respect, the Licensee's attention has been drawn to the risks associated with loading, using, modifying and/or developing and reproducing the Software which are reserved for experienced users. The Licensee shall be responsible for verifying, by any or all means, the suitability of the product for its requirements, its good working order, and for ensuring that it shall not cause damage to either persons or properties. 9.2 The Licensor hereby represents, in good faith, that it is entitled to grant all the rights over the Software (including in particular the rights set forth in Article 5 <#scope>). 9.3 The Licensee acknowledges that the Software is supplied "as is" by the Licensor without any other express or tacit warranty, other than that provided for in Article 9.2 <#good-faith> and, in particular, without any warranty as to its commercial value, its secured, safe, innovative or relevant nature. Specifically, the Licensor does not warrant that the Software is free from any error, that it will operate without interruption, that it will be compatible with the Licensee's own equipment and software configuration, nor that it will meet the Licensee's requirements. 9.4 The Licensor does not either expressly or tacitly warrant that the Software does not infringe any third party intellectual property right relating to a patent, software or any other property right. Therefore, the Licensor disclaims any and all liability towards the Licensee arising out of any or all proceedings for infringement that may be instituted in respect of the use, modification and redistribution of the Software. Nevertheless, should such proceedings be instituted against the Licensee, the Licensor shall provide it with technical and legal expertise for its defense. Such technical and legal expertise shall be decided on a case-by-case basis between the relevant Licensor and the Licensee pursuant to a memorandum of understanding. The Licensor disclaims any and all liability as regards the Licensee's use of the name of the Software. No warranty is given as regards the existence of prior rights over the name of the Software or as regards the existence of a trademark. Article 10 - TERMINATION 10.1 In the event of a breach by the Licensee of its obligations hereunder, the Licensor may automatically terminate this Agreement thirty (30) days after notice has been sent to the Licensee and has remained ineffective. 10.2 A Licensee whose Agreement is terminated shall no longer be authorized to use, modify or distribute the Software. However, any licenses that it may have granted prior to termination of the Agreement shall remain valid subject to their having been granted in compliance with the terms and conditions hereof. Article 11 - MISCELLANEOUS 11.1 EXCUSABLE EVENTS Neither Party shall be liable for any or all delay, or failure to perform the Agreement, that may be attributable to an event of force majeure, an act of God or an outside cause, such as defective functioning or interruptions of the electricity or telecommunications networks, network paralysis following a virus attack, intervention by government authorities, natural disasters, water damage, earthquakes, fire, explosions, strikes and labor unrest, war, etc. 11.2 Any failure by either Party, on one or more occasions, to invoke one or more of the provisions hereof, shall under no circumstances be interpreted as being a waiver by the interested Party of its right to invoke said provision(s) subsequently. 11.3 The Agreement cancels and replaces any or all previous agreements, whether written or oral, between the Parties and having the same purpose, and constitutes the entirety of the agreement between said Parties concerning said purpose. No supplement or modification to the terms and conditions hereof shall be effective as between the Parties unless it is made in writing and signed by their duly authorized representatives. 11.4 In the event that one or more of the provisions hereof were to conflict with a current or future applicable act or legislative text, said act or legislative text shall prevail, and the Parties shall make the necessary amendments so as to comply with said act or legislative text. All other provisions shall remain effective. Similarly, invalidity of a provision of the Agreement, for any reason whatsoever, shall not cause the Agreement as a whole to be invalid. 11.5 LANGUAGE The Agreement is drafted in both French and English and both versions are deemed authentic. Article 12 - NEW VERSIONS OF THE AGREEMENT 12.1 Any person is authorized to duplicate and distribute copies of this Agreement. 12.2 So as to ensure coherence, the wording of this Agreement is protected and may only be modified by the authors of the License, who reserve the right to periodically publish updates or new versions of the Agreement, each with a separate number. These subsequent versions may address new issues encountered by Free Software. 12.3 Any Software distributed under a given version of the Agreement may only be subsequently distributed under the same version of the Agreement or a subsequent version, subject to the provisions of Article 5.3.4 <#compatibility>. Article 13 - GOVERNING LAW AND JURISDICTION 13.1 The Agreement is governed by French law. The Parties agree to endeavor to seek an amicable solution to any disagreements or disputes that may arise during the performance of the Agreement. 13.2 Failing an amicable solution within two (2) months as from their occurrence, and unless emergency proceedings are necessary, the disagreements or disputes shall be referred to the Paris Courts having jurisdiction, by the more diligent Party.