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

Influxdb output database routing tag #5490

Merged
merged 2 commits into from
Feb 27, 2019

Conversation

danielnelson
Copy link
Contributor

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

@danielnelson danielnelson added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Feb 27, 2019
@danielnelson danielnelson added this to the 1.10.0 milestone Feb 27, 2019
@danielnelson danielnelson merged commit 65b76dc into master Feb 27, 2019
@danielnelson danielnelson deleted the influxdb-output-database-routing-tag branch February 27, 2019 18:54
@voiprodrigo
Copy link
Contributor

Is it possible to drop the tag after routing is established?

Sent with GitHawk

@danielnelson
Copy link
Contributor Author

I didn't include this.

otherpirate pushed a commit to otherpirate/telegraf that referenced this pull request Mar 15, 2019
otherpirate pushed a commit to otherpirate/telegraf that referenced this pull request Mar 15, 2019
dupondje pushed a commit to dupondje/telegraf that referenced this pull request Apr 22, 2019
@amarbajric
Copy link

@danielnelson Is there any possibility at the moment to drop the tag that was used for dynamic routing with database_tag? I have tried to use tagexclude without success. I guess database_tag and tagexclude are not intended to work together by now?

@danielnelson
Copy link
Contributor Author

danielnelson commented May 29, 2019

Unfortunately, the general metric filtering options are applied before database_tag, so they can't be used together. This means we will need to add a new option specifically for this :(. Can you open an issue for this?

@amarbajric
Copy link

Ah I see, that's what I was thinking as telegraf was simply ignoring the tagexclude property in the configuration. Yes I will open an issue for this feature request as I think that others also would like this specific functionality! Thank you for your fast response :)

@x70b1
Copy link
Contributor

x70b1 commented Jul 11, 2019

[[outputs.influxdb]]
  urls = ["http://127.0.0.1:8086"]
  username = "telegraf"
  password = "xxxxx"
  timeout = "5s"

  database = "Database1"
  database_tag = "influxdb_database"
  tagexclude = ["influxdb_database"]

[[inputs.exec]]
  commands = [
    "bash command.sh"
  ]

  interval = "1m"
  timeout = "20s"
  data_format = "influx"

  [inputs.exec.tags]
    influxdb_database = "Database1"

Sounds weird, but tagexclude works there for me? How is that possible?
I tested it.

@danielnelson
Copy link
Contributor Author

Tag exclude will work to remove the tag, but then it won't be available for the database_tag option to use and it will just send everything to the default database Database1.

@x70b1
Copy link
Contributor

x70b1 commented Jul 11, 2019

That makes sense. Thanks for the clarification!

bitcharmer pushed a commit to bitcharmer/telegraf that referenced this pull request Oct 18, 2019
athoune pushed a commit to bearstech/telegraf that referenced this pull request Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants