bucardo / check_postgres

Nagios check_postgres plugin for checking status of PostgreSQL databases
http://bucardo.org/wiki/Check_postgres
Other
554 stars 174 forks source link

Bloat alerting not honoring combined conditions #147

Open keithf4 opened 6 years ago

keithf4 commented 6 years ago

This isn't an issue with the bloat calculation itself, but with the evaluation of the thresholds

POSTGRES_BLOAT WARNING: DB "mydb" (host:my.db.server) (db mydb) table public.instance rows:195969008 pages:13835076 shouldbe:13525027 (1.0X) wasted size:2539921408 (2 GB)

I have the warning criteria set to "2 GB and 40%". Going by the returned values here and assuming that's what is used, 13835076 / 13525027 is only about 1%. Not sure what the 1.0X means either, but guessing it thinks that's how much bigger it thinks it is by size? Would probably be clearer to have the bloat % value it thinks it is returned.

keithf4 commented 6 years ago

Any possibility of looking into this soon? Without both of these metrics (size & %) working properly together it's very hard to get an accurate bloat alert going. If only the % is set, then very, very small tables cause alerts to go off. If only the size is set, then it has to be set very high to avoid false alerts on very large tables and bloat on smaller tables can be missed.

Basically it's causing the bloat alert to be extremely noisy or not go off when it actually needs to depending how people are configuring it now.