Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-23684

Postgres Template Idle Transactions Always 0

XMLWordPrintable

    • Team INT
    • 0.4

      In its current state this script will likely never produce a result for an idle query.
      Currently it is considering only query_start:
      age(now(), query_start)
      I propose coalesce with transaction and query start times:
      age(now(), coalesce( xact_start, query_start))
       

      I have attached a fixed version, but can also do a PR if needed.

      Steps to reproduce:

      1. run the sql script 
        /var/lib/zabbix/postgresql/pgsql.transactions.sql

      Result:

      {"idle":0,"active":0.903109,"waiting":-0.009843,"prepared":0,"xmin_age":25}

      Expected:

      {"idle":<SOME NUMBER>,"active":0.903109,"waiting":-0.009843,"prepared":0,"xmin_age":25}

            drasikhov Denis Rasikhov
            troseph Troy
            Team INT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: