-
-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple output plugins of the same type #57
Conversation
manifests/output.pp
Outdated
) { | ||
include telegraf | ||
|
||
notice("Creating: ${name} :: ${plugin_type}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this notice
is necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for noticing. Removed that.
manifests/output.pp
Outdated
@@ -0,0 +1,35 @@ | |||
# == Define: telegraf::input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
::telegraf::output
manifests/output.pp
Outdated
@@ -0,0 +1,35 @@ | |||
# == Define: telegraf::input | |||
# | |||
# A Puppet wrapper for discrete Telegraf input files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'output'
manifests/output.pp
Outdated
# Hash. Plugin options for use the the input template. | ||
# | ||
# [*sections*] | ||
# Hash. Some inputs take multiple sections. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'outputs'
manifests/output.pp
Outdated
# === Parameters | ||
# | ||
# [*options*] | ||
# Hash. Plugin options for use the the input template. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'output'
manifests/output.pp
Outdated
} | ||
|
||
Class['::telegraf::config'] | ||
-> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you move these chaining arrows (lines 29 & 33) to prepend the same line as their chained directives (e.g. ->\nfile {...
becomes -> file {...
), I think tests will pass on this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Tests still fail with cryptic error message. Have I made some other mistake? |
define telegraf::output ( | ||
$plugin_type = $name, | ||
$options = undef, | ||
$suboptions = undef, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to declare $sections = undef,
(e.g.) here
I've got an open PR to fix the incomprehensible |
Thanks! Should I squash the commits? |
@KarolisL Please - I can 'squash and merge' but it would be best if you cleaned up your history 👍 |
@yankcrime done |
Thanks @KarolisL ! |
We need to write (replicate) the same metrics to 2 different influxdb servers but that's not possible with current implementation
This PR defines telegraf::output type which can be used to fulfill our needs.
Any comments/suggestions welcome. :-)