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

No longer possible to configure tagpass and tagdrop #170

Closed
thias opened this issue May 18, 2021 · 1 comment · Fixed by #171
Closed

No longer possible to configure tagpass and tagdrop #170

thias opened this issue May 18, 2021 · 1 comment · Fixed by #171

Comments

@thias
Copy link
Contributor

thias commented May 18, 2021

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.19.1
  • Ruby: AIO
  • Distribution: RHEL
  • Module version: 4.0.0 (and latest master)

How to reproduce (e.g Puppet code you use)

Using this copy/pasted from the README:

telegraf::input { 'my_snmp':
  plugin_type    => 'snmp',
  options        => {
    'interval' => '60s',
    'host' => [
      {
        'address'   => 'snmp_host1:161',
        'community' => 'read_only',
        'version'   => 2,
        'get_oids'  => ['1.3.6.1.2.1.1.5',],
      }
    ],
    'tags' => {
      'environment' => 'development',
    },
  },
}

What are you seeing

Results in:

Server Error: Evaluation Error: Error while evaluating a Resource Statement, Telegraf::Input[my_snmp]: parameter 'options' expects an Array value, got Struct

What behaviour did you expect instead

I would expect options to still work as a hash, as before and as still documented. It seems like it's now mandatory to have it be an array.

Output log

Any additional information you'd like to impart

Updating from 1.5.0 to 4.0.0 has broken such code for me:

  # interrupts : waaay too much data, we only care about network
  telegraf::input { 'interrupts-tagpass':
    plugin_type => 'interrupts',
    options     => {
      'tagpass' => [
        'irq'   => [ 'NET_RX', 'NET_TX' ],
      ]
    },
  }

The above created the following configuration:

[[inputs.interrupts]]
[inputs.interrupts.tagpass]
irq = ["NET_RX", "NET_TX"]

It now seems impossible to achieve it, as enclosing the options's {} into [] creates the 2nd line with double brackets, which no longer works.

@thias
Copy link
Contributor Author

thias commented May 18, 2021

I found my problem: After the "tagpass" arrow, it now needs a hash where an array used to previously work.

I have created #171 to fix the non-working example that mislead me.

@thias thias closed this as completed May 18, 2021
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

Successfully merging a pull request may close this issue.

1 participant