libzbxpgsql
libzbxpgsql copied to clipboard
n_live_tup and n_dead_tup are always 0 for "PostgreSQL Database estimates live/dead rows|"
Hello,
I noticed in the Zabbix template pg.table.n_live_tup[{$PG_CONN},{#DATABASE}]
and pg.table.n_dead_tup[{$PG_CONN},{#DATABASE}]
and I tried using them to calculate the garbage ratio / DB.
The problem is that they are always returned 0. This works fine for the table ones, but after a bit of digging the query in the docs will never work, because relname
will never equal {#DATABASE}
.
Is there any other way to get the garbage ratio? I do have some other custom queries which I use and involve a join between pg_class
and pg_stat_all_tables
on oid
=relid
. But I preferred to use this module instead.
Thank you very much for your work