postgresql metrics query failing with postgresl >= 10

Bug #1805451 reported by Junien F
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Telegraf Charm
Fix Released
High
Stuart Bishop
pgsql Interface for charms.reactive
Fix Released
Undecided
Stuart Bishop

Bug Description

https://git.launchpad.net/telegraf-charm/tree/templates/postgresql.tmpl (comes from upstream) has queries that don't work against postgresql 10 :

Nov 27 15:23:00 telegraf[14241]: 2018-11-27T15:23:00Z E! Error in plugin [inputs.postgresql_extensible]: ERROR: column "waiting" does not exist (SQLSTATE 42703)
Nov 27 15:23:00 telegraf[14241]: 2018-11-27T15:23:00Z E! Error in plugin [inputs.postgresql_extensible]: ERROR: column "waiting" does not exist (SQLSTATE 42703)
Nov 27 15:23:00 telegraf[14241]: 2018-11-27T15:23:00Z E! Error in plugin [inputs.postgresql_extensible]: ERROR: function pg_current_xlog_insert_location() does not exist (SQLSTATE 42883)

We need to come up with updated queries, update this template and also make a PR against upstream.

Thanks

Related branches

Junien F (axino)
Changed in telegraf-charm:
importance: Undecided → Medium
status: New → Triaged
Stuart Bishop (stub)
Changed in telegraf-charm:
importance: Medium → High
assignee: nobody → Stuart Bishop (stub)
Revision history for this message
Stuart Bishop (stub) wrote :

The inputs.postgresql_extensible telegraf plugin supports minimim PostgreSQL version, but not the maximum PostgreSQL version we need here. The telegraf charm will need detect the remote version of PostgreSQL (provided on the relation), and generate a specific config file for that version (rather than the current approach of one config file that works for all versions).

Revision history for this message
Junien F (axino) wrote :

https://code.launchpad.net/~stub/telegraf-charm/+git/telegraf-charm/+merge/359820 does not fully address the problem, telegraf still complains about :

Error in plugin [inputs.postgresql_extensible]: ERROR: function pg_last_xlog_receive_location() does not exist (SQLSTATE 42883)

Revision history for this message
Junien F (axino) wrote :

Also, in one environment, upgrading the charm didn't update /etc/telegraf/telegraf.d/postgresql.conf because the flag 'postgresql.database.changed' is not set.

Revision history for this message
Stuart Bishop (stub) wrote :

Updated interface:pgsql to correctly set the 'changed' flags on upgrade-charm.

Pushed a rebuild telegraf charm to cs:~telegraf-charmers/telegraf-33

Changed in interface-pgsql:
status: New → Fix Released
assignee: nobody → Stuart Bishop (stub)
Stuart Bishop (stub)
Changed in telegraf-charm:
status: Triaged → Fix Released
Revision history for this message
Junien F (axino) wrote :

Re-opening because as far as I can see, comment #2 has not been addressed.

Changed in telegraf-charm:
status: Fix Released → Triaged
Junien F (axino)
Changed in telegraf-charm:
status: Triaged → Fix Committed
Stuart Bishop (stub)
Changed in telegraf-charm:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.