Skip to content

Commit

Permalink
[enh] set db_version at 0 if query version fails (#2819)
Browse files Browse the repository at this point in the history
  • Loading branch information
mced authored and danielnelson committed May 18, 2017
1 parent 5d7127e commit 02d4056
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

### Bugfixes

- [#2819](https://github.com/influxdata/telegraf/pull/2819): [enh] set db_version at 0 if query version fails
- [#2749](https://github.com/influxdata/telegraf/pull/2749): Fixed sqlserver input to work with case sensitive server collation.
- [#2716](https://github.com/influxdata/telegraf/pull/2716): Systemd does not see all shutdowns as failures
- [#2782](https://github.com/influxdata/telegraf/pull/2782): Reuse transports in input plugins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (p *Postgresql) Gather(acc telegraf.Accumulator) error {
query = `select substring(setting from 1 for 3) as version from pg_settings where name='server_version_num'`
err = db.QueryRow(query).Scan(&db_version)
if err != nil {
return err
db_version = 0
}
// We loop in order to process each query
// Query is not run if Database version does not match the query version.
Expand Down

0 comments on commit 02d4056

Please sign in to comment.