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

custom plugin install? #268

Closed
aamerik opened this issue Jun 3, 2015 · 4 comments
Closed

custom plugin install? #268

aamerik opened this issue Jun 3, 2015 · 4 comments

Comments

@aamerik
Copy link

aamerik commented Jun 3, 2015

Hello. Im looking to use https://collectd.org/wiki/index.php/Plugin:Aggregation/Config using your module can you tell me if this is possible? I dont see a way to add custom plugin defs. Thank you

@txaj
Copy link

txaj commented Jun 3, 2015

This is a standard plugin (https://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_aggregation) that could be supported by this module -- but is currently not.

You need to implement the plugin in this module. Feel free to PR. Read the bottom of the README for some basic guidance. Feel free to ask for pointers if needed

@blkperl blkperl closed this as completed Jun 4, 2015
@aamerik
Copy link
Author

aamerik commented Jun 4, 2015

Txaj,

Thank you for your response, I'm trying to implement this but I'm running into a design issue.
Technically this plugin can be used to aggregate the values of many other plugins, so its possible that more than one instance of the class will be applied to the host. I'm having issues understanding how to best support that usecase. This is what I have so far:

# https://collectd.org/wiki/index.php/Plugin:Aggregation
class collectd::plugin::aggregation (
  $ensure   = present,
  $interval = undef,
  $plugin   = undef,
  $type     = undef,
  $groupby  = undef,
  $calcsum  = undef,
  $calcavg  = undef,
) {
  collectd::plugin { "aggregation":
    ensure   => $ensure,
    content  => template('collectd/plugin/aggregation.conf.erb'),
    interval => $interval,
  }
}

@txaj
Copy link

txaj commented Jun 5, 2015

look at the collectd::plugin defined type ; there is several arguments you can pass (especially the priority one) that you could make use of

If I understand well you can have 0..n Aggregation blocks ? If yes you can look for example in plugins like curl, postgresql or python on how we solved that. This is an advanced pattern indeed :-)

@kurpipio
Copy link
Contributor

I created pull request for that #289

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants