[check_postgres] check_postgres_bloat and filtering with include
Roy McMorran
mcmorran at mdibl.org
Thu Jun 9 18:26:31 UTC 2011
Greetings,
I'm attempting to use the "--include" argument with the
check_postgres_bloat command in order to include only certain schemas,
but I am getting some unexpected results.
For instance, compare this (with no "--include"):
$ /usr/local/nagios/libexec/check_postgres_bloat --showtime=0
--showperf=0 --host=db.example.org --dbname=prd30 --warning=150%
--critical=200%
POSTGRES_BLOAT OK: DB "prd30" (host:db.example.org) (db prd30) index
term_agent_pk rows:? pages:277197 shouldbe:211428 (1.3X) wasted
bytes:538779648 (513 MB)
...with this, where I use "--include" to specify the "edit" schema:
$ /usr/local/nagios/libexec/check_postgres_bloat --showtime=0
--showperf=0 --host=db.example.org --dbname=prd30 --include=edit.
--warning=150% --critical=200%
POSTGRES_BLOAT WARNING: DB "prd30" (host:db.example.org) (db prd30)
index list_db_report_pk rows:? pages:4 shouldbe:1 (4.0X) wasted
bytes:24576 (24 kB) * (db prd30) index db_report_ak1 rows:? pages:4
shouldbe:1 (4.0X) wasted bytes:24576 (24 kB)
I would expect in the second case that the two indexes shown would not
cause a warning because they are smaller than 15 pages (per the man
page). Indeed they were supressed in the first example.
I've also tried to increase $MINPAGES and $MINIPAGES inside the
check_bloat routine, but there was no effect.
$ grep MIN.*PAGES.= /usr/local/nagios/libexec/check_postgres_bloat
my $MINPAGES = 100;
my $MINIPAGES = 100;
$ /usr/local/nagios/libexec/check_postgres_bloat --showtime=0
--showperf=0 --host=db.example.org --dbname=prd30 --include=edit.
--warning=150% --critical=200%
POSTGRES_BLOAT WARNING: DB "prd30" (host:db.example.org) (db prd30)
index list_db_report_pk rows:? pages:4 shouldbe:1 (4.0X) wasted
bytes:24576 (24 kB) * (db prd30) index db_report_ak1 rows:? pages:4
shouldbe:1 (4.0X) wasted bytes:24576 (24 kB)
This is check_postgres.pl version 2.16.0, which I believe is the latest
version. The target database is Postgres 9.0.1.
Any suggestions would be most appreciated; thanks.
--
Roy McMorran
Systems Administrator
MDI Biological Laboratory
mcmorran at mdibl.org
More information about the Check_postgres
mailing list