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

remove plugin_type #93

Merged
merged 2 commits into from
Jan 22, 2018
Merged

remove plugin_type #93

merged 2 commits into from
Jan 22, 2018

Conversation

nrdmn
Copy link
Contributor

@nrdmn nrdmn commented Jan 19, 2018

This PR removes the plugin_type feature in #80 because it is redundant and because its current implementation breaks when there are no inputs or outputs.

@nrdmn nrdmn changed the title WIP remove plugin_type remove plugin_type Jan 19, 2018
@yankcrime
Copy link
Member

Thanks.

@yankcrime yankcrime merged commit 3307a5e into voxpupuli:master Jan 22, 2018
@sparr
Copy link

sparr commented Jan 26, 2018

I think the removed code here was also breaking the new functionality for having two copies of the same input in an array. The exec example from the readme didn't work, and I've been pulling my hair out for a couple of days tracking down the problem to the conf template's pre-manipulation of the inputs array.

sparr pushed a commit to hotschedules/puppet-telegraf that referenced this pull request Jan 26, 2018
* remove plugin_type

* fix my name and e-mail address
@hanej
Copy link

hanej commented Jun 30, 2021

@nrdmn, @yankcrime, or @sparr

99% of our systems send metrics to RabbitMQ so we have a global configuration set to use the amqp output. The only systems that don't need these outputs are the ones that pull metrics off of the queues to insert into the database. This was the other major reason for plugin_type.

In our global configuration we have something like this:

telegraf::outputs:
  amqp:
    - brokers: ["amqp://user:pass@rabbitmq:5672/metrics"]
      exchange: 'exch.influxdb.app'
      exchange_type: 'x-consistent-hash'
      exchange_passive: true
      exchange_durability: ""
      routing_tag: '#'
      delivery_mode: "persistent"
      timeout: "10s"
      data_format: 'influx'
      namedrop:
        - 'access_log'
      tagdrop:
        influxdb_database: ["docker", "events", "f5", "rabbitmq", "telegraf", "postfix", "velocity", "vmware"]
  amqp-log:
    - plugin_type: 'amqp'
      brokers: ["amqp://user:pass@rabbitmq:5672/metrics"]
      exchange: 'exch.influxdb.log'
      exchange_type: 'x-consistent-hash'
      exchange_passive: true
      exchange_durability: ""
      routing_tag: '#'
      delivery_mode: "persistent"
      timeout: "10s"
      data_format: 'influx'
      namepass:
        - 'access_log'
  amqp-sys:
    - plugin_type: 'amqp'
      brokers: ["amqp://user:pass@rabbitmq:5672/metrics"]
      exchange: 'exch.influxdb.sys'
      exchange_type: 'x-consistent-hash'
      exchange_passive: true
      exchange_durability: ""
      routing_tag: '#'
      delivery_mode: "persistent"
      timeout: "10s"
      data_format: 'influx'
      tagpass:
        influxdb_database: ["docker", "events", "f5", "rabbitmq", "telegraf", "postfix", "velocity", "vmware"]

Then in other configurations we can easily exclude the specific outputs we don't want to use.

telegraf::outputs:
  amqp:
    - plugin_ensure: 'absent'
  amqp-log:
    - plugin_ensure: 'absent'
  amqp-sys:
    - plugin_ensure: 'absent'

With this merge removing that ability, is there an alternative way to exclude specific configurations from a deep-merged hiera config? I've been using this configuration for several years now without issue so I'd be very interested to hear any problems that it caused.

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 this pull request may close these issues.

4 participants