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

PostgreSQL input error after upgrade to 1.5.0 - datid is integer instead of string #3622

Closed
tschwaerzl opened this issue Dec 27, 2017 · 2 comments
Labels
area/postgresql bug unexpected problem or unintended behavior regression something that used to work, but is now broken
Milestone

Comments

@tschwaerzl
Copy link

Since I upgraded Telegraf via apt to 1.5.0 I get an error with postgresql input:

Dec 27 10:39:17 vs-psql-03 telegraf[12274]: 2017-12-27T09:39:17Z I! Starting Telegraf v1.5.0
Dec 27 10:39:17 vs-psql-03 telegraf[12274]: 2017-12-27T09:39:17Z I! Loaded outputs: influxdb
Dec 27 10:39:17 vs-psql-03 telegraf[12274]: 2017-12-27T09:39:17Z I! Loaded inputs: inputs.system inputs.net inputs.nginx inputs.processes inputs.swap inputs.postgresql inputs.cpu inputs.disk inputs.diskio inputs.kernel inputs.mem inputs.redis
Dec 27 10:39:17 vs-psql-03 telegraf[12274]: 2017-12-27T09:39:17Z I! Tags enabled: environment=production host=vs-psql-03 rails_env=production role=cloud
Dec 27 10:39:17 vs-psql-03 telegraf[12274]: 2017-12-27T09:39:17Z I! Agent Config: Interval:10s, Quiet:false, Hostname:"vs-psql-03", Flush Interval:10s
Dec 27 10:39:30 vs-psql-03 telegraf[12274]: 2017-12-27T09:39:30Z E! Field type conflict, dropping conflicted points: Response Error: Status Code [400], expected [204], [field type conflict: input field "datid" on measurement "postgresql" is type integer, already exists as type string]

My current telegraf.conf postgresql input config:

  [[inputs.postgresql]]
    address = "host=127.0.0.1 user=postgres sslmode=disable dbname=cloud"
    databases = ["cloud"]
@danielnelson danielnelson added area/postgresql bug unexpected problem or unintended behavior regression something that used to work, but is now broken labels Dec 28, 2017
@danielnelson danielnelson added this to the 1.5.1 milestone Dec 28, 2017
@danielnelson
Copy link
Contributor

Possible workaround if you can live without this field is just to fielddrop it:

[[inputs.postgresql]]
  fielddrop = ["datid"]

@danielnelson
Copy link
Contributor

It looks like it is not going to be possible to fix this bug. The above workaround can be removed after the current shard's end_time is reached and new data begins being added to the next shard. However, there will still be some complications with queries whose results span the type change. More information is available in the InfluxDB documentation under "work the shard section".

Sorry about the inconvenience this has caused.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/postgresql bug unexpected problem or unintended behavior regression something that used to work, but is now broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants