[check_postgres] check_postgres_bloat and filtering with include

Greg Sabino Mullane greg at endpoint.com
Mon Aug 1 15:40:17 UTC 2011


On Thu, Jun 09, 2011 at 02:26:31PM -0400, Roy McMorran wrote:
> ...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.

The MINPAGES and MINIPAGES are not used if you explicitly include 
or exclude anything. Whether this was the right design decision I'm 
not sure of, but that's what the code is doing. :) If you want to 
get the behavior you desire, take a look at the if blocks inside 
sub check_bloat right after the giant SQL statement.

I'm also curious why it is giving a warning rather than a 
critical here. Anyone?


-- 
Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 0x14964AC8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
Url : https://mail.endcrypt.com/pipermail/check_postgres/attachments/20110801/bc2665cd/attachment.bin 


More information about the Check_postgres mailing list