Skip to content

plugin::chain: multiple attributes with the same key #333

Closed
@matejzero

Description

@matejzero
Contributor

Hello,
I have this case, where I'm using Chain plugin where I specify multiple arguments with the same key and different value. As far as I know, that is currently not possible with this module. Here is how the configuration looks like:

class { 'collectd::plugin::chain':
  chainname => 'PreCache',
  rules     => [
    {
      'match'   => {
        'type'    => 'regex',
        'matches' => {
          'Plugin' => '.*',
        },
      },
      'targets' => [
        {
          'type'       => 'set',
          'attributes' => {
            'MetaDataSet' => "tsdb_tag_pluginInstance\" \"instance",
            'MetaDataSet' => "tsdb_tag_type\" \"type",
            'MetaDataSet' => "tsdb_tag_typeInstance\" \"type_instance",
            'MetaDataSet' => "tsdb_tag_dsname\" \"dsname",
          },
        },
      ],
    },
  ],
}

Could this be easily changed so I could use the same key names?
Also, how to specify multiple values like in my case. AFAIK its not possible at the moment.

This config is for the new write_opentsdb module (which is also used for pushing data to InfluxDB) that will come to collectd in the next release (hopefully). Pull request is already and waiting for merge.

Activity

ghost

ghost commented on Sep 11, 2015

@ghost

Need this too 👍 :)

igalic

igalic commented on Sep 29, 2015

@igalic
Contributor

@matejzero , @szop85 i'm not sure i understand what you want the config to look like.

project0

project0 commented on Sep 30, 2015

@project0
Contributor

@matejzero these are not valid options for the target "set", what you try to configure is not possible within the filter. The filter rules are not intended to configure a whole plugin.
I am not sure what you trie to do, but valid options for manipulating the instance/metric names are these:
Host String
Plugin String
PluginInstance String
TypeInstance String
see: https://collectd.org/documentation/manpages/collectd.conf.5.shtml#filter_configuration.

jyaworski

jyaworski commented on Mar 3, 2016

@jyaworski
Member

Closing due to lack of response. Please re-open if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jyaworski@igalic@project0@matejzero

        Issue actions

          plugin::chain: multiple attributes with the same key · Issue #333 · voxpupuli/puppet-collectd