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

Run create database query once per database #7333

Merged
merged 2 commits into from
Apr 28, 2020

Conversation

danielnelson
Copy link
Contributor

@danielnelson danielnelson commented Apr 14, 2020

Telegraf attempts to create the database by default on output startup, and
displays but otherwise ignores errors creating the database as it may not have
permission to do so.

When using the database_tag this behavior was not consistent with a static
database, and would try to recreate the database until it succeeded. With this
change only one attempt will be made to create the database, further attempts
will be performed only if a database not found error is received.

closes #7235

Required for all PRs:

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

Additional create database queries only ran if a database not found
error is received.
@danielnelson danielnelson added the fix pr to fix corresponding bug label Apr 14, 2020
@danielnelson danielnelson added this to the 1.14.1 milestone Apr 14, 2020
@danielnelson danielnelson requested a review from ssoroka April 14, 2020 19:08
plugins/outputs/influxdb/http.go Outdated Show resolved Hide resolved
@danielnelson danielnelson modified the milestones: 1.14.1, 1.14.2 Apr 14, 2020
@danielnelson danielnelson requested a review from ssoroka April 28, 2020 19:04
@danielnelson danielnelson merged commit b77dac9 into master Apr 28, 2020
@danielnelson danielnelson deleted the influxdb-create-db-database-tag branch April 28, 2020 20:42
danielnelson added a commit that referenced this pull request Apr 28, 2020
idohalevi pushed a commit to idohalevi/telegraf that referenced this pull request Sep 29, 2020
arstercz pushed a commit to arstercz/telegraf that referenced this pull request Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InfluxDB Output repeats create database indefinitely if it fails to create it
2 participants