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

Is there a way to set up multiple discreet influxdb outputs? #129

Closed
greenaar opened this issue Sep 29, 2019 · 1 comment
Closed

Is there a way to set up multiple discreet influxdb outputs? #129

greenaar opened this issue Sep 29, 2019 · 1 comment

Comments

@greenaar
Copy link

greenaar commented Sep 29, 2019

I'd like to set 2 different telegraf outputs, one tagged, one default.

When using hiera

telegraf::outputs:
  influxdb:
    - urls:
        - "http://sys.home.local:8086"
      database: 'telegraf'
      skip_database_creation: false

The title is also the output type. I didn't see an easy way to change that, I'd expect

telegraf::outputs:
  influxdb:
    - urls:
        - "http://sys.home.local:8086"
      database: 'telegraf'
      skip_database_creation: false
  influxdb_other:
    plugin_type: 'influxdb'
    - urls:
        - "http://sys.home.local:8086"
      database: 'data'
      skip_database_creation: false

would work, but it doesn't (bad yaml). Do you have an example using hiera with 2 different outputs?

@greenaar
Copy link
Author

Turns out the answer i needed looks like this:

telegraf::outputs:
  influxdb:
    - urls:
        - "http://sys.home.local:8086"
      database: 'telegraf'
      skip_database_creation: false
      tagdrop:
        influxdb_database:
          - '*'
    - urls:
        - "http://sys.home.local:8086"
      database: 'syslog'
      skip_database_creation: false
      tagpass:
        influxdb_database:
          - 'syslog'

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

1 participant