Skip to content

Commit

Permalink
Merge pull request #721 from juniorsysadmin/filter-match-data-types
Browse files Browse the repository at this point in the history
plugin::filter::match - Use data types
  • Loading branch information
bastelfreak authored Nov 12, 2017
2 parents 5d0e70d + f11ddcf commit 377bad0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 4 additions & 8 deletions manifests/plugin/filter/match.pp
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
# https://collectd.org/wiki/index.php/Chains
define collectd::plugin::filter::match (
$chain,
$rule,
$plugin,
$options = undef,
String $chain,
String $rule,
Collectd::Filter::Match $plugin,
Optional[Hash] $options = undef,
) {

include ::collectd
include ::collectd::plugin::filter

unless $plugin in $collectd::plugin::filter::plugin_matches {
fail("Unknown match plugin '${plugin}' provided")
}

ensure_resource('collectd::plugin', "match_${plugin}", { 'order' => '02'} )

$fragment_order = "10_${rule}_1_${title}"
Expand Down
2 changes: 2 additions & 0 deletions types/filter/match.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# https://collectd.org/wiki/index.php/Table_of_Matches
type Collectd::Filter::Match = Enum['empty_counter', 'hashed', 'regex', 'timediff', 'value']

0 comments on commit 377bad0

Please sign in to comment.