Skip to content
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

write_riemann plugin fixes and enhancements #830

Merged
merged 6 commits into from Jul 14, 2018

Conversation

smortex
Copy link
Member

@smortex smortex commented Jul 11, 2018

Pull Request (PR) description

The write_riemann plugin has some problems that are fixed by this problem report:

  1. It is not possible to configure collectd to send events to multiple Riemann servers (now accept an array of nodes);
  2. Some parameter names have an inconsistent extra "riemann_" at the beginning of their names (riemann_host and riemann_port where renamed to host and port);
  3. Not many parameters types are checked (all of them are now tested);
  4. The module plugin has some default values which are different from upstream (protocols and store_rates had wrong default value. Do not set default values to the plugin parameters, and only output those that where explicitly set by the end-user. This allows collectd to use the default value if a parameter was not set by the user).

This Pull Request (PR) fixes the following issues

n/a

Because this breaks the API in an unavoidable way, it might be interesting to merge this before #828.

While here, fix a few inconsistencies in the test suite.
Only output configuration for provided parameters, let the default
values be inferred by collectd itself and not the module.
@smortex smortex changed the title Riemann fixes Riemann fixes and enhancements Jul 11, 2018
@smortex smortex changed the title Riemann fixes and enhancements write_riemann plugin fixes and enhancements Jul 11, 2018
- Do not prepent parameter names with "riemann_" (riemann_host -> host;
  riemann_port -> port) to be consistent with other parameters;
- Only allow to pass ttl_factor as a Float (as per the documentation);
- Only allow to pass port as an Integer (as per the documentation).
Enum['present', 'absent'] $ensure = 'present',
Boolean $manage_package = $collectd::manage_package,
Array[String[1]] $tags = [],
Hash[String[1],String[1]] $attributes = {},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more datatypes \o/

@@ -28,6 +19,6 @@

collectd::plugin { 'write_riemann':
ensure => $ensure,
content => template('collectd/plugin/write_riemann.conf.erb'),
content => epp('collectd/plugin/write_riemann.conf.epp'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

epp \o/

@bastelfreak
Copy link
Member

Thanks for the awesome work @smortex !

@bastelfreak bastelfreak merged commit 2098dfa into voxpupuli:master Jul 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants