lesovsky / zabbix-extensions

Zabbix additional monitoring modules
BSD 3-Clause "New" or "Revised" License
316 stars 230 forks source link

Fix transactions #74

Closed casperr0 closed 4 years ago

casperr0 commented 4 years ago

reason: xact_start - Time when this process' current transaction was started, or null if no transaction is active. If the current query is the first of its transaction, this column is equal to the query_start column. query_start - Time when the currently active query was started, or if state is not active, when the last query was started

stephankn commented 4 years ago

I am not the original author of the template. I tried figuring out why query_start was used in the first place. It sounds like your query is way more reasonable. The template descrition promises to monitor transactions and not specific queries of a a transaction. So I'm going to merge the changes.

Would be great if you could do a double check whether this query works in all supported version of postgresql.

casperr0 commented 4 years ago

This query should work for all versions of PG starting from 9.2

stephankn commented 4 years ago

Thanks