Skip to content

Commit

Permalink
proccesors support on prospectors (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
yurymuski authored and pcfens committed Apr 16, 2018
1 parent 188ee96 commit 68d7814
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion manifests/prospector.pp
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@
$tags = [],
$symlinks = false,
$pipeline = undef,
$processors = [],
) {

validate_hash($fields, $multiline, $json)
validate_array($paths, $exclude_files, $include_lines, $exclude_lines, $tags)
validate_array($paths, $exclude_files, $include_lines, $exclude_lines, $tags, $processors)
validate_bool($tail_files, $close_renamed, $close_removed, $close_eof, $clean_removed, $symlinks)

$prospector_template = $filebeat::major_version ? {
Expand Down
10 changes: 10 additions & 0 deletions templates/prospector.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,13 @@
<%- if @close_timeout -%>
close_timeout: <%= @close_timeout %>
<%- end -%>
<%- if @processors.length > 0 -%>
# Managing processors releated only for specified prospector
processors:
<%- @processors.each do |proc| -%>
- <%= proc.keys[0] %>:
<%- proc[proc.keys[0]].each do |k, v| -%>
<%= k %>: <%= v %>
<%- end -%>
<%- end -%>
<%- end -%>

0 comments on commit 68d7814

Please sign in to comment.